I'm including a dependency from a custom Maven repository. The JAR I want to include is at the URL
http://mvn.example.org/repositories/org/apache/foo/foo/1.2.3-4/1.2.3-4-h2.jar
(Not the -h2
at the end; it's important later.)
I've included http://mvn.example.org/repositories
as a <repository>
in my settings.xml
, and set up my project's pom.xml
to include
<dependencies>
<dependency>
<groupId>org.apache.foo</groupId>
<artifactId>foo</artifactId>
<version>1.2.3-4</version>
</dependency>
...
</dependencies>
However, when I try to mvn install
with this setup, I get
Downloading: http://mvn.example.org/repositories/org/apache/foo/foo/1.2.3-4/1.2.3-4.jar
immediaqtely followed by a BUILD FAILURE
, because that's not the URL of the JAR. Note that the actual URL, at the top of this question, has a -h2
suffix to the version number, not present in the folder version number.
Seeing at the default assumption appears to be that the filanme of teh JAR matches the folder name, how can I tell Maven to pull a JAR whose version number filename is different from the containing folder filename?