I have a simple maven plugin which in turn depends on parent pom file. The parent pom file has ten (10 number of) 3rd party jar dependencies which have been installed in my local repo using the following command.
mvn install:install-file -Dfile=foo.jar -DgroupId=com.foo.bar -DartifactId=foo1.jar -Dversion=1.1.0.0 -Dpackaging=jar
Similarly I have installed all the other 9 jars to my local repo. This is the uber pom.xml file.
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.foo.bar</groupId>
<artifactId>maven-uber-pom</artifactId>
<packaging>pom</packaging>
<version>1.1.0.0</version>
<name>maven-uber-pom</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.foo.bar</groupId>
<artifactId>foo1.jar</artifactId>
<version>1.0.0.0</version>
</dependency>
<dependency>
<groupId>com.foo.bar</groupId>
<artifactId>foo2.jar</artifactId>
<version>1.0.0.0</version>
</dependency>
<dependency>
<groupId>com.foo.bar</groupId>
<artifactId>foo3.jar</artifactId>
<version>1.0.0.0</version>
</dependency>
<dependency>
<groupId>com.foo.bar</groupId>
<artifactId>foo4.jar</artifactId>
<version>1.0.0.0</version>
</dependency>
:
:
</dependencies>
I am trying to reference this uber pom in my plugin's pom.xml file by the following:
<project>
<parent>
<groupId>com.foo.bar</groupId>
<artifactId>maven-uber-pom</artifactId>
<version>1.1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.foo.bar</groupId>
<artifactId>foo-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>1.1.0.0</version>
<name>foo bar plugin</name>
<url>http://maven.apache.org</url>
</project>
After this I try installing my plugin using the pom.xml file by
mvn install <command>
Maven tries to download the 3rd party artifact dependencies from central repo http://repo1.maven.org/maven2 and subsequently fails. As there is no artifact which such co-ordinates which can be found in the central repo.
I have also tried using the uber-pom as a plugin dependency since I was desperate. Any ideas?