[ 
https://jira.codehaus.org/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=276752#comment-276752
 ] 

Sofia Paiva edited comment on MJAR-138 at 8/23/11 5:12 AM:
-----------------------------------------------------------

Hi,

I have the same problem.

If i use {{maven.test.skip=true}}, the dependency is not found and the build 
fails. If i use {{skipTests=true}}, the jar-test is produced, but 
integration-tests are executed.

I agree with Andrew that a test dependency shouldn't fail the build.

      was (Author: sofiap):
    Hi,

I have the same problem.

If i use {{maven.test.skip=true}}, the dependency is not found and the 
compilation fails. If i use {{skipTests=true}}, the jar-test is produced, but 
integration-tests are executed.

I agree with Andrew that a test dependency shouldn't fail the compilation.
  
> jar:test-jar is skipped when maven.test.skip=true
> -------------------------------------------------
>
>                 Key: MJAR-138
>                 URL: https://jira.codehaus.org/browse/MJAR-138
>             Project: Maven 2.x JAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.3.1
>         Environment: jar:test-jar
>            Reporter: Andrew Hughes
>
> Not sure if this is a bug or improvement...
> Example:
> * ./pom.xml
> * ./moduleA/pom.xml
> * ./moduleB/pom.xml
> Situation:
> * moduleA produces moduleA-1.2.3-test.jar with the jar:test-jar goal
> * moduleB consumes moduleA-1.2.3-test.jar as a 
> <dependency>...<scope>test</scope><dependency>
> Problem:
> * When -Dmaven.test.skip=true the moduleA-1.2.3-test.jar is never built.
> * Then when moduleB tries to build, it's moduleA-1.2.3-test.jar dependency is 
> unresolved. FAIL! Even with -Dmaven.test.skip=true this will fail.
> You might argue that this is a bug with dependency resolution with 
> -Dmaven.test.skip=true - should a missing dependency @ test scope really fail 
> the build??? It probably should - which is why the bug is submitted here :)
> I've no idea what could be done to fix this either?
> ---
> p.s. for anyone with this bug the only workaround I can suggest is running 
> another module...
> ./moduleA-test/pom.xml
> and have 
> <dependency>...<artifactId>moduleA-test<artifactId>...<scope>test</scope></dependency>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to