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

Method 'afterSessionStart' of Maven 3 lifecycle extension is not called when project is started in a Maven Project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None
    • - Jenkins 1.594
      - Maven Project Plugin 2.8

      I have written a Maven 3 lifecycle extension to generate a checksum of some files which need before validation of the pom(s).

      So I implemented the code in the method 'afterSessionStart' of my extension
      which gets called if I start the build on command line or when it is started in a
      'Invoke top-level Maven targets' build step.

      When I start it as a Maven project 'afterSessionStart' is never called and the build fails.

      I'm using this new feature of Maven 3.3.x to enable the extension only for one project:

      https://jira.codehaus.org/browse/MNG-5771

      If I look at the output I see that the project gets executed differently.

      In the Maven project it is

      [test-Clifford] $ /var/lib/build/tools/hudson.model.JDK/jdk1.8/bin/java -Xmx1024M -cp /var/lib/build/maven32-agent.jar:/opt/maven/apache-maven-3.3.3/boot/plexus-classworlds-2.5.2.jar:/opt/maven/apache-maven-3.3.3/conf/logging jenkins.maven3.agent.Maven32Main /opt/maven/apache-maven-3.3.3 /var/lib/build/slave.jar /var/lib/build/maven32-interceptor.jar /var/lib/build/maven3-interceptor-commons.jar 36242
      <===[JENKINS REMOTING CAPACITY]===>channel started
      Executing Maven:  -B -f /var/lib/build/workspace/test_Clifford/pom.xml clean verify -Dmaven.test.failure.ignore -Pexecute-pending-tests -PbuildTools --fail-never
      

      In the command line or build step it is:

      [test-Clifford] $ /opt/maven/apache-maven-3.3.3/bin/mvn clean verify -Dmaven.test.failure.ignore -Pexecute-pending-tests -PbuildTools --fail-never
      

            Unassigned Unassigned
            clifford_jenkins Clifford Sanders
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: