[
https://issues.apache.org/jira/browse/MJAR-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17957173#comment-17957173
]
Matthias Bünger commented on MJAR-75:
-------------------------------------
This project has moved from Jira to GitHub Issues. This issue was migrated to
[apache/maven-jar-plugin#256|https://github.com/apache/maven-jar-plugin/issues/256].
> [PATCH] Wrong artifact type attached to the project by the test-jar goal
> -------------------------------------------------------------------------
>
> Key: MJAR-75
> URL: https://issues.apache.org/jira/browse/MJAR-75
> Project: Maven JAR Plugin (Moved to GitHub Issues)
> Issue Type: Bug
> Affects Versions: 2.0, 2.1, 2.2
> Environment: All
> Reporter: Piotr Tabor
> Assignee: John Dennis Casey
> Priority: Critical
> Fix For: 2.2
>
> Attachments: MJAR-75-core-integration-testing.diff,
> maven-jar-plugin-MJAR-75.diff
>
>
> The test-jar goal attaches to the project
> "org.apache.maven.its.it0121:model:jar" such a artifact:
> - org.apache.maven.its.it0121:model:*jar*:tests
> It should attach such an artifact:
> - org.apache.maven.its.it0121:model:*test-jar*:tests
> The wrong artifacts "naming" leads to MNG-2871 problem:
> The code does not work (because the strings are different:
> ------------------MavenProject:
> replaceWithActiveArtifact(...)---------------------------------------------
> ....
> Iterator itr = ref.getAttachedArtifacts().iterator();
> while(itr.hasNext()) {
> Artifact attached = (Artifact) itr.next();
> if(
> attached.getDependencyConflictId().equals(pluginArtifact.getDependencyConflictId())
> ) {
> ... (resolve as active's project) ...
> }
> ...
> -------------------------------------------------------------------------------------------------------------------------------------------
> pluginArtifact.getDependencyConflictId() is :
> org.apache.maven.its.it0121:model:*test-jar*:tests
> attached.getDependencyConflictId() is :
> org.apache.maven.its.it0121:model:*jar*:tests
> For test-case: look at test (it121) attached to:
> http://jira.codehaus.org/browse/MNG-2871
--
This message was sent by Atlassian Jira
(v8.20.10#820010)