• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • maven-plugin
    • None
    • Jenkins 1.580.3
      Windows Server 2008 R2
      Maven 3.3.3 automatically installed from Apache
      Maven Integration plugin 2.11

      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

          [JENKINS-30058] Support Maven Core Extensions

          chris_mh3 created issue -
          chris_mh3 made changes -
          Environment Original: Jenkins 1.580.3
          Windows Server 2008 R2
          Maven 3.3.3 automatically installed from Apache
          New: Jenkins 1.580.3
          Windows Server 2008 R2
          Maven 3.3.3 automatically installed from Apache
          Maven Integration plugin 2.11

          Michael Scharp added a comment - - edited

          This is a fairly big issue that jenkins doesn't support a feature of maven. Any updates on this?

          It also doesn't work on an RHEL server or Ubuntu server with apache-maven-3.3.3 manually installed.

          Michael Scharp added a comment - - edited This is a fairly big issue that jenkins doesn't support a feature of maven. Any updates on this? It also doesn't work on an RHEL server or Ubuntu server with apache-maven-3.3.3 manually installed.

          Marco Descher added a comment -

          This is quite frustrating ... just started to use pomless tycho builds and now they don't work out on Jenkins It seems, that it is even not possible to manually load the core extension such as to use the feature at all ....

          Is there any time plan when this will be fixed?

          Thanks a lot guys!!

          Marco Descher added a comment - This is quite frustrating ... just started to use pomless tycho builds and now they don't work out on Jenkins It seems, that it is even not possible to manually load the core extension such as to use the feature at all .... Is there any time plan when this will be fixed? Thanks a lot guys!!

          Dirk Fauth added a comment -

          I played around on this from a users perspective. Here are my results:

          1. I installed Jenkins on my local Windows machine and started it via WAR file. I configured my local Maven installation (MAVEN_HOME) and run a pom-less Tycho build (using Maven Core Extensions). The build worked fine. I could see that the mvn.cmd was called.

          2. I tried the same on our company build server, which is a Linux server. There we used at first the option that Maven is installed from Apache by Jenkins. That failed because the Maven Core Extensions are not loaded. Then we tried to use a local Maven installation by setting MAVEN_HOME. But that also failed. We noticed that Maven is started via org.codehaus.plexus.classworlds.launcher.Launcher.

          3. We tried to execute the Maven build using a Shell Script and called "mvn clean verify -f <path-to-pom.xml>" ... that worked out. So my assumption is that there is something wrong with the org.codehaus.plexus.classworlds.launcher.Launcher. Although I don't know what it is exactly.

          Dirk Fauth added a comment - I played around on this from a users perspective. Here are my results: 1. I installed Jenkins on my local Windows machine and started it via WAR file. I configured my local Maven installation (MAVEN_HOME) and run a pom-less Tycho build (using Maven Core Extensions). The build worked fine. I could see that the mvn.cmd was called. 2. I tried the same on our company build server, which is a Linux server. There we used at first the option that Maven is installed from Apache by Jenkins. That failed because the Maven Core Extensions are not loaded. Then we tried to use a local Maven installation by setting MAVEN_HOME. But that also failed. We noticed that Maven is started via org.codehaus.plexus.classworlds.launcher.Launcher. 3. We tried to execute the Maven build using a Shell Script and called "mvn clean verify -f <path-to-pom.xml>" ... that worked out. So my assumption is that there is something wrong with the org.codehaus.plexus.classworlds.launcher.Launcher. Although I don't know what it is exactly.

          Dirk Fauth added a comment -

          I have to correct myself. In our build system there is also a Artifactory plugin installed. I accidentially used the Maven build from that plugin. That one fails with the usage of org.codehaus.plexus.classworlds.launcher.Launcher.

          After I changed that to use the Maven integration plugin ("Invoke top-level Maven targets") the build works fine.

          Note that I am using a freestyle project and not a Maven project. From my experience the Maven project type is not very stable.

          Dirk Fauth added a comment - I have to correct myself. In our build system there is also a Artifactory plugin installed. I accidentially used the Maven build from that plugin. That one fails with the usage of org.codehaus.plexus.classworlds.launcher.Launcher. After I changed that to use the Maven integration plugin ("Invoke top-level Maven targets") the build works fine. Note that I am using a freestyle project and not a Maven project. From my experience the Maven project type is not very stable.

          I could make it work by creating a pom.xml for every project in the multi-module build.
          ...not so nice because I wanted to avoid having pom and manifest.mf/plugin.xml, but at least the build works again

          There is a tycho-pomgenerator-plugin that can be used to create the missing pom.xml with just one command.
          And there is another that helps to keep version numbers in sync

          After that the build worked in Jenkins and with mvn -f ./subdir/pom.xml

          Christian Goos added a comment - I could make it work by creating a pom.xml for every project in the multi-module build. ...not so nice because I wanted to avoid having pom and manifest.mf/plugin.xml, but at least the build works again There is a tycho-pomgenerator-plugin that can be used to create the missing pom.xml with just one command. And there is another that helps to keep version numbers in sync After that the build worked in Jenkins and with mvn -f ./subdir/pom.xml

          Dirk Fauth added a comment -

          That doesn't make sense. The issue reported is that maven extensions doesn't work. And therefore pom-less Tycho doesn't work. Adding pom files again can't be the solution.
          I have found out that the issue is related to the Maven build plugin. Using the freestyle project template it works fine.

          Dirk Fauth added a comment - That doesn't make sense. The issue reported is that maven extensions doesn't work. And therefore pom-less Tycho doesn't work. Adding pom files again can't be the solution. I have found out that the issue is related to the Maven build plugin. Using the freestyle project template it works fine.

          chris_mh3 added a comment -

          The freestyle build does work for me too as a workaround.

          chris_mh3 added a comment - The freestyle build does work for me too as a workaround.

          +1

          Any ETA when this feature is going to be delivered?

          Yuriy Zaplavnov added a comment - +1 Any ETA when this feature is going to be delivered?

            Unassigned Unassigned
            chris_mh3 chris_mh3
            Votes:
            16 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated: