title: maven-metadata.xml not generated in artifactory with jenkins
body: <p>I´m not sure how does POM in maven works correctly. Here is the thing.
  I was able to create a job with Jenkins Which  build &amp; publish a WAR from java code, to Artifactory using maven (with artifactory plug in) with job number at the end to keep versioning .Then a maven-metadata.xml is created on artifactory as showed below. </p>
  
  <p><a href="https://i.stack.imgur.com/I7RFX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I7RFX.png" alt="enter image description here"></a></p>
  
  <p>After that on a second job,  with build with parameters option in jenkins  I choose artifact and deploy the number of war I want like this</p>
  
  <p><a href="https://i.stack.imgur.com/euqHN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/euqHN.png" alt="enter image description here"></a></p>
  
  <p>Now I wanted to do the same but using maven to ZIP just a folder and publish to artifactory. I was able  to do that with maven assembly plug in successfully using a POM and a zip.xml file. Thing is that the metadata.xml in artifactory is not generated. It only generates the zip file (also a jar) but not metadata.xml which is needed so I can use jenkins to choose Zip file. here is image from artifactory of Zip generated and error I receive from jenkins:</p>
  
  <p><a href="https://i.stack.imgur.com/d2hOa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d2hOa.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/ESo1O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ESo1O.png" alt="enter image description here"></a></p>
  
  <p>So question is, how does POM generates this metadata.xml file in artifactory? I used same pom of Java project tha was used to build and publish WAR, except that  on   part I included maven assembly plugin to zip file, and zip  was successfully uploaded and created as I showed on image . Here is POM and zip.xml</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
          &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.grey&lt;/groupId&gt;
      &lt;artifactId&gt;go&lt;/artifactId&gt;
      &lt;version&gt;${releaseVersion}&lt;/version&gt;
  
      &lt;name&gt;go&lt;/name&gt;
      &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
  
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.0.4.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
  
      &lt;properties&gt;
          &lt;releaseVersion&gt;0.0.0-SNAPSHOT&lt;/releaseVersion&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;  
  
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
              &lt;version&gt;1.16.20&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.microsoft.azure&lt;/groupId&gt;
              &lt;artifactId&gt;azure-documentdb&lt;/artifactId&gt;
              &lt;version&gt;1.5.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;version&gt;2.8.0&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
  
      &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.2-beta-5&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;descriptors&gt;
                      &lt;descriptor&gt;assembly/zip.xml&lt;/descriptor&gt;
                  &lt;/descriptors&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;make-assembly&lt;/id&gt; &lt;!-- this is used for inheritance merges --&gt;
                      &lt;phase&gt;package&lt;/phase&gt; &lt;!-- append to the packaging phase. --&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;single&lt;/goal&gt; &lt;!-- goals == mojos --&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
     &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>And here is the zip.xml</p>
  
  <pre><code>&lt;assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"&gt;
  &lt;baseDirectory&gt;/&lt;/baseDirectory&gt;
      &lt;formats&gt;
          &lt;format&gt;zip&lt;/format&gt;
      &lt;/formats&gt;
      &lt;fileSets&gt;
          &lt;fileSet&gt;
              &lt;directory&gt;static&lt;/directory&gt;
              &lt;outputDirectory&gt;/&lt;/outputDirectory&gt;
          &lt;/fileSet&gt;
      &lt;/fileSets&gt;
  &lt;/assembly&gt;
  </code></pre>
  
  <p>Please need help since I´m dealing with this and is not quite clear. I´m not a developer so my knowledge in java and  pom file and maven is not one of the bests.  thanks for your help!</p>
  
  <p>This is jenkinfile to upload code to artifactory. same as used for Java app.
  Only thin changed was repo name in artifactory and the command <strong>"package"</strong> instead of <strong>"clean install"</strong></p>
  
  <pre><code>node {
      def server  = Artifactory.server 'azure-artifactory'
      def rtMaven = Artifactory.newMavenBuild()
      def buildInfo //= rtMaven.run pom: 'pom.xml', goals: 'clean install -D releaseVersion="${BUILD_NUMBER}"'
  
      stage ('Code Checkout') {
                  git branch: 'devopstest',
                      credentialsId: '3e3c8889-0dcc-4b4d-bae1-ac140894d292',
                      url: 'ssh://git@bitbucket.org/xxxxx/xxxxxxx'
              }
  
      stage('Artifactory Configuration') {
          // Tool name from Jenkins configuration
          //rtMaven.tool = 'Apache Maven 3.0.5'
          env.MAVEN_HOME = '/usr/share/maven/'
          // Set Artifactory repositories for dependencies resolution and artifacts deployment.
          rtMaven.deployer server: server, releaseRepo: 'go-fe-maven-2'
  
      }
  
       stage('Maven build') {
          //buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean install -D releaseVersion="${BUILD_NUMBER}"'
          buildInfo = rtMaven.run pom: 'pom.xml', goals: 'package -D releaseVersion="${BUILD_NUMBER}"'
        //  rtMaven.deployer.deployArtifacts buildInfo
      }
  
  stage('Publish build info') {
         // server.publishBuildInfo buildInfo
         server.publishBuildInfo buildInfo
      }
  
  // Wipe the workspace so we are building completely clean
          deleteDir()
  }
  </code></pre>