Friday, 31 August 2007

Why does Artifactory detect your Maven settings.xml

I've been given the job of setting up a build environment at work, and
one of the things I'm setting up is a local Maven repository, and to
have an easy way of maintaining it. I'm testing out Artifactory
(, and I've come across
what seems to be a bug. In the Config instructions, it only mentions
artifactory.config.xml. There is no mention of any config files
outside the Artifactory install directory.

It seems that if you install Artifactory on a machine that already has
Maven installed on it, it will use the settings.xml for that Maven
installation. This however means that if there are any errors in that
local settings.xml - ie, invalid XML, etc - then Artifactory will not

A few of the things I tried that didn't work:

- delete [ARTIFACTORY_HOME]/data directory
- renamed old Artifactory directory and reinstalled from zip file
- cleaned out C:/Temp

In the console output I noticed this error:

Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: in comment
after two dashes (--) next character must be > not - (position: START_TAG seen .
..</nonProxyHosts>\r\n---... @15:4)
at org.codehaus.plexus.util.xml.pull.MXParser.parseComment(
at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(

Which would indicate something wrong with an XML config file. I had
settings.xml open and I remembered I'd had this problem before with
XML files.

I removed the dashes in the XML comment, restarted Artifactory, and
w000t, it was working again.

No comments: