GERONIMO-6590 Fix

2018/01/23

The Problem

This is the story of how I wasted three days fighting a pom file, Artifactory, and Apache itself.

While trying to add activemq-pool to a project at work, I was greeted with this message in Artifactory:

Failed to transform pom file: Failed to read POM for 'org/apache/geronimo/specs/specs/1.1/specs-1.1.pom': expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</developers>\\n    `\\n    <p... @91:7) .

Upon further searching, I learned of GERONIMO-6590.

Somehow, a stray “`” was introduced in to the pom file of a dependent of a dependent of activemq-pool, causing it to be malformed. It seems that most XML parsers are willing to ignore a stray character. The XML parser that Artifactory uses, for better or worse, is not one of those parsers.

The Solution

To fix GERONIMO-6590 locally, do the following:

Add the following to your pom.xml. The first dependency does not need to be activemq-pool, but could be any dependency that has a child dependency of specs:1.1. Don’t worry if it’s dependent of a dependent. See Maven’s exclusion rules for more information.

...
<dependency>
	<groupId>org.apache.activemq</groupId>
	<artifactId>activemq-pool</artifactId>
	Add a comment to this line
	<version>5.15.2</version>
	<exclusions>
		<exclusion>
			<!-- Ignore the built in version, and use a newer version -->
			<groupId>org.apache.geronimo.specs</groupId>
			<artifactId>geronimo-jta_1.0.1B_spec</artifactId>
		</exclusion>
	</exclusions>
</dependency>
<!-- Since this relies on org.apache.geronimo.specs:spec-1.1, Artifactory won't pull it in. -->
<!-- So we bump this dependency from 1.1 to 1.1.1 -->
<dependency>
	<groupId>org.apache.geronimo.specs</groupId>
	<artifactId>geronimo-jta_1.0.1B_spec</artifactId>
	<version>1.1.1</version>
</dependency>
...