You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Larry Suto <la...@gmail.com> on 2009/07/22 21:55:04 UTC
Issues with maven jar plugin and artifact naming
- <#> Hi I am building a jar and a war in in the same pom and
having some naming issues. I have a separate execution for the jar plugin so
the jar is generated in addition to the war. When I run mvn install the
produced jar gets renamed to IPEsvc-2.4-agent.jar. I would like it to
actually be named IPESvc-agent-2.4.jar.
Is there any way to do this? I have enclosed the relevent pom sections.
Thanks
L Suto
<project xmlns="*http://maven.apache.org/POM/4.0.0*" xmlns:xsi="*
http://www.w3.org/2001/XMLSchema-instance*" xsi:schemaLocation="*
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd*"
>
<modelVersion>4.0.0</modelVersion>
<groupId>IpeSvc</groupId>
<artifactId>IpeSvc</artifactId>
<name>IpeSvc</name>
<version>2.4</version>
<packaging>war</packaging>
<description />
- <#> <properties>
<warStagingDir>${project.build.directory}/${project.artifactId}War</
warStagingDir>
</properties>
- <#> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <#> <executions>
- <#> <execution>
<phase>package</phase>
- <#> <goals>
<goal>jar</goal>
</goals>
- <#> <configuration>
<classifier>agent</classifier>
- <#> <includes>
<include>**/agent/**</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
- <#> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
- <#> <configuration>
<warSourceDirectory>webContent</warSourceDirectory>
- <#> <!--
CRITICAL: ides place classes and libs in here. Use only maven
artifacts
-->
<warSourceExcludes>WEB-INF/classes/**/*,WEB-INF/lib/**/*</
warSourceExcludes>
<webXml>webContent/WEB-INF/web.xml</webXml>
<webappDirectory>${warStagingDir}</webappDirectory>
</configuration>
</plugin>
</plugins>
</build>
- <#> <reporting>
- <#> <plugins>
- <#> <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>javancss-maven-plugin</artifactId>
<version>2.0-beta-2</version>
</plugin>
</plugins>
</reporting>
</project>