[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15041327#comment-15041327 ] chibbe commented on MNG-5939: - Its not hidden in (in some parent pom)? Im able to reproduce it with: {code:xml} org.apache.maven.plugins maven-source-plugin 2.4 attach-sources jar org.apache.maven.plugins maven-source-plugin 2.4 jar {code} And in effective pom I get: {code:xml} maven-source-plugin 2.4 jar attach-sources jar {code} > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15041712#comment-15041712 ] Jason Mihalick commented on MNG-5939: - Again, thank you. Your question forced me to recheck my parent POMs, and, sure enough, I still had a left over configuration for the maven-source-plugin in one of my pluginManagement sections. Once I eliminated that and I released my child project, my release worked! So now I have confirmed your workaround and we are left to wonder if someone will investigate the potential source for the problem which I provided below. > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15037755#comment-15037755 ] chibbe commented on MNG-5939: - If it have both jar and jar-no-fork, it must be set by something in your super pom's etc.. The config I get it to work with is following, need to have the correct id. Run also into the same problem with javadoc's uploaded 2 times and failed so needed to have the same fix here as well. {code:xml} org.apache.maven.plugins maven-source-plugin 2.4 attach-sources jar org.apache.maven.plugins maven-javadoc-plugin 2.10.3 attach-javadocs package jar {code} > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15038493#comment-15038493 ] Jason Mihalick commented on MNG-5939: - Unfortunately, when I add your suggested configuration, it still doesn't work for me. The following is what results in my effective POM (mvn help:effective-pom): {code:xml} maven-source-plugin 2.4 jar attach-sources jar {code} and I still get the same results, which is maven attempting to upload the source jar twice. > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15035933#comment-15035933 ] Jason Mihalick commented on MNG-5939: - [~chibbe], thank you for pointing that out. It does solve the problem when doing a release, but you are right, we now lose the sources jar for SNAPSHOTs. What does your POM configuration look like for running the jar instead of jar-no-fork? Prior to posting my work around above, I tried to create a working configuration to run jar instead of jar-no-fork, but I could not get it to work correctly. In my experimentation, the effective POM still had both the jar and jar-no-fork goals in it. > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15036839#comment-15036839 ] Jason Mihalick commented on MNG-5939: - I believe the problem might be traced back to the following commit: {{maven-core/src/main/java/org/apache/maven/project/MavenProject.java}}, {{6cf9320}} The implementation of the {{addAttachedArtifact(Artifact)}} method changed from adding or replacing an artifact to just adding the artifact even if it already exists. [~jvanzyl] added a comment on the addAttachedArtifact method that the method was now deprecated, but no @deprecated annotation was added and the {{DefaultMavenProjectHelper}} calling class appears to not have been altered to adjust for the change. This may explain why I see this warning when running under Maven 3.2.1, but there is no warning under later versions: {noformat}build 24-Nov-2015 15:50:57[INFO] [WARNING] Artifact org.zzz:tep-core:java-source:sources:3.0.6 already attached to project, ignoring duplicate{noformat} > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15034192#comment-15034192 ] Jason Mihalick commented on MNG-5939: - We are having the same problem. I have posted a workaround on MSHADE-195 via *[this comment|https://issues.apache.org/jira/browse/MSHADE-195?focusedCommentId=15034132=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15034132]* Here is what I commented there: {quote} The following work-around is now getting us past this problem. (Thanks [~tsz] for the initial suggestion that a workaround was possible via maven-source-plugin configuration.) In my pom.xml, I added this to my pluginManagement section: {code:xml} maven-source-plugin 2.1.2 default none {code} The resulting effective pom (mvn help:effective-pom) then has this in the build/plugin section: {code:xml} maven-source-plugin 2.1.2 none jar-no-fork {code} which still results in the sources jar being produced, but attached only once instead of twice: {noformat} build 01-Dec-2015 12:09:55[INFO] [INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) > generate-sources @ tep-core >>> build 01-Dec-2015 12:09:55[INFO] [INFO] build 01-Dec-2015 12:09:55[INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-java-version) @ tep-core --- build 01-Dec-2015 12:09:55[INFO] [INFO] build 01-Dec-2015 12:09:55[INFO] [INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) < generate-sources @ tep-core <<< build 01-Dec-2015 12:09:55[INFO] [INFO] build 01-Dec-2015 12:09:55[INFO] [INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ tep-core --- build 01-Dec-2015 12:09:56[INFO] [INFO] Building jar: /appl/bamboo-home/xml-data/build-dir/131073/PUBS-TEP-PRE/target/checkout/target/tep-core-3.0.10-sources.jar build 01-Dec-2015 12:09:56[INFO] [INFO] build 01-Dec-2015 12:09:56[INFO] [INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ tep-core --- ... build 01-Dec-2015 12:10:17[INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ tep-core --- build 01-Dec-2015 12:10:17[INFO] [INFO] Installing /appl/bamboo-home/xml-data/build-dir/131073/PUBS-TEP-PRE/target/checkout/target/tep-core-3.0.10.jar to /appl/.m2/repository/org/zzz/tep-core/3.0.10/tep-core-3.0.10.jar build 01-Dec-2015 12:10:17[INFO] [INFO] Installing /appl/bamboo-home/xml-data/build-dir/131073/PUBS-TEP-PRE/target/checkout/pom.xml to /appl/.m2/repository/org/zzz/tep-core/3.0.10/tep-core-3.0.10.pom build 01-Dec-2015 12:10:17[INFO] [INFO] Installing /appl/bamboo-home/xml-data/build-dir/131073/PUBS-TEP-PRE/target/checkout/target/tep-core-3.0.10-sources.jar to /appl/.m2/repository/org/zzz/tep-core/3.0.10/tep-core-3.0.10-sources.jar build 01-Dec-2015 12:10:17[INFO] [INFO] Installing /appl/bamboo-home/xml-data/build-dir/131073/PUBS-TEP-PRE/target/checkout/target/tep-core-3.0.10-javadoc.jar to /appl/.m2/repository/org/zzz/tep-core/3.0.10/tep-core-3.0.10-javadoc.jar ... build 01-Dec-2015 12:10:17[INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ tep-core --- build 01-Dec-2015 12:10:17[INFO] [INFO] Uploading: https://developer.zzz.org/maven/content/repositories/pubs-cols-release/org/zzz/tep-core/3.0.10/tep-core-3.0.10.jar build 01-Dec-2015 12:10:17[INFO] [INFO] Uploaded: https://developer.zzz.org/maven/content/repositories/pubs-cols-release/org/zzz/tep-core/3.0.10/tep-core-3.0.10.jar (369 KB at 280.8 KB/sec) build 01-Dec-2015 12:10:17[INFO] [INFO] Uploading: https://developer.zzz.org/maven/content/repositories/pubs-cols-release/org/zzz/tep-core/3.0.10/tep-core-3.0.10.pom build 01-Dec-2015 12:10:18[INFO] [INFO] Uploaded: https://developer.zzz.org/maven/content/repositories/pubs-cols-release/org/zzz/tep-core/3.0.10/tep-core-3.0.10.pom (13 KB at 18.9 KB/sec) build 01-Dec-2015 12:10:18[INFO] [INFO] Downloading: https://developer.zzz.org/maven/content/repositories/pubs-cols-release/org/zzz/tep-core/maven-metadata.xml build 01-Dec-2015 12:10:18[INFO] [INFO] Downloaded: https://developer.zzz.org/maven/content/repositories/pubs-cols-release/org/zzz/tep-core/maven-metadata.xml (2 KB at 6.8 KB/sec) build 01-Dec-2015 12:10:18[INFO] [INFO] Uploading: https://developer.zzz.org/maven/content/repositories/pubs-cols-release/org/zzz/tep-core/maven-metadata.xml build 01-Dec-2015 12:10:19[INFO] [INFO] Uploaded: https://developer.zzz.org/maven/content/repositories/pubs-cols-release/org/zzz/tep-core/maven-metadata.xml (2 KB at 2.3 KB/sec) build 01-Dec-2015 12:10:19[INFO] [INFO] Uploading:
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15035402#comment-15035402 ] chibbe commented on MNG-5939: - I guess it will solve the problem when doing a release. But will there be any -sources.jar file built and deployed in a normal build (not running release build)? I tested to run the jar goal instead of jar-no-fork, and that also fixed the problem for us. > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15028424#comment-15028424 ] Joerg Schaible commented on MNG-5939: - Typically this has nothing to do with Maven, but with the parent POM you are using. > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15028536#comment-15028536 ] chibbe commented on MNG-5939: - As you can see in the foo.bar.zip there is no parent pom. The exact same code, but different behavior. > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15028678#comment-15028678 ] chibbe commented on MNG-5939: - The first version it was introduced was 3.2.3 two -sources.jar . older maven versions only creates one -sources.jar. > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15028777#comment-15028777 ] Joerg Schaible commented on MNG-5939: - You have configured the sources plugin to run two goals: jar and jar-no-fork. So Maven does what you have told. > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
[ https://issues.apache.org/jira/browse/MNG-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15028795#comment-15028795 ] chibbe commented on MNG-5939: - The reason with both 2 goals was only to easy be able to reproduce the problem. As you see in the foo.bar.zip/foo.bar/maven-3.2.1.log it only deploys 1 sources file and build is fine. In maven-3.3.9.log the exact same code is executed but here the build is failing. -- In our configuration we have only jar-no-fork goal. And when doing an release:perform it will create the sources as well[1]. So maven tries to deploy the source two times and it makes the build fail. If only defining the the jar goal[2], will also solve the issue. So question is.. Was it a bug before 3.2.3 that is now fixed or is it a bug that was introduced in 3.2.3? [1] - http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile [2] - https://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html > Problem doing release when sources are generate as well > --- > > Key: MNG-5939 > URL: https://issues.apache.org/jira/browse/MNG-5939 > Project: Maven > Issue Type: Bug >Affects Versions: 3.3.3, 3.3.9 > Environment: Ubuntu 12.04.5 LTS > Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; > 2014-02-14T18:37:52+01:00) > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T17:41:47+01:00) > Java version: 1.7.0_76, vendor: Oracle Corporation >Reporter: chibbe > Attachments: foo.bar.zip > > > If I specified that sources should be generated with jar-no-fork goal > https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html . > When doing a release with maven-release-plugin it will build the source again > when useReleaseProfile is true (use the release profile that adds sources and > javadocs to the released artifact > http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#useReleaseProfile). > The outcome is that it will run with both jar and jar-no-fork and generate > and deploy 2 -sources.jar artifacts, with same version. That makes the > release build fails. > > The same behavior could be reproduced when running both jar and jar-no-fork > goal between maven 3.2.1. and maven 3.3.9. > > Please find the logs for maven 3.2.1 and 3.3.9 in the foo.bar.zip > With maven 3.3.9 it uploads it 2 times : > Uploaded: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > (722 B at 15.3 KB/sec) > Uploading: > http://127.0.0.1:8081/nexus/content/repositories/releases/foo/bar/0.0.1/bar-0.0.1-sources.jar > 722/722 B -- This message was sent by Atlassian JIRA (v6.3.4#6332)