You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Frank Maritato <fm...@attinteractive.com> on 2010/08/13 18:45:09 UTC
multiple assemblies in a pom
Hi,
I'd like to have 2 assemblies for my project. One that creates a tar.gz
distribution and one that creates an executable jar. This is what I have
so far:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<configuration>
<descriptors>
<descriptor>src/assemble/distribution.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>my.pkg.ClassName</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
It works *except* that I want to change the name of the
jar-with-dependencies because it is really long. If I add the
<appendAssemblyId>false</appendAssemblyId>
<finalName>prj-${project.version}</finalName>
tags to the configuration for the executable jar, *both* assemblies get
this new name, not just the one. Is there any way to do this?
Thanks!
--
Frank Maritato
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: multiple assemblies in a pom
Posted by Ron Wheeler <rw...@artifact-software.com>.
Easiest way and possible "Best Practice" is to make 2 POMs One for the
jar and one for the zip.
Ron
On 13/08/2010 12:45 PM, Frank Maritato wrote:
> Hi,
>
> I'd like to have 2 assemblies for my project. One that creates a
> tar.gz distribution and one that creates an executable jar. This is
> what I have so far:
>
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.2-beta-5</version>
> <configuration>
> <descriptors>
> <descriptor>src/assemble/distribution.xml</descriptor>
> </descriptors>
> </configuration>
> </plugin>
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.2-beta-5</version>
> <configuration>
> <descriptorRefs>
> <descriptorRef>jar-with-dependencies</descriptorRef>
> </descriptorRefs>
> <archive>
> <manifest>
> <mainClass>my.pkg.ClassName</mainClass>
> </manifest>
> </archive>
> </configuration>
> </plugin>
>
> It works *except* that I want to change the name of the
> jar-with-dependencies because it is really long. If I add the
>
> <appendAssemblyId>false</appendAssemblyId>
> <finalName>prj-${project.version}</finalName>
>
> tags to the configuration for the executable jar, *both* assemblies
> get this new name, not just the one. Is there any way to do this?
>
> Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: multiple assemblies in a pom
Posted by Justin Edelson <ju...@gmail.com>.
You should use two executions within the same plugin, each with their own configuration.
Never specify a plugin twice in the same pom. Always use executions for that.
Justin
On Aug 13, 2010, at 12:45 PM, Frank Maritato <fm...@attinteractive.com> wrote:
> Hi,
>
> I'd like to have 2 assemblies for my project. One that creates a tar.gz distribution and one that creates an executable jar. This is what I have so far:
>
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.2-beta-5</version>
> <configuration>
> <descriptors>
> <descriptor>src/assemble/distribution.xml</descriptor>
> </descriptors>
> </configuration>
> </plugin>
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.2-beta-5</version>
> <configuration>
> <descriptorRefs>
> <descriptorRef>jar-with-dependencies</descriptorRef>
> </descriptorRefs>
> <archive>
> <manifest>
> <mainClass>my.pkg.ClassName</mainClass>
> </manifest>
> </archive>
> </configuration>
> </plugin>
>
> It works *except* that I want to change the name of the jar-with-dependencies because it is really long. If I add the
>
> <appendAssemblyId>false</appendAssemblyId>
> <finalName>prj-${project.version}</finalName>
>
> tags to the configuration for the executable jar, *both* assemblies get this new name, not just the one. Is there any way to do this?
>
> Thanks!
> --
> Frank Maritato
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org