jira-importer commented on issue #205:
URL: 
https://github.com/apache/maven-source-plugin/issues/205#issuecomment-2959556655

   **[Slawomir 
Jaranowski](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=slawekjaranowski)**
 commented
   
   I can reproduce ... master on `commons-cli`
   
   ```java
   mvn clean package
   
   [INFO] --- source:3.2.1:jar-no-fork (create-source-jar) @ commons-cli ---
   [INFO] Building jar: 
/Users/slawomir.jaranowski/repos/apache/commons-cli/target/commons-cli-1.6.0-SNAPSHOT-sources.jar
   [INFO] 
   [INFO] --- source:3.2.1:test-jar-no-fork (create-source-jar) @ commons-cli 
---
   [INFO] Building jar: 
/Users/slawomir.jaranowski/repos/apache/commons-cli/target/commons-cli-1.6.0-SNAPSHOT-test-sources.jar
   ```
   
   and with release profile we have:
   
   ```java
   mvn clean package -P apache-release
   
   [INFO] --- source:3.2.1:jar-no-fork (attach-sources) @ commons-cli ---
   [INFO] Building jar: 
/Users/slawomir.jaranowski/repos/apache/commons-cli/target/commons-cli-1.6.0-SNAPSHOT-sources.jar
   [INFO] 
   [INFO] --- source:3.2.1:jar-no-fork (create-source-jar) @ commons-cli ---
   [WARNING] artifact 
'commons-cli:commons-cli:java-source:sources:1.6.0-SNAPSHOT' already attached, 
replacing previous instance
   [INFO] 
   [INFO] --- source:3.2.1:test-jar-no-fork (create-source-jar) @ commons-cli 
---
   [INFO] Building jar: 
/Users/slawomir.jaranowski/repos/apache/commons-cli/target/commons-cli-1.6.0-SNAPSHOT-test-sources.jar
   [INFO] 
   [INFO] --- source:3.2.1:test-jar (attach-test-sources) @ commons-cli ---
   [WARNING] artifact 
'commons-cli:commons-cli:java-source:test-sources:1.6.0-SNAPSHOT' already 
attached, replacing previous instance
   ```
   
   you execute twice in `3.2.1` we see warning ... but in `3.3.0` we will have 
an error ...
   
   ```
   mvn clean package -P apache-release -Dcommons.source-plugin.version=3.3.0
   
   [INFO] --- source:3.3.0:jar-no-fork (attach-sources) @ commons-cli ---
   [INFO] Building jar: 
/Users/slawomir.jaranowski/repos/apache/commons-cli/target/commons-cli-1.6.0-SNAPSHOT-sources.jar
   [INFO] 
   [INFO] --- source:3.3.0:jar-no-fork (create-source-jar) @ commons-cli ---
   [ERROR] We have duplicated artifacts attached.
   ```
   
   so it is not a bug in `m-source-p` - simply you try execute the same goal 
twice
   
   execution - `attach-test-sources` is defined in commons-parent
   but `attach-sources` is defined in mavem-apache-parent
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to