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

M2 extra steps plugin post step executed before the build

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • m2-extra-steps-plugin
    • None
    • Hudson 1.381, M2 extra steps 1.1.3

      When adding some post steps for a Maven 2 build, they are executed before the build.

      Output from the log:
      > [Project_Trunk] $ /bin/sh -xe /tmp/hudson4332229457250043200.sh
      > + echo '[INFO] Prebuild step'

      This works ok, it's a pre build step.

      > [trunk] $ /home/axhudson/tools/maven/apache-maven-2.2.1/bin/mvn -Dmaven.repo.local=/home/axhudson/hudson/workspace/Project_Trunk/.repository - B -U -e com.axway.maven2.plugins:axway-arti-staging-plugin:1.1.1:stage -DdeployList -Dintegration -Dwebliv

      This doesn't, it's the post build step.

      Of course, later on this happens:
      org.apache.maven.lifecycle.LifecycleExecutionException: /home/axhudson/hudson/workspace/Project_Trunk/trunk/all-project/patcher/target/patcher-3.7.0-SNAPSHOT-proguard.jar not found.
      Since the post build step needs a build artifact.

      The relevant config.xml section:
      <hudson.plugins.m2extrasteps.M2ExtraStepsWrapper>
      <preBuildSteps>
      <hudson.tasks.Shell>
      <command>echo "[INFO] Prebuild step"</command>
      </hudson.tasks.Shell>
      </preBuildSteps>
      <postBuildSteps>
      <hudson.tasks.Maven>
      <targets>-B -U -e com.axway.maven2.plugins:axway-arti-staging-plugin:1.1.1:stage -DdeployList -Dintegration -Dwebliv</targets>
      <mavenName>MAVEN_221</mavenName>
      <usePrivateRepository>true</usePrivateRepository>
      </hudson.tasks.Maven>
      <hudson.tasks.Shell>
      <command>${JAVA_16_HOME}/bin/java -jar ${JYTHON}/jython.jar ${DEPLOY_SCRIPT}</command>
      </hudson.tasks.Shell>
      </postBuildSteps>
      <runIfResult>success</runIfResult>
      </hudson.plugins.m2extrasteps.M2ExtraStepsWrapper>

      Any other debug information needed?
      Thanks.

            abayer Andrew Bayer
            ccaraivan Costin Caraivan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: