maven-users mailing list archives

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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message