You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2019/12/21 02:00:01 UTC
[jira] [Closed] (MNG-5969) Multiple times attaching the same
artifact should fail the build
[ https://issues.apache.org/jira/browse/MNG-5969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Elliotte Rusty Harold closed MNG-5969.
--------------------------------------
> Multiple times attaching the same artifact should fail the build
> ----------------------------------------------------------------
>
> Key: MNG-5969
> URL: https://issues.apache.org/jira/browse/MNG-5969
> Project: Maven
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1.1, 3.2.1, 3.2.2, 3.2.3, 3.2.5, needing-scrub-3.4.0-fallout
> Reporter: Karl Heinz Marbaise
> Priority: Minor
>
> If i take a look at [MNG-5939|MNG-5939] and use the example project and test it with the current version of Maven on master (f467d9142fa6c928bdae25253350915728fef286) i will get the following:
> {noformat}
> [INFO] --- maven-source-plugin:2.4:jar (attach-sources) @ bar ---
> [INFO] Building jar: /Users/kama/Downloads/foo.bar/target/bar-0.0.1-sources.jar
> [INFO]
> [INFO] --- maven-source-plugin:2.4:jar-no-fork (attach-sources) @ bar ---
> [INFO] Building jar: /Users/kama/Downloads/foo.bar/target/bar-0.0.1-sources.jar
> [INFO] Replaced artifact foo:bar:java-source:sources:0.0.1.
> [INFO]
> {noformat}
> First the previous behaviour (Maven 3.0.5) was to emit a {{WARNING}} which is not the case anymore. At the moment it only creates a simple output:
> {noformat}
> [INFO] Replaced artifact foo:bar:java-source:sources:0.0.1.
> {noformat}
> which is not enough.
> Furthermore I'm the opinion that in this case the build should be broken, cause this build is wrongly configured (twice executions of maven-source-plugin without changing the classifier it could also be several executions of other plugins).
> Maven 3.1.1, 3.2.1, 3.2.2, will ignore it completely without any message nor a warning etc.
> Maven 3.2.3, 3.2.5 will produce no warning but will attach the artifacts twice times {{-sources}} which would fail a release like this:
> {noformat}
> [INFO] Installing /Users/kama/Downloads/foo.bar/target/bar-0.0.1-sources.jar to /Users/kama/.m2/repository/foo/bar/0.0.1/bar-0.0.1-sources.jar
> [INFO] Installing /Users/kama/Downloads/foo.bar/target/bar-0.0.1-sources.jar to /Users/kama/.m2/repository/foo/bar/0.0.1/bar-0.0.1-sources.jar
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)