netbeans-gradle-project icon indicating copy to clipboard operation
netbeans-gradle-project copied to clipboard

Can't install 2.0.0.2 in Netbeans 9.0 (release)

Open jhalexand opened this issue 7 years ago • 23 comments

I'm trying to install the nbm for 2.0.0.2 from the releases page in Netbeans 9.0 (release) but I get the following error:

Some plugins require plugin Groovy Support to be installed.
The plugin Groovy Support is requested in version >= 1.42 but only 1.41.1 was found.

The following plugin is affected:
    Gradle Support

I guess this isn't a shock since Groovy support isn't planned until the second donation, but it seems like maybe a slightly older version is actually available? I double checked and this did work in RC1 just fine.

jhalexand avatar Aug 03 '18 15:08 jhalexand

You can still download the groovy plugin in Netbeans 9 by temporarily changing the plugin portal URL to the 8.2 portal ( http://updates.netbeans.org/netbeans/updates/8.2/uc/final/distribution/catalog.xml.gz ), and then changing it back to the new Apache portal ( http://plugins.netbeans.org/nbpluginportal/updates/9.0/catalog.xml.gz ).

To change the plugin portal URL: go to Tools:Plugins:Settings, select "Plugin Portal", and hit the "Edit" button.

I'm guessing it probably only worked in RC1 just because the new Apache plugin portal didn't exist yet, so the default pointer was still pointing to the 8.2 portal there.

tcfurrer avatar Aug 03 '18 16:08 tcfurrer

I had already added the 8.2 portal rather than changing the existing one. Would that make a difference?

jhalexand avatar Aug 03 '18 16:08 jhalexand

Oh, sorry your issue is more about the plugin version. I was able to get the older 1.4.3 release of the gradle plugin working on Netbeans 9 for now, and also haven't gotten the 2.0.0.2 release working yet.

tcfurrer avatar Aug 03 '18 16:08 tcfurrer

Got it working by using this portal instead for the Groovy plugin: http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz

I get the version 1.35 instead of 1.34.1

For other people reading this, here's the full instructions to make the version 2.0.0.2 (and 1.4.3) work with Netbeans 9 until the second donation. Made it a bit verbose for some people. 😄

Solution

Part 1:

  • Go to Tools -> Plugins-> Settings
  • Add a new provider or edit Plugin Portal with this URL: http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz
  • Deselect all other providers (just to make sure there's no ambiguity)
  • Go to Available Plugins and search for Groovy and Grails. Make sure you're getting the version 1.35
  • Download the plugin, install it and restart Netbeans

You can now remove/reset the provider we added/modified and select them all again.

Part 2:

  • Download the plugin's nbm (either 2.0.0.2 or 1.4.3) from this repository's releases page
  • Add and install it through Tools -> Plugins-> Downloaded

Note: You can also keep modifying the provider to download the version 1.4.3 from the 8.2 portal. Just making the guide easier to follow.

Part 3:

  • Go to Tools -> Options -> Miscellaneous -> Gradle
  • Make sure you're on category Gradle Installation
  • Click Change on Gradle Installation Directory:
  • Select Download selected version from Gradleware and change it to version 4.5.1.
  • Then simply restart Netbeans, wait for the download and voilà 😍

Alternative

If suddenly the 1st part doesn't work, here's an alternative (part 2 & 3 should still work).

I installed the plugin version 1.4.3 from Netbeans RC1 and I literally just copied/pasted the netbeans/groovy folder from Netbeans RC1's folder to the Netbeans 9's folder.

Making things faster for you people:

  • Download the specified folder from here
  • Extract from the zip the groovy's folder to Netbeans' folder

Note: Make sure the path doesn't end up groovy/groovy

Now continue with Part 2 & 3.

LanguageAgnostic avatar Aug 05 '18 08:08 LanguageAgnostic

I wonder if I should just remove the Groovy dependency then because it is not strictly necessary (it just improves Gradle file editing support but it is not that great anyway). It is in the manifest.mf: cnb.org.netbeans.modules.groovy.kit

kelemen avatar Aug 05 '18 19:08 kelemen

Yes, removing the Groovy dependency would be a good idea. Also, it would be wonderful to have the Gradle support as a pull request at https://github.com/apache/incubator-netbeans and notice that we're planning a quarterly release schedule, maybe that could be good for the Gradle plugin process too to be aligned: https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+Release+Cycle

geertjanw avatar Aug 08 '18 07:08 geertjanw

It would be nice though I know practically nothing of NB's Ant build. So, I would need someone who does the tricky things in the Ant build (there are quite a few difficulty in the build).

kelemen avatar Aug 08 '18 20:08 kelemen

I have a completely different solution to this issue: Compile a build of NetBeans, then compile the correct org-netbeans-modules-groovy-support.nbm from the source tree. It's not as much work as it sounds, and you don't have to hack anything. But hey, THIS COMMENT HAS THE 1.42 NBM AS AN ATTACHMENT if you don't want to build it yourself. I have built NB several times before, and this was one of the easiest builds. But if you don't know how to clone a repository, or install ant, or set a JRE (or JDK) just use the attached nbm.

  1. Follow the instructions on The Apache NetBeans page, and build NetBeans. It takes a while.
  2. CD to the "groovy.support" directory.
  3. Type "ant nbm-nosignature". This builds the nbm file into the subdirectory "build".

Of course you can use the development version of NB you just built, or import the 1.42 nmb into your release version.

org-netbeans-modules-groovy-support.zip

Charlweed avatar Aug 14 '18 01:08 Charlweed

Be very careful when you add this update site: http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz My recommendation is to disable it right away after you get the plugin added. If you leave it enabled, NetBeans will try to update many other components, particularly some shared Java EE components. I went ahead and (foolishly) did the updates to the components not related to Gradle or Groovy. Then, some other plugins like Payara EE Common, Server, and Micro stopped working due to version issues.

I was able to get my environment back to normal using these steps:

  1. Uninstall all the Java EE related plugins.
  2. Remove the "enterprise" directory in the NetBeans program installation location.
  3. Then reinstall all the Java EE and Payara plugins.

kjjaeger avatar Aug 17 '18 16:08 kjjaeger

I do not see a Gradle 2 plugin. The standard plugin repositories in netbeans are:

  • Netbeans 9 distribution:
    • https://netbeans.apache.org/nb/updates/9.0/updates.xml.gz
  • Netbeans 9 plugin portal:
    • http://plugins.netbeans.org/nbpluginportal/updates/9.0/catalog.xml.gz

Can you please supply the Netbeans 9 plugin repository You are using (above)?

aplatypus avatar Sep 17 '18 01:09 aplatypus

Personally I find the syntax support editing Gradle files to be very useful. Of course it would be a vast improvement to have Gradle syntax support. Tracking Gradle problems with a 1960-s --stacktrace approach is not really fun, at least the Groovy language support finds syntax mistakes, braces balancing, etc.

If you do remove the dependency there should be a notification on the plugin config to inform people that they Can have syntax checks by loading A Groovy support plugin.

aplatypus avatar Sep 17 '18 02:09 aplatypus

Removing the Groovy dependency would just mean that the plugin is installable without Groovy (in which case the Groovy related features would disapear) but if you have it, everything would work the same way.

kelemen avatar Sep 17 '18 17:09 kelemen

The plugin still can't be installed from the NB 9 update site, any plans on releasing an update that removes the Groovy dependency yet?

cobexer avatar Dec 13 '18 07:12 cobexer

I forgot about this. Can you build from the sources and check now? If everything is all right, I will have a release this weekend.

kelemen avatar Dec 13 '18 12:12 kelemen

I ran into a few problems with the build of this project (I'm using Java 11) so I tried to build with Java 8 but saw lots of warnings concerning unsupported annotation processors (which only support Java 6 or 7).

But I have run out of time for this weekend.

Maybe I can test this next week.

cobexer avatar Dec 16 '18 10:12 cobexer

The annotation processor warnings are irrelevant, you can safely ignore them.

kelemen avatar Dec 16 '18 19:12 kelemen

Compiling the Plug-In from cuurent master (7ac56077cb0a3cbc7fd7251593db33d53b07c387) still has the Groovy plugin as a hard dependency.

The Info/info.xml file lists it as both recommended and required.

cobexer avatar Dec 17 '18 07:12 cobexer

Also while you are at it: Could you update this project to use Gradle 5 for it's build? The used Gradle version doesn't run with Java 11 and that's a pain everywhere. Please note that Java 8 will be EOL end of January 2019 already!

cobexer avatar Dec 17 '18 17:12 cobexer

It seems this requires in multiple places. I have fixed that. Can you try now?

As for Gradle 5: I can't upgrade because the nbm plugin does not support it yet.

kelemen avatar Dec 18 '18 12:12 kelemen

The updated version still can't be installed because of a dependency to org.netbeans.modules.groovy.support > 1.42... org.netbeans.modules.groovy.support is part of NetBeans itself as far as I understand 1.42 isn't mentioned anywhere, however it seems that the plugin is built against a dev snapshot of NetBeans and thus requires newer versions than what is provided in NetBeans 9.0.

Which version of NetBeans is this plugin supposed to target and how is that done?

Also some parts of this build seem to target Java 6 still... Gradle 5: :( thanks for checking tough!

cobexer avatar Dec 19 '18 19:12 cobexer

@cobexer ... I got a version of Groovy support from the NB v8.2 plugin repository.

I am hoping NB 10 will support Groovy officially. I am not holding my breath.

You need to add a plugin site in the Plugins dialogue manually. I found a few old friends there actually.

Good luck!!

aplatypus avatar Dec 20 '18 04:12 aplatypus

@aplatypus looking around I think that Groovy support made it into NB 10: https://github.com/apache/incubator-netbeans/pull/904 https://cwiki.apache.org/confluence/display/NETBEANS/Miscellaneous NB 10 also seems to be close to it's release - I can wait for that.

cobexer avatar Dec 20 '18 07:12 cobexer

I have realized that removing it from the plugin is a bigger issue than I have thought. It would require to factor out some small part of the code to a completely separate plugin which would make the installation worse (when Groovy is actually there). So, let's wait for NB 10 instead (I put back the requires on Groovy, since removing it was pointless).

kelemen avatar Dec 20 '18 16:12 kelemen