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

M2 extra steps plugin post step executed before the build

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Component/s: m2-extra-steps-plugin
    • Labels:
      None
    • Environment:
      Hudson 1.381, M2 extra steps 1.1.3
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          ccaraivan Costin Caraivan created issue -
          ccaraivan Costin Caraivan made changes -
          Field Original Value New Value
          Description When adding some post steps for a Maven 2 build, they are executated 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 &quot;[INFO] Prebuild step&quot;</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.

          When adding some post steps for a Maven 2 build, they are executated 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 &quot;[INFO] Prebuild step&quot;</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.

          ccaraivan Costin Caraivan made changes -
          Description When adding some post steps for a Maven 2 build, they are executated 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 &quot;[INFO] Prebuild step&quot;</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.

          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 &quot;[INFO] Prebuild step&quot;</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.

          evernat evernat made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Open [ 1 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 138132 ] JNJira + In-Review [ 187859 ]

            People

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

              Dates

              Created:
              Updated:
              Resolved: