I am using the Maven (2.2.1) install-plugin (2.5.2) to install third party dependencies not available in the repository.
When the dependency has both a jar and a pom, install-plugin reads the pom file and sets the packaging, groupId, artifactId, and version so I don't need to specify them:
<execution>
<id>1</id>
<phase>validate</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>si/odm/jrules-engine/8.5.1/jrules-engine-8.5.1.jar</file>
<pomFile>si/odm/jrules-engine/8.5.1/jrules-engine-8.5.1.pom</pomFile>
</configuration>
</execution>
However, when the dependency has only a pom file, it forces me to specify the packaging, groupId, etc. manually:
<execution>
<id>2</id>
<phase>validate</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<packaging>pom</packaging>
<groupId>odm</groupId>
<artifactId>jrules-otherthing</artifactId>
<version>8.5.1</version>
<file>si/odm/jrules-otherthing/8.5.1/jrules-otherthing-8.5.1.pom</file>
</configuration>
</execution>
Is it possible to configure install-plugin to read the pom file when it is the only file being installed?
Being able to do this would make the configuration a great deal shorter and more readable.
I tried specifying the pom file in the <pomFile>
element without a <file>
element, but install-plugin insists that I must have a <file>
. I assume this isn't currently possible, but I wanted to ask here in case I missed something.