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

Does not work in gradle multi project #1

Open
iNikem opened this issue Feb 11, 2015 · 2 comments
Open

Does not work in gradle multi project #1

iNikem opened this issue Feb 11, 2015 · 2 comments

Comments

@iNikem
Copy link

iNikem commented Feb 11, 2015

I have a gradle multi project and trying to run test target from one of the subprojects using this plugin. My tests fail because they don't see classes from dependent subproject. This dependency is expressed by compile project(':agent')

eu.plumbr.portal.web.ping.PingControllerTest > Ping FAILED
    java.lang.NoClassDefFoundError: eu/plumbr/agent/http/PingAction
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2585)
        at java.lang.Class.getDeclaredConstructors(Class.java:1906)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
        at eu.plumbr.portal.web.ping.PingControllerTest.Ping(PingControllerTest.groovy:15)

        Caused by:
        java.lang.ClassNotFoundException: eu.plumbr.agent.http.PingAction
            at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
            ... 5 more
@iNikem iNikem changed the title Does not in gradle multi project Does not work in gradle multi project Feb 11, 2015
@iNikem
Copy link
Author

iNikem commented Feb 11, 2015

I have solved this issue by adding volumes << ["$rootDir":rootDir]. I believe you should by default add mapping for rootDir, not for project dir

@pedjak
Copy link
Owner

pedjak commented Mar 30, 2015

Good catch, would you like to submit the patch?

jdeppe-pivotal pushed a commit to jdeppe-pivotal/gradle-dockerized-test-plugin that referenced this issue Oct 26, 2018
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