Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6229

karaf-maven-plugin (>= 4.2.2) deploy/install zip twice

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.2.2, 4.2.3, 4.2.4
    • 4.3.0, 4.2.5
    • None
    • None
      • maven 3.5
      • karaf 4.2.4
      • jdk 8
      • built with jenkins in docker (FROM maven:3.5-jdk-8)

    Description

      Hi, this issue appeared in karaf 4.2.2 as reported by another user on the mailing list ( http://karaf.922171.n3.nabble.com/karaf-maven-plugin-in-4-2-2-installs-zip-twice-tt4054677.html ). 

      Starting from v4.2.2, karaf-maven-plugin deploy the zip twice. We have a jenkins pipeline which invokes a simple mvn deploy

      It causes the jenkins pipeline to fail as we prevent reupload in our nexus for this repository. 

       

      [INFO] Uploading to nexus.ourcompany.com: https://nexus.ourcompany.com/repository/ourcompany-snapshot/com/ourcompany/pluginframework/pluginframework-distribution/1.0-SNAPSHOT/pluginframework-distribution-1.0-20190405.075929-1.zip
      [INFO] Uploaded to nexus.ourcompany.com: https://nexus.ourcompany.com/repository/ourcompany-snapshot/com/ourcompany/pluginframework/pluginframework-distribution/1.0-SNAPSHOT/pluginframework-distribution-1.0-20190405.075929-1.zip (34 MB at 31 MB/s)
      [INFO] Uploading to nexus.ourcompany.com: https://nexus.ourcompany.com/repository/ourcompany-snapshot/com/ourcompany/pluginframework/pluginframework-distribution/1.0-SNAPSHOT/pluginframework-distribution-1.0-20190405.075929-1.pom
      [INFO] Uploaded to nexus.ourcompany.com: https://nexus.ourcompany.com/repository/ourcompany-snapshot/com/ourcompany/pluginframework/pluginframework-distribution/1.0-SNAPSHOT/pluginframework-distribution-1.0-20190405.075929-1.pom (6.4 kB at 399 kB/s)
      [INFO] Uploading to nexus.ourcompany.com: https://nexus.ourcompany.com/repository/ourcompany-snapshot/com/ourcompany/pluginframework/pluginframework-distribution/1.0-SNAPSHOT/pluginframework-distribution-1.0-20190405.075929-1.tar.gz
      [INFO] Uploaded to nexus.ourcompany.com: https://nexus.ourcompany.com/repository/ourcompany-snapshot/com/ourcompany/pluginframework/pluginframework-distribution/1.0-SNAPSHOT/pluginframework-distribution-1.0-20190405.075929-1.tar.gz (34 MB at 40 MB/s)
      [INFO] Uploading to nexus.ourcompany.com: https://nexus.ourcompany.com/repository/ourcompany-snapshot/com/ourcompany/pluginframework/pluginframework-distribution/1.0-SNAPSHOT/pluginframework-distribution-1.0-20190405.075929-1.zip
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 14.356 s
      [INFO] Finished at: 2019-04-05T07:59:32Z
      [INFO] ------------------------------------------------------------------------
      [INFO] [jenkins-event-spy] Generated /jenkins/workspace/ginframework-distribution_master@tmp/withMavend27fdff2/maven-spy-20190405-075917-7112864694918170040998.log
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) on project pluginframework-distribution: ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact com.ourcompany.pluginframework:pluginframework-distribution:zip:1.0-20190405.075929-1 from/to nexus.ourcompany.com (https://nexus.ourcompany.com/repository/ourcompany-snapshot/): Failed to transfer file https://nexus.ourcompany.com/repository/ourcompany-snapshot/com/ourcompany/pluginframework/pluginframework-distribution/1.0-SNAPSHOT/pluginframework-distribution-1.0-20190405.075929-1.zip with status code 400 -> [Help 1]
      

      Following the advices at https://stackoverflow.com/questions/28407831/maven-maven-deploy-plugin-always-upload-twice/31173127#31173127 and http://karaf.922171.n3.nabble.com/karaf-maven-plugin-in-4-2-2-installs-zip-twice-tt4054677.html, we have edited our pom.xml for this repo, and added

       <attach>false</attach>

      In the repository configuration. now the pom looks like 

              <plugins>
                  ...
                  <plugin>
                      <groupId>org.apache.karaf.tooling</groupId>
                      <artifactId>karaf-maven-plugin</artifactId>
                      <configuration>
                          ...
                          <attach>false</attach>
                          ...

      Now the build is successful. However only the zip and pom are uploaded, and not the tar.gz.

      I wonder how to fix this so we get tar.gz and zip uploaded to nexus ? 

       

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              MorganGeek Morgan Wattiez
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: