Ah, right. The assemby mojo apparently has the annotation @execute
phase="package" (well, not apparently - it does - I just looked it up). This
means that the mojo will execute up to that phase in a forked lifecycle (
http://maven.apache.org/developers/mojo-api-specification.html). When you
attached the assembly plugin to the package phase, then you get a double
dose of "package". This is the way Maven was designed, and is a Good Thing.

So, you can't bing assembly to the phase, because, assembly does the phase
thing for you. All you need to do is call "assembly:assembly".

Eric

On 10/9/06, pjungwir <[EMAIL PROTECTED]> wrote:



Eric Redmond wrote:
>
> Does it run twice in a row? When you run "package", Maven will print out
> all
> of the goals executed, one by one. Can you list them please?
>

Hi, thanks for replying! Here is what I see:

$ mvn clean package
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] [compiler:compile]
[INFO] [resources:testResources]
[INFO] [compiler:testCompile]
[INFO] [surefire:test]
[INFO] [jar:jar]
[WARNING] Removing: assembly from forked lifecycle, to prevent recursive
invocation.
[INFO] [resources:resources]
[INFO] [compiler:compile]
[INFO] [resources:testResources]
[INFO] [compiler:testCompile]
[INFO] [surefire:test]
[INFO] [jar:jar]
[INFO] [assembly:assembly {execution: assembly}]

So as you can see, it runs everything up to the package phase--except
itself--then runs everything up to the package phase again, this time
including myself.

When I unbind it from the pom, I can just run "mvn clean
assembly:assembly."
And then it still runs everything up to package, but only once.

So I'm guessing that assembly:assembly knows it needs everything up to
package, but it expects to be run unbound to any phase, so it runs all
that
stuff itself.


--
View this message in context:
http://www.nabble.com/assembly%3Aassembly-does-everything-twice-tf2413291.html#a6727306
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Eric Redmond
http://codehaus.org/~eredmond

Don't mistake the fact I make this look easy to mean that it is - at all -
easy.

Reply via email to