You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ben Tatham <be...@nanometrics.ca> on 2007/03/21 21:10:25 UTC
plugin runs multiple times
Hello all,
I have a scenario where my plugins (antrun, xdoclet, custom stuff) get
run multiple times. I think this has something to do with some plugins
forkin a new lifecycle, but I can't figure out:
1) which ones are doing that
2) good description of how to stop this from happening.
I have parent poms defining some plugins, and I have pushed things
around into pluginManagement instead, but this does not seem to help.
-Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: plugin runs multiple times
Posted by Ben Tatham <be...@nanometrics.ca>.
Yes, I have checked all that. Everything is declared only once in the
plugins section. And the ones that are inherited from the parent pom
are also declared in the pluginManagement section, but my understanding
is that the pluginManagement section does not effect the current project.
How do I know which plugins start a new lifecycle? Or am I totally off
base...
-Ben
Wayne Fay wrote:
> Also see this page for more specific usage info for the help plugin:
> http://maven.apache.org/plugins/maven-help-plugin/usage.html
>
> Wayne
>
> On 3/21/07, Wayne Fay <wa...@gmail.com> wrote:
>> Try mvn help:effective-pom in your top-level project to see what
>> plugins map where with what configurations etc. Perhaps that will help
>> you figure out what's going on.
>>
>> Wayne
>>
>> On 3/21/07, Ben Tatham <be...@nanometrics.ca> wrote:
>> > Hello all,
>> > I have a scenario where my plugins (antrun, xdoclet, custom stuff) get
>> > run multiple times. I think this has something to do with some
>> plugins
>> > forkin a new lifecycle, but I can't figure out:
>> > 1) which ones are doing that
>> > 2) good description of how to stop this from happening.
>> >
>> > I have parent poms defining some plugins, and I have pushed things
>> > around into pluginManagement instead, but this does not seem to help.
>> >
>> > -Ben
>> >
>> > ---------------------------------------------------------------------
>> > 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: plugin runs multiple times
Posted by Ben Tatham <be...@nanometrics.ca>.
Indeed, I am using assembly:attached goal. I am using this to generate
a -jar.jar of my classes so that I can depend on just the classes of the
war project. Is there a way to make it not do a fork, but just make the
jar for me and install/deploy it? Nothing jumps out at me from the
maven-assembly-plugin site.
Here is my snippet from the parent pom pluginManagement section...this
parent pom is used by all my web projects.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<inherited>true</inherited>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>src/assembly/jar.xml</descriptor>
</descriptors>
</configuration>
</plugin>
Thanks,
Ben
Brian E. Fox wrote:
> The war doesn't use the dependency plugin (btw you should update to
> maven-dependency-plugin 2.0-alpha-x since it supereceeds the old mojo
> one). Do you have assembly:assemble bound to a phase? That forks the
> entire build and could cause what you see. Pasting your pom would help
> too.
>
> -----Original Message-----
> From: Ben Tatham [mailto:bentatham@nanometrics.ca]
> Sent: Thursday, March 22, 2007 10:57 AM
> To: Maven Users List
> Cc: waynefay@gmail.com
> Subject: Re: plugin runs multiple times
>
> I have tracked my problem down a bit further...the second lifecycle
> starts sometime around the package phase in the lifecycle. I think it
> may have something to do with the fact that during the validate phase, I
> unpack parent WAR on my own using the dependency-maven-plugin so that I
> can extract the web.xml file and merge it with the new one (I am using
> xdoclet).
>
> Does the war plugin just call on dependency-maven-plugin too to do the
> war overlap? If so, perhaps that is what is triggering the 2nd
> lifecycle run from validate? Or is it something else?
>
> How do I make it stop happening?!?! A quote from "Better Builds with
> Maven", Section 5.3.1: "In good mojo design, determining when not to
> execute, is often as important as the modifications made during
> execution itself."
>
> Any help is appreciated.
>
> -Ben
>
>
> Wayne Fay wrote:
>
>> Also see this page for more specific usage info for the help plugin:
>> http://maven.apache.org/plugins/maven-help-plugin/usage.html
>>
>> Wayne
>>
>> On 3/21/07, Wayne Fay <wa...@gmail.com> wrote:
>>
>>> Try mvn help:effective-pom in your top-level project to see what
>>> plugins map where with what configurations etc. Perhaps that will
>>> help you figure out what's going on.
>>>
>>> Wayne
>>>
>>> On 3/21/07, Ben Tatham <be...@nanometrics.ca> wrote:
>>>
>>>> Hello all,
>>>> I have a scenario where my plugins (antrun, xdoclet, custom stuff)
>>>> get run multiple times. I think this has something to do with some
>>>>
>>> plugins
>>>
>>>> forkin a new lifecycle, but I can't figure out:
>>>> 1) which ones are doing that
>>>> 2) good description of how to stop this from happening.
>>>>
>>>> I have parent poms defining some plugins, and I have pushed things
>>>> around into pluginManagement instead, but this does not seem to
>>>>
> help.
>
>>>> -Ben
>>>>
>>>> -------------------------------------------------------------------
>>>> -- 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
>
>
> ---------------------------------------------------------------------
> 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: plugin runs multiple times
Posted by Ben Tatham <be...@nanometrics.ca>.
Thanks for looking into it. I've been doing some reading, and according
to this:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
if the @execute phase=generate-sources is specified on the Mojo (which
it is in this case), you cannot stop the fork from happening. Its up to
the plugin itself to check if the mojo has already been run on its own.
I noticed that the dependency plugin does this with its markers
directory so it knows not to unpack the dependency again. Perhaps the
antrun plugin is doing this too, which is why i don't get the 2nd echo
in my example. I have control over some of my plugins, but
unfortunately, jspc and xdoclet, I don't, and they get run multiple
times (in my realworld case). Bahhh...
-Ben
Brian E. Fox wrote:
> Assembly:attached is the correct one, but you are right, the sources one
> is probably doing it. I'm using sources and not having that issue. Let
> me look...
>
>
> <artifactId>maven-source-plugin</artifactId>
> <version>2.0</version>
> <executions>
> <execution>
> <id>attach-source</id>
> <phase>package</phase>
> <goals>
> <goal>jar</goal>
> </goals>
> <configuration>
> <attach>true</attach>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> -----Original Message-----
> From: Ben Tatham [mailto:bentatham@nanometrics.ca]
> Sent: Thursday, March 22, 2007 3:13 PM
> To: Maven Users List
> Subject: Re: plugin runs multiple times
>
> I think it also might be the maven-source-plugin. The source-plugin
> mojos both have a
>
> @execute phase=generate-sources
>
> which I think means run that phase again. Is there a way to make it not
> do that when run from a pom instead of the cmd line?
>
> -Ben
>
> Brian E. Fox wrote:
>
>> The war doesn't use the dependency plugin (btw you should update to
>> maven-dependency-plugin 2.0-alpha-x since it supereceeds the old mojo
>> one). Do you have assembly:assemble bound to a phase? That forks the
>> entire build and could cause what you see. Pasting your pom would help
>>
>
>
>> too.
>>
>> -----Original Message-----
>> From: Ben Tatham [mailto:bentatham@nanometrics.ca]
>> Sent: Thursday, March 22, 2007 10:57 AM
>> To: Maven Users List
>> Cc: waynefay@gmail.com
>> Subject: Re: plugin runs multiple times
>>
>> I have tracked my problem down a bit further...the second lifecycle
>> starts sometime around the package phase in the lifecycle. I think it
>>
>
>
>> may have something to do with the fact that during the validate phase,
>>
>
>
>> I unpack parent WAR on my own using the dependency-maven-plugin so
>> that I can extract the web.xml file and merge it with the new one (I
>> am using xdoclet).
>>
>> Does the war plugin just call on dependency-maven-plugin too to do the
>>
>
>
>> war overlap? If so, perhaps that is what is triggering the 2nd
>> lifecycle run from validate? Or is it something else?
>>
>> How do I make it stop happening?!?! A quote from "Better Builds with
>> Maven", Section 5.3.1: "In good mojo design, determining when not to
>> execute, is often as important as the modifications made during
>> execution itself."
>>
>> Any help is appreciated.
>>
>> -Ben
>>
>>
>> Wayne Fay wrote:
>>
>>
>>> Also see this page for more specific usage info for the help plugin:
>>> http://maven.apache.org/plugins/maven-help-plugin/usage.html
>>>
>>> Wayne
>>>
>>> On 3/21/07, Wayne Fay <wa...@gmail.com> wrote:
>>>
>>>
>>>> Try mvn help:effective-pom in your top-level project to see what
>>>> plugins map where with what configurations etc. Perhaps that will
>>>> help you figure out what's going on.
>>>>
>>>> Wayne
>>>>
>>>> On 3/21/07, Ben Tatham <be...@nanometrics.ca> wrote:
>>>>
>>>>
>>>>> Hello all,
>>>>> I have a scenario where my plugins (antrun, xdoclet, custom stuff)
>>>>> get run multiple times. I think this has something to do with some
>>>>>
>>>>>
>>>> plugins
>>>>
>>>>
>>>>> forkin a new lifecycle, but I can't figure out:
>>>>> 1) which ones are doing that
>>>>> 2) good description of how to stop this from happening.
>>>>>
>>>>> I have parent poms defining some plugins, and I have pushed things
>>>>> around into pluginManagement instead, but this does not seem to
>>>>>
>>>>>
>> help.
>>
>>
>>>>> -Ben
>>>>>
>>>>> -------------------------------------------------------------------
>>>>> -- 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
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: plugin runs multiple times
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Assembly:attached is the correct one, but you are right, the sources one
is probably doing it. I'm using sources and not having that issue. Let
me look...
<artifactId>maven-source-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<id>attach-source</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>
-----Original Message-----
From: Ben Tatham [mailto:bentatham@nanometrics.ca]
Sent: Thursday, March 22, 2007 3:13 PM
To: Maven Users List
Subject: Re: plugin runs multiple times
I think it also might be the maven-source-plugin. The source-plugin
mojos both have a
@execute phase=generate-sources
which I think means run that phase again. Is there a way to make it not
do that when run from a pom instead of the cmd line?
-Ben
Brian E. Fox wrote:
> The war doesn't use the dependency plugin (btw you should update to
> maven-dependency-plugin 2.0-alpha-x since it supereceeds the old mojo
> one). Do you have assembly:assemble bound to a phase? That forks the
> entire build and could cause what you see. Pasting your pom would help
> too.
>
> -----Original Message-----
> From: Ben Tatham [mailto:bentatham@nanometrics.ca]
> Sent: Thursday, March 22, 2007 10:57 AM
> To: Maven Users List
> Cc: waynefay@gmail.com
> Subject: Re: plugin runs multiple times
>
> I have tracked my problem down a bit further...the second lifecycle
> starts sometime around the package phase in the lifecycle. I think it
> may have something to do with the fact that during the validate phase,
> I unpack parent WAR on my own using the dependency-maven-plugin so
> that I can extract the web.xml file and merge it with the new one (I
> am using xdoclet).
>
> Does the war plugin just call on dependency-maven-plugin too to do the
> war overlap? If so, perhaps that is what is triggering the 2nd
> lifecycle run from validate? Or is it something else?
>
> How do I make it stop happening?!?! A quote from "Better Builds with
> Maven", Section 5.3.1: "In good mojo design, determining when not to
> execute, is often as important as the modifications made during
> execution itself."
>
> Any help is appreciated.
>
> -Ben
>
>
> Wayne Fay wrote:
>
>> Also see this page for more specific usage info for the help plugin:
>> http://maven.apache.org/plugins/maven-help-plugin/usage.html
>>
>> Wayne
>>
>> On 3/21/07, Wayne Fay <wa...@gmail.com> wrote:
>>
>>> Try mvn help:effective-pom in your top-level project to see what
>>> plugins map where with what configurations etc. Perhaps that will
>>> help you figure out what's going on.
>>>
>>> Wayne
>>>
>>> On 3/21/07, Ben Tatham <be...@nanometrics.ca> wrote:
>>>
>>>> Hello all,
>>>> I have a scenario where my plugins (antrun, xdoclet, custom stuff)
>>>> get run multiple times. I think this has something to do with some
>>>>
>>> plugins
>>>
>>>> forkin a new lifecycle, but I can't figure out:
>>>> 1) which ones are doing that
>>>> 2) good description of how to stop this from happening.
>>>>
>>>> I have parent poms defining some plugins, and I have pushed things
>>>> around into pluginManagement instead, but this does not seem to
>>>>
> help.
>
>>>> -Ben
>>>>
>>>> -------------------------------------------------------------------
>>>> -- 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
>
>
> ---------------------------------------------------------------------
> 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: plugin runs multiple times
Posted by Ben Tatham <be...@nanometrics.ca>.
I think it also might be the maven-source-plugin. The source-plugin
mojos both have a
@execute phase=generate-sources
which I think means run that phase again. Is there a way to make it not
do that when run from a pom instead of the cmd line?
-Ben
Brian E. Fox wrote:
> The war doesn't use the dependency plugin (btw you should update to
> maven-dependency-plugin 2.0-alpha-x since it supereceeds the old mojo
> one). Do you have assembly:assemble bound to a phase? That forks the
> entire build and could cause what you see. Pasting your pom would help
> too.
>
> -----Original Message-----
> From: Ben Tatham [mailto:bentatham@nanometrics.ca]
> Sent: Thursday, March 22, 2007 10:57 AM
> To: Maven Users List
> Cc: waynefay@gmail.com
> Subject: Re: plugin runs multiple times
>
> I have tracked my problem down a bit further...the second lifecycle
> starts sometime around the package phase in the lifecycle. I think it
> may have something to do with the fact that during the validate phase, I
> unpack parent WAR on my own using the dependency-maven-plugin so that I
> can extract the web.xml file and merge it with the new one (I am using
> xdoclet).
>
> Does the war plugin just call on dependency-maven-plugin too to do the
> war overlap? If so, perhaps that is what is triggering the 2nd
> lifecycle run from validate? Or is it something else?
>
> How do I make it stop happening?!?! A quote from "Better Builds with
> Maven", Section 5.3.1: "In good mojo design, determining when not to
> execute, is often as important as the modifications made during
> execution itself."
>
> Any help is appreciated.
>
> -Ben
>
>
> Wayne Fay wrote:
>
>> Also see this page for more specific usage info for the help plugin:
>> http://maven.apache.org/plugins/maven-help-plugin/usage.html
>>
>> Wayne
>>
>> On 3/21/07, Wayne Fay <wa...@gmail.com> wrote:
>>
>>> Try mvn help:effective-pom in your top-level project to see what
>>> plugins map where with what configurations etc. Perhaps that will
>>> help you figure out what's going on.
>>>
>>> Wayne
>>>
>>> On 3/21/07, Ben Tatham <be...@nanometrics.ca> wrote:
>>>
>>>> Hello all,
>>>> I have a scenario where my plugins (antrun, xdoclet, custom stuff)
>>>> get run multiple times. I think this has something to do with some
>>>>
>>> plugins
>>>
>>>> forkin a new lifecycle, but I can't figure out:
>>>> 1) which ones are doing that
>>>> 2) good description of how to stop this from happening.
>>>>
>>>> I have parent poms defining some plugins, and I have pushed things
>>>> around into pluginManagement instead, but this does not seem to
>>>>
> help.
>
>>>> -Ben
>>>>
>>>> -------------------------------------------------------------------
>>>> -- 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
>
>
> ---------------------------------------------------------------------
> 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: plugin runs multiple times
Posted by Ben Tatham <be...@nanometrics.ca>.
OK. I have run some test stuff just to try to figure out how this stuff
works...
I added this:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<goals><goal>run</goal></goals>
<phase>generate-sources</phase>
<configuration>
<tasks>
<echo>********************** Generating
Sources...</echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
to a very simple pom that inherits from my pom that has this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
I just wanted to see how often my echo comes out...well, of course it
happens the first time through...:
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[echo] ********************** Generating Sources...
[INFO] Executed tasks
[INFO] [resources:resources]
And then after the tests have all passed, I get the following:
[INFO] [jar:jar]
[INFO] Building jar: C:\work\util\BenTatham\target\util-1.0.3-SNAPSHOT.jar
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive
invocation.
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[INFO] Executed tasks
[INFO] [source:jar {execution: default}]
[INFO] Building jar:
C:\work\util\BenTatham\target\util-1.0.3-SNAPSHOT-sources.jar
[INFO] Preparing source:test-jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive
invocation.
[WARNING] Removing: test-jar from forked lifecycle, to prevent recursive
invocation.
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[INFO] Executed tasks
[INFO] [source:test-jar {execution: default}]
[INFO] Building jar:
C:\work\util\BenTatham\target\util-1.0.3-SNAPSHOT-test-sources.jar
Notice that although the echo itself didn't happen, it does say it is
running antrun and executing tasks.
Now I am even more confused than before! Please help...
-Ben
Brian E. Fox wrote:
> The war doesn't use the dependency plugin (btw you should update to
> maven-dependency-plugin 2.0-alpha-x since it supereceeds the old mojo
> one). Do you have assembly:assemble bound to a phase? That forks the
> entire build and could cause what you see. Pasting your pom would help
> too.
>
> -----Original Message-----
> From: Ben Tatham [mailto:bentatham@nanometrics.ca]
> Sent: Thursday, March 22, 2007 10:57 AM
> To: Maven Users List
> Cc: waynefay@gmail.com
> Subject: Re: plugin runs multiple times
>
> I have tracked my problem down a bit further...the second lifecycle
> starts sometime around the package phase in the lifecycle. I think it
> may have something to do with the fact that during the validate phase, I
> unpack parent WAR on my own using the dependency-maven-plugin so that I
> can extract the web.xml file and merge it with the new one (I am using
> xdoclet).
>
> Does the war plugin just call on dependency-maven-plugin too to do the
> war overlap? If so, perhaps that is what is triggering the 2nd
> lifecycle run from validate? Or is it something else?
>
> How do I make it stop happening?!?! A quote from "Better Builds with
> Maven", Section 5.3.1: "In good mojo design, determining when not to
> execute, is often as important as the modifications made during
> execution itself."
>
> Any help is appreciated.
>
> -Ben
>
>
> Wayne Fay wrote:
>
>> Also see this page for more specific usage info for the help plugin:
>> http://maven.apache.org/plugins/maven-help-plugin/usage.html
>>
>> Wayne
>>
>> On 3/21/07, Wayne Fay <wa...@gmail.com> wrote:
>>
>>> Try mvn help:effective-pom in your top-level project to see what
>>> plugins map where with what configurations etc. Perhaps that will
>>> help you figure out what's going on.
>>>
>>> Wayne
>>>
>>> On 3/21/07, Ben Tatham <be...@nanometrics.ca> wrote:
>>>
>>>> Hello all,
>>>> I have a scenario where my plugins (antrun, xdoclet, custom stuff)
>>>> get run multiple times. I think this has something to do with some
>>>>
>>> plugins
>>>
>>>> forkin a new lifecycle, but I can't figure out:
>>>> 1) which ones are doing that
>>>> 2) good description of how to stop this from happening.
>>>>
>>>> I have parent poms defining some plugins, and I have pushed things
>>>> around into pluginManagement instead, but this does not seem to
>>>>
> help.
>
>>>> -Ben
>>>>
>>>> -------------------------------------------------------------------
>>>> -- 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
>
>
> ---------------------------------------------------------------------
> 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: plugin runs multiple times
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
The war doesn't use the dependency plugin (btw you should update to
maven-dependency-plugin 2.0-alpha-x since it supereceeds the old mojo
one). Do you have assembly:assemble bound to a phase? That forks the
entire build and could cause what you see. Pasting your pom would help
too.
-----Original Message-----
From: Ben Tatham [mailto:bentatham@nanometrics.ca]
Sent: Thursday, March 22, 2007 10:57 AM
To: Maven Users List
Cc: waynefay@gmail.com
Subject: Re: plugin runs multiple times
I have tracked my problem down a bit further...the second lifecycle
starts sometime around the package phase in the lifecycle. I think it
may have something to do with the fact that during the validate phase, I
unpack parent WAR on my own using the dependency-maven-plugin so that I
can extract the web.xml file and merge it with the new one (I am using
xdoclet).
Does the war plugin just call on dependency-maven-plugin too to do the
war overlap? If so, perhaps that is what is triggering the 2nd
lifecycle run from validate? Or is it something else?
How do I make it stop happening?!?! A quote from "Better Builds with
Maven", Section 5.3.1: "In good mojo design, determining when not to
execute, is often as important as the modifications made during
execution itself."
Any help is appreciated.
-Ben
Wayne Fay wrote:
> Also see this page for more specific usage info for the help plugin:
> http://maven.apache.org/plugins/maven-help-plugin/usage.html
>
> Wayne
>
> On 3/21/07, Wayne Fay <wa...@gmail.com> wrote:
>> Try mvn help:effective-pom in your top-level project to see what
>> plugins map where with what configurations etc. Perhaps that will
>> help you figure out what's going on.
>>
>> Wayne
>>
>> On 3/21/07, Ben Tatham <be...@nanometrics.ca> wrote:
>> > Hello all,
>> > I have a scenario where my plugins (antrun, xdoclet, custom stuff)
>> > get run multiple times. I think this has something to do with some
>> plugins
>> > forkin a new lifecycle, but I can't figure out:
>> > 1) which ones are doing that
>> > 2) good description of how to stop this from happening.
>> >
>> > I have parent poms defining some plugins, and I have pushed things
>> > around into pluginManagement instead, but this does not seem to
help.
>> >
>> > -Ben
>> >
>> > -------------------------------------------------------------------
>> > -- 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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: plugin runs multiple times
Posted by Ben Tatham <be...@nanometrics.ca>.
I have tracked my problem down a bit further...the second lifecycle
starts sometime around the package phase in the lifecycle. I think it
may have something to do with the fact that during the validate phase, I
unpack parent WAR on my own using the dependency-maven-plugin so that I
can extract the web.xml file and merge it with the new one (I am using
xdoclet).
Does the war plugin just call on dependency-maven-plugin too to do the
war overlap? If so, perhaps that is what is triggering the 2nd
lifecycle run from validate? Or is it something else?
How do I make it stop happening?!?! A quote from "Better Builds with
Maven", Section 5.3.1: "In good mojo design, determining when not to
execute, is often as important as the modifications made during
execution itself."
Any help is appreciated.
-Ben
Wayne Fay wrote:
> Also see this page for more specific usage info for the help plugin:
> http://maven.apache.org/plugins/maven-help-plugin/usage.html
>
> Wayne
>
> On 3/21/07, Wayne Fay <wa...@gmail.com> wrote:
>> Try mvn help:effective-pom in your top-level project to see what
>> plugins map where with what configurations etc. Perhaps that will help
>> you figure out what's going on.
>>
>> Wayne
>>
>> On 3/21/07, Ben Tatham <be...@nanometrics.ca> wrote:
>> > Hello all,
>> > I have a scenario where my plugins (antrun, xdoclet, custom stuff) get
>> > run multiple times. I think this has something to do with some
>> plugins
>> > forkin a new lifecycle, but I can't figure out:
>> > 1) which ones are doing that
>> > 2) good description of how to stop this from happening.
>> >
>> > I have parent poms defining some plugins, and I have pushed things
>> > around into pluginManagement instead, but this does not seem to help.
>> >
>> > -Ben
>> >
>> > ---------------------------------------------------------------------
>> > 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: plugin runs multiple times
Posted by Wayne Fay <wa...@gmail.com>.
Also see this page for more specific usage info for the help plugin:
http://maven.apache.org/plugins/maven-help-plugin/usage.html
Wayne
On 3/21/07, Wayne Fay <wa...@gmail.com> wrote:
> Try mvn help:effective-pom in your top-level project to see what
> plugins map where with what configurations etc. Perhaps that will help
> you figure out what's going on.
>
> Wayne
>
> On 3/21/07, Ben Tatham <be...@nanometrics.ca> wrote:
> > Hello all,
> > I have a scenario where my plugins (antrun, xdoclet, custom stuff) get
> > run multiple times. I think this has something to do with some plugins
> > forkin a new lifecycle, but I can't figure out:
> > 1) which ones are doing that
> > 2) good description of how to stop this from happening.
> >
> > I have parent poms defining some plugins, and I have pushed things
> > around into pluginManagement instead, but this does not seem to help.
> >
> > -Ben
> >
> > ---------------------------------------------------------------------
> > 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: plugin runs multiple times
Posted by Wayne Fay <wa...@gmail.com>.
Try mvn help:effective-pom in your top-level project to see what
plugins map where with what configurations etc. Perhaps that will help
you figure out what's going on.
Wayne
On 3/21/07, Ben Tatham <be...@nanometrics.ca> wrote:
> Hello all,
> I have a scenario where my plugins (antrun, xdoclet, custom stuff) get
> run multiple times. I think this has something to do with some plugins
> forkin a new lifecycle, but I can't figure out:
> 1) which ones are doing that
> 2) good description of how to stop this from happening.
>
> I have parent poms defining some plugins, and I have pushed things
> around into pluginManagement instead, but this does not seem to help.
>
> -Ben
>
> ---------------------------------------------------------------------
> 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