Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.580.3
      Windows Server 2008 R2
      Maven 3.3.3 automatically installed from Apache
      Maven Integration plugin 2.11
    • Similar Issues:

      Description

      It seems that the maven (in a maven project) is not picking up .mvn/extensions.xml beside the executed pom.xml.

      Executed from the windows command line the project builds fine.

      Some testing with command line maven showed that the .mvn folder needs to be in the directory where the mvn command is executed.
      mvn -f somesubdirecotry_with_.mvn does not work
      I believe mvn is not actually executed in the workspace on jenkins.

      http://takari.io/2015/03/19/core-extensions.html
      http://wiki.eclipse.org/Tycho/Release_Notes/0.24

        Attachments

          Issue Links

            Activity

            Hide
            jbochenski Jakub Bochenski added a comment -

            Arnaud Héritier I know MavenSpy is an extension. Still I'd appreciate a clear answer to this:
            Does pipeline-maven-plugin have official support Maven Core extensions (ones added by the user, not MavenSpy)?

            Show
            jbochenski Jakub Bochenski added a comment - Arnaud Héritier I know MavenSpy is an extension. Still I'd appreciate a clear answer to this: Does pipeline-maven-plugin have official support Maven Core extensions (ones added by the user, not MavenSpy)?
            Hide
            aheritier Arnaud Héritier added a comment -

            Not tested myself Jakub Bochenski

            Not sure if Cyrille Le Clerc did it

            But with my limited knowledge of this plugin I don't see why it couldn't work. Using -Dmaven.ext.class.path shouldn't interfere with others extensions loaded from the POM, .m2/extensions.xml, Maven's lib/ext

            Reading the maven code (cc Hervé Boutemy, Stephen Connolly) the Spy extension is loaded independently

            https://github.com/apache/maven/blob/master/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java

            Show
            aheritier Arnaud Héritier added a comment - Not tested myself Jakub Bochenski Not sure if Cyrille Le Clerc did it But with my limited knowledge of this plugin I don't see why it couldn't work. Using -Dmaven.ext.class.path shouldn't interfere with others extensions loaded from the POM, .m2/extensions.xml, Maven's lib/ext Reading the maven code (cc Hervé Boutemy , Stephen Connolly ) the Spy extension is loaded independently https://github.com/apache/maven/blob/master/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Jakub Bochenski Maven core extensions seem to work with withMaven. 

             Evidence:

            node {
                withMaven(maven: "maven-3.5.2"){
                    git "https://github.com/takari/core-extensions-example.git"
                    sh "mvn package"
                }
            }

            In the build logs, you will see "Using the SmartBuilder implementation with a thread count of 8"

            ...
            + mvn package
            ----- withMaven Wrapper script -----
            Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/home/ubuntu/jenkins-aws-home/workspace/tests/JENKINS-30058-maven-core-extensions@tmp/withMavenb24b7dd9/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/home/ubuntu/jenkins-aws-home/workspace/tests/JENKINS-30058-maven-core-extensions@tmp/withMavenb24b7dd9" 
            Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T07:58:13Z)
            Maven home: /home/ubuntu/jenkins-aws-home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.5.2
            Java version: 1.8.0_141, vendor: Oracle Corporation
            Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
            Default locale: en_US, platform encoding: UTF-8
            OS name: "linux", version: "3.13.0-135-generic", arch: "amd64", family: "unix"
            [jenkins-maven-event-spy] INFO generate /home/ubuntu/jenkins-aws-home/workspace/tests/JENKINS-30058-maven-core-extensions@tmp/withMavenb24b7dd9/maven-spy-20171122-093258-25279878962038760639.log.tmp ...
            [INFO] Scanning for projects...
            [INFO] 
            [INFO] Using the SmartBuilder implementation with a thread count of 8
            [INFO] 
            [INFO] ------------------------------------------------------------------------
            [INFO] Building core-extensions-example 0.1.0-SNAPSHOT
            [INFO] ------------------------------------------------------------------------
            [INFO] 
            ...
            
            Show
            cleclerc Cyrille Le Clerc added a comment - Jakub Bochenski  Maven core extensions seem to work with withMaven.   Evidence: node { withMaven(maven: "maven-3.5.2" ){ git "https: //github.com/takari/core-extensions-example.git" sh "mvn package " } } In the build logs, you will see " Using the SmartBuilder implementation with a thread count of 8 " ... + mvn package ----- withMaven Wrapper script ----- Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/home/ubuntu/jenkins-aws-home/workspace/tests/JENKINS-30058-maven-core-extensions@tmp/withMavenb24b7dd9/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/home/ubuntu/jenkins-aws-home/workspace/tests/JENKINS-30058-maven-core-extensions@tmp/withMavenb24b7dd9" Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T07:58:13Z) Maven home: /home/ubuntu/jenkins-aws-home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.5.2 Java version: 1.8.0_141, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.13.0-135-generic", arch: "amd64", family: "unix" [jenkins-maven-event-spy] INFO generate /home/ubuntu/jenkins-aws-home/workspace/tests/JENKINS-30058-maven-core-extensions@tmp/withMavenb24b7dd9/maven-spy-20171122-093258-25279878962038760639.log.tmp ... [INFO] Scanning for projects... [INFO] [INFO] Using the SmartBuilder implementation with a thread count of 8 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building core-extensions-example 0.1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] ...
            Hide
            jbochenski Jakub Bochenski added a comment -
            Show
            jbochenski Jakub Bochenski added a comment - Cyrille Le Clerc thanks!
            Hide
            shahriar Shahriar Robbani added a comment -

            Cyrille Le Clerc Hi, it is working for pom-less builds?

            Please see the last comment of Drik: http://blog.vogella.com/2015/12/15/pom-less-tycho-builds-for-structured-environments/

            I think the pomless build for Jenkins maven project plugin is broken for ages. I don't know if this will be really solved or not.

            Show
            shahriar Shahriar Robbani added a comment - Cyrille Le Clerc Hi, it is working for pom-less builds? Please see the last comment of Drik: http://blog.vogella.com/2015/12/15/pom-less-tycho-builds-for-structured-environments/ I think the pomless build for Jenkins maven project plugin is broken for ages. I don't know if this will be really solved or not.

              People

              • Assignee:
                Unassigned
                Reporter:
                chris_mh3 chris_mh3
              • Votes:
                16 Vote for this issue
                Watchers:
                23 Start watching this issue

                Dates

                • Created:
                  Updated: