If you're using m2e this question should probably go to the m2e user mailing list. It's not a generic Maven question as I guess it works from command-line?
/Anders On Mon, Dec 10, 2012 at 10:28 AM, motes motes <[email protected]> wrote: > I have a project A that creates a test artifact using the maven-jar-plugin > > http://maven.apache.org/plugins/maven-jar-plugin/usage.html > > I have another project B that have an application that needs some of > the tests classes from A so I add a dependency on the test artifact: > > <dependency> > <groupId>com.mygroup</groupId> > <artifactId>A</artifactId> > <type>test-jar</type> > <!-- <scope>test</scope> --> > <!-- <scope>runtime</scope> --> > <version>1.0.0-SNAPSHOT</version> > </dependency> > > But when I run the application in B I keep getting > > java.lang.NoClassDefFoundError > > on the test classes from A. If I close project A in eclipse it works > though - I assume that it resolves from the binary test artifact in > .m2. How do I configure maven to resolve test dependencies inside > eclipse? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
