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

Run as Groovy Script stopped working after installing newest snapshot plugin #255

Closed
kovax opened this issue Jan 17, 2017 · 5 comments
Closed

Comments

@kovax
Copy link

kovax commented Jan 17, 2017

After I have updated to the new snapshot release I get the exception bellow whenever I try to run a groovy script:
Caught: java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.4.7 and you are trying to load version 2.4.8

I do not have any dependencies which use groovy 2.4.7, so do not understand why I get this error. So I have checked the generated launch configuration and it contains these lines which I believe wrong:

<listEntry value="/home/dev/.m2/repository/org/spockframework/spock-core/1.0-groovy-2.4/spock-core-1.0-groovy-2.4.jar"/>
<listEntry value="/home/dev/.m2/repository/org/codehaus/groovy/groovy-all/2.4.7/groovy-all-2.4.7.jar"/>

Unfortunately even if I remove those lines I get the same error.

My environment:
Eclipse Version: Neon.2 Release (4.6.2)
Build id: 20161208-0600
Groovy Eclipse Plugin: 2.9.2.xx-201701160312-e46

@eric-milles
Copy link
Member

eric-milles commented Jan 17, 2017

Have you restarted Eclipse after updating to the latest snapshot? Do you have a Maven project? If your project is bringing in Spock, it is likely bringing in groovy-all. You can add an excludes or remove Groovy from your .classpath.

@kovax
Copy link
Author

kovax commented Jan 17, 2017

I have restarted eclipse, of course, and I use maven. The actual project does not use spock, only a dependent one as a test dependency.

@eric-milles
Copy link
Member

eric-milles commented Jan 17, 2017

If you do not need Spock or its dependencies, you can add an exclusion to your project's dependency listing for that project.

@kovax
Copy link
Author

kovax commented Jan 17, 2017

I see now. This is very confusing that maven separates test dependencies but eclipse doe not. Thanks for the help.

@kovax kovax closed this as completed Jan 17, 2017
@eric-milles
Copy link
Member

That is a longstanding issue for Eclipse. Each project has one and only one classpath. I have used Checkstyle to enforce that main sources do not pull in classes intended for tests, but that is not a complete solution. And that does nothing for your particular case.

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

2 participants