-
Bug
-
Resolution: Unresolved
-
Blocker
-
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
- is related to
-
JENKINS-44057 Option to Disable Parsing pom in jenkins during maven build.
-
- Open
-
- relates to
-
JENKINS-28629 Fix Apache Maven 3.3 support
-
- Resolved
-
- links to
The problem is documented here and in
JENKINS-28629and the explanation a bit complex due to the confusion between the 2 issues.A maven extension can be loaded historically from the the POM (https://maven.apache.org/guides/mini/guide-using-extensions.html) or from ${MAVEN_DIST}/lib/ext
But since 3.3.x it can be loaded from ${maven.multiModuleProjectDirectory}/.mvn/extensions.xml
( http://takari.io/2015/03/19/core-extensions.html ) which allows to use the extension to read a POM in a non native format and avoids to modify the maven distribution
Additionally a bug in Maven ( https://issues.apache.org/jira/browse/MNG-5889 fixed in 3.5.x see
JENKINS-28629) didn't allow to use the .mvn folder properlyBecause the parsing of POMs isn't done by Maven itself, extensions are loaded if they aren't defined in the POM. It could probably possible to implement the load of extensions from ${maven.multiModuleProjectDirectory}/.mvn/extensions.xml but not sure from ${MAVEN_DIST}/lib/ext
In any case I'm not sure it will be transparent enough to allow for exemple the usage of things like Polyglot : https://github.com/takari/polyglot-maven