You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by pierre46 <pi...@gmail.com> on 2012/02/22 18:15:53 UTC
Execute maven-assembly-plugin twice during package phase
Hi,
I would like to create a jar file with all the dependencies and then create
a zip file which would contain the jar file.
The problem is that maven creates the zip file before the jar file and then
... I'm a little bit lost.
I enclosed my POM file in this post.
Thanks,
PY
--
View this message in context: http://maven.40175.n5.nabble.com/Execute-maven-assembly-plugin-twice-during-package-phase-tp5505700p5505700.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Execute maven-assembly-plugin twice during package phase
Posted by Anders Hammar <an...@hammar.net>.
First, you have two declarations of the assembly plugin in your pom.
That's not correct. Start by consolidating them into one declaration
with two executions instead.
Secondly, having one project producing more than one artifact is not
the Maven way. I'm not sure what you want to do, but I'd split your
work into more than project. Each having one distinct task.
/Anders
On Thu, Feb 23, 2012 at 23:34, pierre46 <pi...@gmail.com> wrote:
> I really appreciate your help.
> I've executed the command "mvn help:effective-pom" and it seems that the jar
> creation phase is reached first (as specified in the pom.xml). However, I
> find several jar inside the zip archive created but the executable jar
> previously created.
>
> Here is the pom.xml :
> http://maven.40175.n5.nabble.com/file/n5509866/pom.xml pom.xml
>
> Here is the assembly file :
> http://maven.40175.n5.nabble.com/file/n5509866/distribution.xml
> distribution.xml
>
> Here is the result of the command "mvn help:effective-pom" :
> http://maven.40175.n5.nabble.com/file/n5509866/help.effective help.effective
>
> Thanks again,
> PY
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Execute-maven-assembly-plugin-twice-during-package-phase-tp5505700p5509866.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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
Re: Execute maven-assembly-plugin twice during package phase
Posted by pierre46 <pi...@gmail.com>.
I really appreciate your help.
I've executed the command "mvn help:effective-pom" and it seems that the jar
creation phase is reached first (as specified in the pom.xml). However, I
find several jar inside the zip archive created but the executable jar
previously created.
Here is the pom.xml :
http://maven.40175.n5.nabble.com/file/n5509866/pom.xml pom.xml
Here is the assembly file :
http://maven.40175.n5.nabble.com/file/n5509866/distribution.xml
distribution.xml
Here is the result of the command "mvn help:effective-pom" :
http://maven.40175.n5.nabble.com/file/n5509866/help.effective help.effective
Thanks again,
PY
--
View this message in context: http://maven.40175.n5.nabble.com/Execute-maven-assembly-plugin-twice-during-package-phase-tp5505700p5509866.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Execute maven-assembly-plugin twice during package phase
Posted by John Patrick <nh...@gmail.com>.
If you want them to execute at the same phase, then you will need to
explicitly add the jar plugin and add it before the assembly plugin to
get the order correct.
Yep help:effective-pom will how you what the maven understands.
On 23 February 2012 06:40, Anders Hammar <an...@hammar.net> wrote:
> Nabble strips attached files.
>
> Do you have the executions of the plugin in the right order in the
> pom? First the jar and then the zip. Also, check the effective-pom
> ("mvn help:effective-pom") to see what Maven is working on. What's the
> order of the executions there?
>
> /Anders
>
> On Wed, Feb 22, 2012 at 18:15, pierre46 <pi...@gmail.com> wrote:
>> Hi,
>> I would like to create a jar file with all the dependencies and then create
>> a zip file which would contain the jar file.
>> The problem is that maven creates the zip file before the jar file and then
>> ... I'm a little bit lost.
>>
>> I enclosed my POM file in this post.
>>
>> Thanks,
>> PY
>>
>> --
>> View this message in context: http://maven.40175.n5.nabble.com/Execute-maven-assembly-plugin-twice-during-package-phase-tp5505700p5505700.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Execute maven-assembly-plugin twice during package phase
Posted by Anders Hammar <an...@hammar.net>.
Nabble strips attached files.
Do you have the executions of the plugin in the right order in the
pom? First the jar and then the zip. Also, check the effective-pom
("mvn help:effective-pom") to see what Maven is working on. What's the
order of the executions there?
/Anders
On Wed, Feb 22, 2012 at 18:15, pierre46 <pi...@gmail.com> wrote:
> Hi,
> I would like to create a jar file with all the dependencies and then create
> a zip file which would contain the jar file.
> The problem is that maven creates the zip file before the jar file and then
> ... I'm a little bit lost.
>
> I enclosed my POM file in this post.
>
> Thanks,
> PY
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Execute-maven-assembly-plugin-twice-during-package-phase-tp5505700p5505700.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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