Skip to content
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

Build fails ./gradlew assemble #44

Closed
vogella opened this issue Dec 12, 2019 · 12 comments
Closed

Build fails ./gradlew assemble #44

vogella opened this issue Dec 12, 2019 · 12 comments

Comments

@vogella
Copy link

vogella commented Dec 12, 2019

Error message: * What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().

Could not create service of type PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy().

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

@kellycampbell
Copy link

I ran into this and found the solution. That's an error from using a newer JDK version. You need to use JDK 8. Looks like it also needs nodejs 8. It fails to build on nodejs 10 or 12 with a compilation failure in libsass due to newer version of v8.

@henriquemattos
Copy link

henriquemattos commented Mar 5, 2020

In my case it was missing the path to XCode used by node-gyp, a node module that node-sass depends on. But even though I installed XCode xcode-select --install and set it to use not the command-line but the app with sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer, still I had to manually enter the folder GerritStats and upgrade node-sass to latest to have the latest node-gyp: npm install -y node-sass@latest.

After that I could run ./gradlew assemble successfully. 🍀

ps.: I'm running on macOS Catalina (10.15.3 (19D76))

@chrisinmtown
Copy link

chrisinmtown commented Apr 13, 2020

So this project is currently limited to being compiled with JDK v8? How bad are the dependencies on v8? Asking differently, what breaks when v10 or (even better) v11 is used?

And the killer question - is the original maintainer @holmari still interested in keeping this alive?

There are a couple of problems right off the bat

  1. gradle wrapper is version 4.7, and it cannot run on a modern jdk such as v11.
  2. gradle wants the findbugs plugin, but that's not found
  3. npm package sass is out of date

This pull request gets the build working: #48

@holmari
Copy link
Owner

holmari commented Apr 14, 2020

@chrisinmtown I wrote this tool when working at my previoius company, where we were using Gerrit. I haven't been using Gerrit for over 3 years however, so I haven't maintained this either. If others want to contribute to it, I'd be happy to add a collaborator if there's a volunteer!

@chrisinmtown
Copy link

Please test again @vogella . After @holmari merged my PR #48 I can build with the current gradle wrapper in the repo and this java on Mac OSX:

java 11.0.4 2019-07-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)

@vogella
Copy link
Author

vogella commented Apr 14, 2020

Build works fine with current head. Thank you.

But if I try to run gerrit_stats.sh on a downloaded json I get:

vogella@spike:~/git/gerritstats$ ./gerrit_stats.sh -f gerrit_out/ --branches master
Exception in thread "main" java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at com.holmsted.gerrit.CommandLineParser.(CommandLineParser.java:73)
at com.holmsted.gerrit.GerritStatsMain.main(GerritStatsMain.java:19)

@vogella
Copy link
Author

vogella commented Apr 14, 2020

The above was with Java 14, with Java 11 I get:

vogella@spike:~/git/gerritstats$ ./gerrit_stats.sh -f gerrit_out/ --branches master
Exception in thread "main" java.lang.ClassCastException: jdk.internal.loader.ClassLoaders$AppClassLoader incompatible with java.net.URLClassLoader
at com.holmsted.gerrit.CommandLineParser.(CommandLineParser.java:73)
at com.holmsted.gerrit.GerritStatsMain.main(GerritStatsMain.java:19)

@chrisinmtown
Copy link

@vogella thanks for running a test. I missed that occurrence of CommandLineParser, please see #54

Do you know of an open gerrit I can use for testing? I'm waiting to be granted access to the API on my usual gerrit.

@chrisinmtown
Copy link

@vogella please test again, @holmari merged #54

@vogella
Copy link
Author

vogella commented Apr 16, 2020

@chrisinmtown sorry, missed your comment. I use the Eclipse Gerrit server for testing.

https://git.eclipse.org/r

To download Gerrits:

./gerrit_downloader.sh --server lvogel@git.eclipse.org/ --project platform/eclipse.platform.ui --project platform/eclipse.platform.swt --project platform/eclipse.platform.text --project platform/eclipse.platform.resources --project platform/eclipse.platform.ua --project platform/eclipse.platform.team -a 2020-02-01 --output-dir gerrit_out/

To create report:

./gerrit_stats.sh -f gerrit_out/ --branches master

You may have to create your own user in Gerrit / Bugzilla (https://bugs.eclipse.org/) and replace lvogel with your new user. Not sure if that works without user.

@vogella
Copy link
Author

vogella commented Apr 16, 2020

@chrisinmtown works great, thanks a bunch for your update!

@vogella vogella closed this as completed Apr 16, 2020
@chrisinmtown
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants