You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris <sh...@yahoo.com> on 2008/10/22 01:29:26 UTC
How to install special jar from within pom?
I'm creating a jar file for my project, and then massaging it in Ant
before installing it in the repository. (Basically, I'm removing some
things and then obfuscating).
Trouble is, the maven-install-plugin is giving me warnings:
DEPRECATED: Binding aggregator mojos to lifecycle phases in the POM is
considered dangerous.
This feature has been deprecated. Please adjust your POM files accordingly.
Offending mojo:
org.apache.maven.plugins:maven-install-plugin:2.2:install-file
Here's the relevant section of the pom:
<plugin>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>install-obfuscated-jar</id>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>${basedir}/target/${project.artifactId}-${project.version}-obs.jar</file>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<classifier>obs</classifier>
<packaging>jar</packaging>
</configuration>
</execution>
</executions>
</plugin>
What am I doing wrong?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to install special jar from within pom?
Posted by Brett Porter <br...@apache.org>.
It isn't necessary to use install-file in the lifecycle - you can
instead use the buildhelper mojo to attach the generated file to the
list of artifacts to be deployed, and the default install/deploy will
take care of it.
Cheers,
Brett
On 22/10/2008, at 10:29 AM, Chris wrote:
> I'm creating a jar file for my project, and then massaging it in Ant
> before installing it in the repository. (Basically, I'm removing
> some things and then obfuscating).
>
> Trouble is, the maven-install-plugin is giving me warnings:
>
> DEPRECATED: Binding aggregator mojos to lifecycle phases in the POM
> is considered dangerous.
> This feature has been deprecated. Please adjust your POM files
> accordingly.
>
> Offending mojo:
>
> org.apache.maven.plugins:maven-install-plugin:2.2:install-file
>
>
> Here's the relevant section of the pom:
>
> <plugin>
> <artifactId>maven-install-plugin</artifactId>
> <executions>
> <execution>
> <id>install-obfuscated-jar</id>
> <phase>install</phase>
> <goals>
> <goal>install-file</goal>
> </goals>
> <configuration>
> <file>${basedir}/target/${project.artifactId}-${project.version}-
> obs.jar</file>
> <groupId>${project.groupId}</groupId>
> <artifactId>${project.artifactId}</artifactId>
> <version>${project.version}</version>
> <classifier>obs</classifier>
> <packaging>jar</packaging>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> What am I doing wrong?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org