Karaf
  1. Karaf
  2. KARAF-1853

Attached kar deploys to a different snapshot build number than the main artifact

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.5
    • Fix Version/s: 2.2.10, 2.3.0, 3.0.0
    • Component/s: karaf-kar
    • Labels:
    • Environment:

      maven 2.2.1

      Description

      Using the standard maven config (packaging=pom) for features-maven-plugin:create-kar, the build number for the kar artifact is 35 instead of 34 used for the POM and features.xml artifacts. This wreaks havoc with other projects that depend on this snapshot because they attempt to download the POM of version 35 and fail.

      Maven 2.2.1 excerpt:

      [INFO] [deploy:deploy {execution: default-deploy}]
      [INFO] Retrieving previous build number from snapshots
      Uploading: http://[nexus]/[artifact]/1.0.0-SNAPSHOT/[artifact]-1.0.0-20120921.172953-34.pom
      3K uploaded  ([artifact]-1.0.0-20120921.172953-34.pom)
      [INFO] Retrieving previous metadata from snapshots
      [INFO] Uploading repository metadata for: 'artifact [group]:[artifact]'
      [INFO] Retrieving previous metadata from snapshots
      [INFO] Uploading repository metadata for: 'snapshot [group]:[artifact]:1.0.0-SNAPSHOT'
      [INFO] Retrieving previous build number from snapshots
      Uploading: http://[nexus]/[artifact]/1.0.0-SNAPSHOT/[artifact]-1.0.0-20120921.172953-34-features.xml
      10K uploaded  ([artifact]-1.0.0-20120921.172953-34-features.xml)
      [INFO] Retrieving previous build number from snapshots
      Uploading: http://[nexus]/[artifact]/1.0.0-SNAPSHOT/[artifact]-1.0.0-20120921.172953-35.kar
      25753K uploaded  ([artifact]-1.0.0-20120921.172953-35.kar)
      
      1. KARAF-1853.patch
        0.9 kB
        Anthony Wood

        Activity

        Anthony Wood created issue -
        Hide
        Anthony Wood added a comment - - edited

        Attached patch for CreateKarMojo.java to fix the issue.

        Show
        Anthony Wood added a comment - - edited Attached patch for CreateKarMojo.java to fix the issue.
        Anthony Wood made changes -
        Field Original Value New Value
        Attachment KARAF-1853.patch [ 12546075 ]
        Jean-Baptiste Onofré made changes -
        Assignee Jean-Baptiste Onofré [ jbonofre ]
        Jean-Baptiste Onofré made changes -
        Fix Version/s 2.2.10 [ 12322541 ]
        Fix Version/s 2.3.0 [ 12320554 ]
        Fix Version/s 3.0.0 [ 12316040 ]
        Hide
        Jean-Baptiste Onofré added a comment -

        Your patch breaks the kar archetype:

        [INFO] [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.0-SNAPSHOT:features-create-kar (default-features-create-kar) on project kar: Execution default-features-create-kar of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.0-SNAPSHOT:features-create-kar failed: For artifact

        {archetype.it:kar:1.0-SNAPSHOT:kar}

        : An attached artifact must have a different ID than its corresponding main artifact. -> [Help 1]
        [INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.0-SNAPSHOT:features-create-kar (default-features-create-kar) on project kar: Execution default-features-create-kar of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.0-SNAPSHOT:features-create-kar failed: For artifact

        {archetype.it:kar:1.0-SNAPSHOT:kar}

        : An attached artifact must have a different ID than its corresponding main artifact.

        I gonna fix that.

        Show
        Jean-Baptiste Onofré added a comment - Your patch breaks the kar archetype: [INFO] [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.0-SNAPSHOT:features-create-kar (default-features-create-kar) on project kar: Execution default-features-create-kar of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.0-SNAPSHOT:features-create-kar failed: For artifact {archetype.it:kar:1.0-SNAPSHOT:kar} : An attached artifact must have a different ID than its corresponding main artifact. -> [Help 1] [INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.0-SNAPSHOT:features-create-kar (default-features-create-kar) on project kar: Execution default-features-create-kar of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.0-SNAPSHOT:features-create-kar failed: For artifact {archetype.it:kar:1.0-SNAPSHOT:kar} : An attached artifact must have a different ID than its corresponding main artifact. I gonna fix that.
        Show
        Jean-Baptiste Onofré added a comment - Fixed on karaf-2.3.x: http://svn.apache.org/viewvc?view=revision&revision=1396981
        Show
        Jean-Baptiste Onofré added a comment - Fixed on karaf-2.2.x: http://svn.apache.org/viewvc?view=revision&revision=1397002
        Show
        Jean-Baptiste Onofré added a comment - Fixed on trunk: http://svn.apache.org/viewvc?view=revision&revision=1397063
        Jean-Baptiste Onofré made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Anthony Wood
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development