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

Product missing groovy dependencies #238

Closed
jhnesk opened this issue Oct 7, 2021 · 5 comments
Closed

Product missing groovy dependencies #238

jhnesk opened this issue Oct 7, 2021 · 5 comments

Comments

@jhnesk
Copy link

jhnesk commented Oct 7, 2021

With Gretty 3.0.6 when I try to run the built product it fails with exception:

Error: Could not find or load main class org.akhikhl.gretty.GrettyStarter
Caused by: java.lang.NoClassDefFoundError: groovy/lang/GroovyObject

I have tried this with all versions between 3.0.1 and 3.0.6. Both 3.0.5 and 3.0.6 crashes, but they get different but similar exceptions.

Steps to reproduce:

  1. Clone https://github.com/gretty-gradle-plugin/gretty-sample
  2. Run this on the sample project do make sure it works as expected.
    $ ./gradlew buildProduct && ./build/output/gretty-sample/run.sh
  3. Change gretty version:
    $ sed -i 's/3.0.1/3.0.6/' build.gradle
  4. Test with step 2 again and it crashes
    $ ./gradlew buildProduct && ./build/output/gretty-sample/run.sh

I'm downgrading to 3.0.4 now and unfortunately I don't have time to investigate further or solve this and submit a PR at the moment.
Hopefully someone more familiar with Gretty can solve the issue faster. I have not yet tried 4.0

@boris-petrov
Copy link
Member

@jhnesk - thank you for the report! This gretty-sample project is pretty old, I'll update it to be more up-to-date. As for the bug-report: I believe there really is a problem.

@f4lco - I think this line is missing something similar like getCurrentGroovy(project) from this commit. What do you think?

@jhnesk
Copy link
Author

jhnesk commented Oct 9, 2021

@boris-petrov Yes, I understand gretty-sample seems more or less unmaintained, I got this error in my own project, but used gretty-sample to make it easy for you to reproduce.
Thank you for looking into the issue.

@f4lco
Copy link
Collaborator

f4lco commented Oct 17, 2021

@boris-petrov That seems very reasonable. I'll have a look at the reproducer and the exact use-cases of the method you mentioned.
@jhnesk thank you for your report!

@boris-petrov
Copy link
Member

@jhnesk - @f4lco fixed the issue in a PR which I've merged. I will try to create a release in the next few days and will let you know to try it out on your project. Thanks for the report!

f4lco added a commit that referenced this issue Oct 18, 2021
@boris-petrov
Copy link
Member

@jhnesk - sorry for the delay. I've released 3.0.7 with the fix from @f4lco. Thanks to both of you for the issue report and the fix! I've also updated the gretty-sample project which now seems to work fine.

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

3 participants