Maven JAR Plugin
  1. Maven JAR Plugin
  2. MJAR-75

[PATCH] Wrong artifact type attached to the project by the test-jar goal

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1, 2.2
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      All
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      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

        Issue Links

          Activity

          Hide
          Piotr Tabor added a comment -

          Patch

          Show
          Piotr Tabor added a comment - Patch
          Hide
          Piotr Tabor added a comment -

          Dedicated IT for this issue attached.

          Show
          Piotr Tabor added a comment - Dedicated IT for this issue attached.
          Hide
          John Casey added a comment -

          Applied, thanks.

          Show
          John Casey added a comment - Applied, thanks.

            People

            • Assignee:
              John Casey
              Reporter:
              Piotr Tabor
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: