You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ahardy42 <ad...@cyberspaceroad.com> on 2018/10/29 15:11:35 UTC

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
hudson.remoting.ProxyException:
hudson.maven.MavenModuleSetBuild$MavenExecutionException:
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

	at
hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1391)


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.

Regards
Adam



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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org