[jira] [Commented] (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2022-09-16 Thread J (Jira)


[ 
https://issues.apache.org/jira/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17605828#comment-17605828
 ] 

J commented on MJAR-138:


Any news on this?

> jar:test-jar is skipped when maven.test.skip=true
> -
>
> Key: MJAR-138
> URL: https://issues.apache.org/jira/browse/MJAR-138
> Project: Maven JAR Plugin
>  Issue Type: Improvement
>Affects Versions: 2.3.1
> Environment: jar:test-jar
>Reporter: Andrew Hughes
>Priority: Major
> Fix For: more-investigation
>
> Attachments: MJAR-138-maven-jar-plugin.patch
>
>
> 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 
> ...test
> 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 
> ...moduleA-test...test



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2021-05-26 Thread Peter Ivanov (Jira)


[ 
https://issues.apache.org/jira/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17351920#comment-17351920
 ] 

Peter Ivanov commented on MJAR-138:
---

+1 to resolving the problem on Maven side itself.

> jar:test-jar is skipped when maven.test.skip=true
> -
>
> Key: MJAR-138
> URL: https://issues.apache.org/jira/browse/MJAR-138
> Project: Maven JAR Plugin
>  Issue Type: Improvement
>Affects Versions: 2.3.1
> Environment: jar:test-jar
>Reporter: Andrew Hughes
>Priority: Major
> Fix For: more-investigation
>
> Attachments: MJAR-138-maven-jar-plugin.patch
>
>
> 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 
> ...test
> 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 
> ...moduleA-test...test



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2018-04-18 Thread Leonid Rozenblyum (JIRA)

[ 
https://issues.apache.org/jira/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16441985#comment-16441985
 ] 

Leonid Rozenblyum commented on MJAR-138:


I believe the issue should be solved in Maven core.

In case maven.test.skip = true, Maven shouldn't even try to resolve 
test dependencies

> jar:test-jar is skipped when maven.test.skip=true
> -
>
> Key: MJAR-138
> URL: https://issues.apache.org/jira/browse/MJAR-138
> Project: Maven JAR Plugin
>  Issue Type: Improvement
>Affects Versions: 2.3.1
> Environment: jar:test-jar
>Reporter: Andrew Hughes
>Priority: Major
> Fix For: more-investigation
>
> Attachments: MJAR-138-maven-jar-plugin.patch
>
>
> 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 
> ...test
> 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 
> ...moduleA-test...test



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2017-09-10 Thread Robert Scholte (JIRA)

[ 
https://issues.apache.org/jira/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16160395#comment-16160395
 ] 

Robert Scholte commented on MJAR-138:
-

There are a couple of plugin "listening" to this property:
* [compiler:testCompile 
skip|https://maven.apache.org/plugins/maven-compiler-plugin/testCompile-mojo.html#skip]
* [surefire:test 
skip|https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#skip]
* [jar:test-jar 
skip|https://maven.apache.org/plugins/maven-jar-plugin/test-jar-mojo.html#skip]

I don't know the complete history of this property, but I can imagine the 
following: if you don't want to run tests, no need to compile them nor to 
package them. It is not such a weird idea to have the property cause this as 
default behavior, but is it correct?

> jar:test-jar is skipped when maven.test.skip=true
> -
>
> Key: MJAR-138
> URL: https://issues.apache.org/jira/browse/MJAR-138
> Project: Maven JAR Plugin
>  Issue Type: Improvement
>Affects Versions: 2.3.1
> Environment: jar:test-jar
>Reporter: Andrew Hughes
> Fix For: more-investigation
>
> Attachments: MJAR-138-maven-jar-plugin.patch
>
>
> 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 
> ...test
> 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 
> ...moduleA-test...test



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2017-09-10 Thread Bisser Peshev (JIRA)

[ 
https://issues.apache.org/jira/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16160394#comment-16160394
 ] 

Bisser Peshev commented on MJAR-138:


Well, there's a workaround with Maven profiles. The test-jar dependencies will 
be declared only if maven.test.skip is not true:

{code:xml}
  
 

   maven.test.skip
   !true

 
 

   com.acme.project
   my-artifact
   test-jar
   ${project.version}
   test

 
  
{code}

Ugly, but at least works.


> jar:test-jar is skipped when maven.test.skip=true
> -
>
> Key: MJAR-138
> URL: https://issues.apache.org/jira/browse/MJAR-138
> Project: Maven JAR Plugin
>  Issue Type: Improvement
>Affects Versions: 2.3.1
> Environment: jar:test-jar
>Reporter: Andrew Hughes
> Fix For: more-investigation
>
> Attachments: MJAR-138-maven-jar-plugin.patch
>
>
> 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 
> ...test
> 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 
> ...moduleA-test...test



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2017-09-10 Thread Bisser Peshev (JIRA)

[ 
https://issues.apache.org/jira/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16160365#comment-16160365
 ] 

Bisser Peshev commented on MJAR-138:


Thank you for your response. Unfortunately, after adding the 
{color:#14892c}false{color} configuration, an empty jar was 
produced when maven.test.skip was true. Or rather, it only contained the 
manifest file, but no classes. This is not a solution.  :(

Yes, it's a maven-jar-plugin problem, because it doesn't create the test-jar. 
But Maven itself also takes part in the problem, because it enforces the 
dependencies on the test-jar, although they are not needed when maven.test.skip 
is true. But then again, probably it's not Maven's responsibility to decide 
which dependency is needed and which isn't, neither is it supposed to know 
about the maven.test.skip option.

I suppose the simplest solution would be for maven-jar-plugin to stop checking 
the value of maven.test.skip and let the surefire plugin worry about that 
option. So, maven-jar-plugin will _always_ generate the test-jar.

> jar:test-jar is skipped when maven.test.skip=true
> -
>
> Key: MJAR-138
> URL: https://issues.apache.org/jira/browse/MJAR-138
> Project: Maven JAR Plugin
>  Issue Type: Improvement
>Affects Versions: 2.3.1
> Environment: jar:test-jar
>Reporter: Andrew Hughes
> Fix For: more-investigation
>
> Attachments: MJAR-138-maven-jar-plugin.patch
>
>
> 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 
> ...test
> 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 
> ...moduleA-test...test



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2017-09-10 Thread Karl Heinz Marbaise (JIRA)

[ 
https://issues.apache.org/jira/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16160271#comment-16160271
 ] 

Karl Heinz Marbaise commented on MJAR-138:
--

First this is not related to the used Maven version it is related to the used 
the maven-jar-plugin version. Apart from that yes this is actually the case. 
You can bypass this by using the following configuration:
{code:xml}
  

  
maven-jar-plugin
XXX

  false

  

  
{code}


> jar:test-jar is skipped when maven.test.skip=true
> -
>
> Key: MJAR-138
> URL: https://issues.apache.org/jira/browse/MJAR-138
> Project: Maven JAR Plugin
>  Issue Type: Improvement
>Affects Versions: 2.3.1
> Environment: jar:test-jar
>Reporter: Andrew Hughes
> Fix For: more-investigation
>
> Attachments: MJAR-138-maven-jar-plugin.patch
>
>
> 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 
> ...test
> 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 
> ...moduleA-test...test



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2017-09-09 Thread Bisser Peshev (JIRA)

[ 
https://issues.apache.org/jira/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16160107#comment-16160107
 ] 

Bisser Peshev commented on MJAR-138:


We just encountered this issue in Maven 3.3.3. Our builds usually take over an 
hour, so, to save time, the sandbox builds always run with 
-Dmaven.test.skip=true. But because of this, the test-jar artifacts don't get 
created, yet each test-jar dependency is enforced (even though it's 
test-scoped, and even though maven.test.skip is true), so the build breaks.

I agree with the above comments that this is a bug and should be fixed. If 
-Dmaven.test.skip=true skips the creation of the test-jar artifact, it should 
also skip enforcing the dependencies on that tets-jar artifact.

> jar:test-jar is skipped when maven.test.skip=true
> -
>
> Key: MJAR-138
> URL: https://issues.apache.org/jira/browse/MJAR-138
> Project: Maven JAR Plugin
>  Issue Type: Improvement
>Affects Versions: 2.3.1
> Environment: jar:test-jar
>Reporter: Andrew Hughes
> Fix For: more-investigation
>
> Attachments: MJAR-138-maven-jar-plugin.patch
>
>
> 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 
> ...test
> 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 
> ...moduleA-test...test



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2016-09-26 Thread JIRA

[ 
https://issues.apache.org/jira/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15522647#comment-15522647
 ] 

Noël BARDELOT commented on MJAR-138:


Still an issue up to Maven 3.3.

In my opinion this is a bug : download of all dependencies using scope "test" 
should not be triggered when "-Dmaven.test.skip=true" is set.

> jar:test-jar is skipped when maven.test.skip=true
> -
>
> Key: MJAR-138
> URL: https://issues.apache.org/jira/browse/MJAR-138
> Project: Maven JAR Plugin
>  Issue Type: Improvement
>Affects Versions: 2.3.1
> Environment: jar:test-jar
>Reporter: Andrew Hughes
> Fix For: more-investigation
>
> Attachments: MJAR-138-maven-jar-plugin.patch
>
>
> 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 
> ...test
> 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 
> ...moduleA-test...test



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] Commented: (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2011-08-23 Thread Sofia Paiva (JIRA)

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

Sofia Paiva commented on MJAR-138:
--

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...scopetest/scopedependency
 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...artifactIdmoduleA-testartifactId...scopetest/scope/dependency

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




[jira] Commented: (MJAR-138) jar:test-jar is skipped when maven.test.skip=true

2010-09-04 Thread Benjamin Bentmann (JIRA)

[ 
http://jira.codehaus.org/browse/MJAR-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=234204#action_234204
 ] 

Benjamin Bentmann commented on MJAR-138:


{{maven.test.skip=true}} suppresses multiple things: test compilation, test 
execution and test jar packaging. The later was intentionally done as per 
MJAR-90.

Independently how this should be addressed in the future, for now a simple 
workaround is to use {{skipTests=true}} instead. This suppresses test execution 
only, but produces a proper test-jar which allows other modules to both 
properly resolve their dependencies and even compile against those.

 jar:test-jar is skipped when maven.test.skip=true
 -

 Key: MJAR-138
 URL: http://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...scopetest/scopedependency
 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...artifactIdmoduleA-testartifactId...scopetest/scope/dependency

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira