Uploaded image for project: 'Maven JAR Plugin'
  1. Maven JAR Plugin
  2. MJAR-75

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0, 2.1, 2.2
    • 2.2
    • None
    • None
    • All
    • Patch

    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

      Attachments

        1. maven-jar-plugin-MJAR-75.diff
          2 kB
          Piotr Tabor
        2. MJAR-75-core-integration-testing.diff
          13 kB
          Piotr Tabor

        Issue Links

          Activity

            People

              jdcasey John Dennis Casey
              ptabor Piotr Tabor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: