• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • artifactory-plugin
    • None

      Jenkins ver. 1.444
      Jenkins Artifactory Plugin 2.0.5
      Maven 3.0.3

      We have a very simple Maven project setup. We are running "clean package verify emma:emma" and then using the Artifactory plugin to publish to a snapshot repository in Artifactory.

      We simlpy want the basic pom.xml and jar deployed, but only the JAR is being deployed. If I use the standard 'mvn deploy' or the "Deploy artifacts to Maven repository", it works as expected.

      Do we need to configure something special in the "Include Patterns"?

      Thanks.

          [JENKINS-12950] pom.xml not deploying to Artifactory

          Jerry Thome added a comment -

          I stumbled across someone else who ran into this issue. The work-around was to run 'mvn install'. Somehow, this created the right chain of events for the upload to work correctly.

          It seems to me, that as long as the JAR and POM are in the standard maven locations, the deploy should work correctly (from a user experience perspective). I did not see any documentation which directed Maven users to first run an install. I guess, if this plug-in is strategically replacing the 'deploy', then executing the 'install' might make sense... but it wasn't intuitive.

          Just looking for comment. Thanks.

          Jerry Thome added a comment - I stumbled across someone else who ran into this issue. The work-around was to run 'mvn install'. Somehow, this created the right chain of events for the upload to work correctly. It seems to me, that as long as the JAR and POM are in the standard maven locations, the deploy should work correctly (from a user experience perspective). I did not see any documentation which directed Maven users to first run an install. I guess, if this plug-in is strategically replacing the 'deploy', then executing the 'install' might make sense... but it wasn't intuitive. Just looking for comment. Thanks.

          Diane Cochran added a comment -

          I'm also running into this issue and would be very leery of running mvn install before deploying jobs simply because we're running about 100 projects across 500 jobs or so and need to make sure that the versions that we're building with match what the entire engineering team is using. If mvn install worked but the upload failed for some reason, we could end up out of sync and have in the past when we were doing installs.

          Does anyone know any other work arounds? I don't seem to be running into the issue using maven 3.0.1 but any build I move to 3.0.4 has this issue and I desperately need to move up to correct an issue in 3.0.1.

          Diane Cochran added a comment - I'm also running into this issue and would be very leery of running mvn install before deploying jobs simply because we're running about 100 projects across 500 jobs or so and need to make sure that the versions that we're building with match what the entire engineering team is using. If mvn install worked but the upload failed for some reason, we could end up out of sync and have in the past when we were doing installs. Does anyone know any other work arounds? I don't seem to be running into the issue using maven 3.0.1 but any build I move to 3.0.4 has this issue and I desperately need to move up to correct an issue in 3.0.1.

          Raman Gupta added a comment -

          I have the same issue. I posted on the Artifactory mailing list (http://forums.jfrog.org/Jenkins-Artifactory-deploy-project-POM-in-multi-module-build-td7578470.html) but no response. I would actually be quite happy if "install" worked, but as Diane reported, using install does not work with 3.0.4.

          Raman Gupta added a comment - I have the same issue. I posted on the Artifactory mailing list ( http://forums.jfrog.org/Jenkins-Artifactory-deploy-project-POM-in-multi-module-build-td7578470.html ) but no response. I would actually be quite happy if "install" worked, but as Diane reported, using install does not work with 3.0.4.

          I have the same problem, this happens for all versions after 3.0.1

          What I can see is that on 3.0.1 the Artifactory deploy happens (or is at least printed) last in the trace but on the 3.0.2+ it happens before "BUILD SUCCESS" is printed.

          This might also be related to builds where you attach extra artifacts (but I'm currently not sure if it is so).

          Magnus Sandberg added a comment - I have the same problem, this happens for all versions after 3.0.1 What I can see is that on 3.0.1 the Artifactory deploy happens (or is at least printed) last in the trace but on the 3.0.2+ it happens before "BUILD SUCCESS" is printed. This might also be related to builds where you attach extra artifacts (but I'm currently not sure if it is so).

          Neil Hunt added a comment -

          Don't have a large sample size of evidence but I will add that when doing mvn package I was not getting .pom deployed with my artifacts, but when I changed it to mvn install I get it. Using maven 3.1

          Neil Hunt added a comment - Don't have a large sample size of evidence but I will add that when doing mvn package I was not getting .pom deployed with my artifacts, but when I changed it to mvn install I get it. Using maven 3.1

          Rotem added a comment -

          In the "Deploy artifacts to Artifactory" plugin, I first put in the 'Include Patterns' **/*.jar, and then it only deploy the jars without any xml.
          After reading the link in Raman's comment, I cleared the 'Include Patterns' field and all seems work find. xml files are created as it should.
          I don't know if it plugin's bug, or a "feature".

          Rotem added a comment - In the "Deploy artifacts to Artifactory" plugin, I first put in the 'Include Patterns' ** / *.jar, and then it only deploy the jars without any xml. After reading the link in Raman's comment, I cleared the 'Include Patterns' field and all seems work find. xml files are created as it should. I don't know if it plugin's bug, or a "feature".

          To avoid the chance of leftovers from previous builds getting deployed our jobs use a pre-build step to call a script to just delete the local maven repository on the build nodes. Easiest way to be sure.

          John McCullough added a comment - To avoid the chance of leftovers from previous builds getting deployed our jobs use a pre-build step to call a script to just delete the local maven repository on the build nodes. Easiest way to be sure.

          Nikolas Falco added a comment - - edited

          @jmmccullough you should modify all current jobs. Then deleting local maven repository means download artifacts again as many times (that consume time and bandswitch).

          Nikolas Falco added a comment - - edited @ jmmccullough you should modify all current jobs. Then deleting local maven repository means download artifacts again as many times (that consume time and bandswitch).

            eyalbe Eyal Ben Moshe
            gpthome Jerry Thome
            Votes:
            18 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated: