Specify alternate extensions.xml?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Specify alternate extensions.xml?

I see from mvn --help that there's a way to specify alternate settings.xml or
toolchain.xml files.

Is there an equivalent for extensions.xml?

My use-case is on Jenkins. The Jenkins maven and freestyle job types seems
to pluck the pom.xml out of the project without any reference to anything
else (esp. extensions.xml)

In my case, the Jenkins job will crash because I'm using yaml in my pom with
the io.takari.polyglot:polyglot-yaml extension - the Jenkins jobs seem to be
oblivious to the extensions.xml file. I'm not totally sure about this but
that's what it looks like from the exception:

Parsing POMs
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were
encountered while processing the POMs:
[FATAL] Non-parseable POM
/home/jenkins/workspace/adam/adam-maven-plugin/pom.yml: only whitespace
content allowed before start tag and not m (position: START_DOCUMENT seen
m... @1:1)  @ line 1, column 1


The work-around I'm using at the moment is to create Jenkins pipeline jobs
instead of simple Jenkins maven jobs, so that Jenkins launches mvn in a full
shell (I think), the difference being that stand-alone mvn will then read
the extensions.xml.

I have thought of putting io.takari.polyglot:polyglot-yaml.jar into
maven/lib/ext - but I'm not sure the Jenkins sysadmins in my organisation
would want to do that.

My hope is that there is a command line option that will be passed to maven
through the Jenkins/hudson plugin that will instruct the maven core to fetch
that extensions.xml.


Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]