maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From motes motes <mort.mo...@gmail.com>
Subject Cannot resolve project test dependency in eclipse
Date Mon, 10 Dec 2012 09:28:09 GMT
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message