New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install 2.0.0.2 in Netbeans 9.0 (release) #395

Open
jhalexand opened this Issue Aug 3, 2018 · 23 comments

Comments

Projects
None yet
9 participants
@jhalexand
Copy link

jhalexand commented Aug 3, 2018

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.

@tcfurrer

This comment has been minimized.

Copy link

tcfurrer commented Aug 3, 2018

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.

@jhalexand

This comment has been minimized.

Copy link

jhalexand commented Aug 3, 2018

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

@tcfurrer

This comment has been minimized.

Copy link

tcfurrer commented Aug 3, 2018

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.

@Soheibooo

This comment has been minimized.

Copy link

Soheibooo commented Aug 5, 2018

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:

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.

@kelemen

This comment has been minimized.

Copy link
Owner

kelemen commented Aug 5, 2018

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

@geertjanw

This comment has been minimized.

Copy link

geertjanw commented Aug 8, 2018

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

@kelemen

This comment has been minimized.

Copy link
Owner

kelemen commented Aug 8, 2018

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).

@Charlweed

This comment has been minimized.

Copy link

Charlweed commented Aug 14, 2018

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

@kjjaeger

This comment has been minimized.

Copy link

kjjaeger commented Aug 17, 2018

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.
@aplatypus

This comment has been minimized.

Copy link

aplatypus commented Sep 17, 2018

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

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

@aplatypus

This comment has been minimized.

Copy link

aplatypus commented Sep 17, 2018

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.

@kelemen

This comment has been minimized.

Copy link
Owner

kelemen commented Sep 17, 2018

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.

@cobexer

This comment has been minimized.

Copy link

cobexer commented Dec 13, 2018

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?

@kelemen

This comment has been minimized.

Copy link
Owner

kelemen commented Dec 13, 2018

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.

@cobexer

This comment has been minimized.

Copy link

cobexer commented Dec 16, 2018

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.

@kelemen

This comment has been minimized.

Copy link
Owner

kelemen commented Dec 16, 2018

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

@cobexer

This comment has been minimized.

Copy link

cobexer commented Dec 17, 2018

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

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

@cobexer

This comment has been minimized.

Copy link

cobexer commented Dec 17, 2018

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!

@kelemen

This comment has been minimized.

Copy link
Owner

kelemen commented Dec 18, 2018

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.

@cobexer

This comment has been minimized.

Copy link

cobexer commented Dec 19, 2018

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!

@aplatypus

This comment has been minimized.

Copy link

aplatypus commented Dec 20, 2018

@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!!

@cobexer

This comment has been minimized.

Copy link

cobexer commented Dec 20, 2018

@aplatypus looking around I think that Groovy support made it into NB 10: apache/incubator-netbeans#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.

@kelemen

This comment has been minimized.

Copy link
Owner

kelemen commented Dec 20, 2018

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment