You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Aleksey Didik <di...@magenta-technology.ru> on 2010/03/29 15:16:01 UTC

Maven resolve test dependencies even -Dmaven.test.skip=true

Hello everybody!

*Breifly:*
One of company projects have met old problem when Maven resolve test-jar 
dependency (scope - test), even tests was skipped (include compilation). 
Do you have any information about this issue? May be some  bypass route 
exists?

*All:*
One of projects have module A and module B.
Module B depends on test-jar of module A and have dependency:

|<dependency>
   <groupId>com.cc</groupId>
   <artifactId>Module A</artifactId>
   <version>${mx.version}</version>
   <type>test-jar</type>
   <scope>test</scope>
</dependency>|


When tests are skipped, build failed with dependency resolution.
We use to skip tests /-Dmaven.test.skip=true/. I try to use 
/<skip>true</skip>/ in surefire configuration, it doesn't help.
May be you know some ways to solve this problem?

Best regards,
Aleksey Didik.


Re: Maven resolve test dependencies even -Dmaven.test.skip=true

Posted by Wayne Fay <wa...@gmail.com>.
> One of company projects have met old problem when Maven resolve test-jar
> dependency (scope - test), even tests was skipped (include compilation). Do
> you have any information about this issue? May be some  bypass route exists?

Use a profile to add (or not) the dependency to the build.

Maven tries to resolve all dependencies before doing any building.
Even if you are skipping test phase, it still needs/wants to validate
that dependency is available.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org