5 Mar 2012 04:18
[jetty-user] [Jetty Maven Plugin] Not pulling in Test scope dependencies when useTestScope is true
Nathan Schile <nathan.schile <at> gmail.com>
2012-03-05 03:18:39 GMT
2012-03-05 03:18:39 GMT
I have the plugin configured to pull in test classes and dependencies[1], however it doesn't seem to be pulling in my test dependencies. I am receiving a NoClassDefFoundError on the class from a test dependency, if I switch the dependency to a scope of compile, it works fine. My use case is that I have a jar that contains JAX-RS resources. I am using the Jersey Maven Plugin to do integration testing using embedded Jetty. I have a web.xml in /src/test/webapp/WEB-INF/, and have test dependencies that mock out some services. The mock services are only found when they are pulled in using a "compile" scope. I would however like these dependencies to have a scope of "test" since they are only used for testing. Any ideas? [1] useTestScope http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin#Configuring_additional_parameters <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>8.1.0.v20120127</version> <executions> <execution> <id>start-jetty</id> <phase>pre-integration-test</phase> <goals> <goal>run</goal> </goals>(Continue reading)
RSS Feed