maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Mihalick (JIRA)" <>
Subject [jira] [Commented] (MNG-5939) Problem doing release when sources are generate as well
Date Wed, 02 Dec 2015 23:10:11 GMT


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/}}, {{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:
>             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:
> If I specified that sources should be generated with jar-no-fork goal
> 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
> 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
> With maven 3.3.9 it uploads it 2 times :
> Uploaded:
(722 B at 15.3 KB/sec)
> Uploading:
> 722/722 B

This message was sent by Atlassian JIRA

View raw message