Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43714

withMaven thinks that "mvn test" generates a jar file causing a FileNotFoundException trying to archive it

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline-maven-plugin
    • None
    • pipeline-maven-plugin 2.0.2

      The "withMaven()' wrapper sees the "generated artifact" of "mvn test" as a file that can be archived and fingerprinted when it is just the folder "${project.build.output}.

      XML fragment of the MAven Event Spy report that is causing confusion

        <ExecutionEvent type="ProjectSucceeded" class="org.apache.maven.lifecycle.internal.DefaultExecutionEvent" _time="2017-04-19 23:39:04.293">
          <project baseDir="/path/to/workspace" file="/path/to/workspace/pom.xml" groupId="jenkins.mvn.test" name="mono-module-maven-app" artifactId="mono-module-maven-app" version="0.1-SNAPSHOT">
            <build sourceDirectory="/path/to/workspace/src/main/java" directory="/path/to/workspace/target"/>
          </project>
          <no-execution-found/>
          <artifact extension="jar" groupId="jenkins.mvn.test" artifactId="mono-module-maven-app" id="jenkins.mvn.test:mono-module-maven-app:jar:0.1-SNAPSHOT" type="jar" version="0.1-SNAPSHOT">
            <file>/path/to/workspace/target/classes</file>
          </artifact>
          <attachedArtifacts/>
        </ExecutionEvent>
      

            cleclerc Cyrille Le Clerc
            cleclerc Cyrille Le Clerc
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: