You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Lewis, Eric" <Er...@ipi.ch> on 2010/07/20 13:49:23 UTC

Does the sequence of goals/phases matter?

Hi

This is probably a trivial question, but I'll ask it nonetheless  :-)

Does the sequence of the goals and lifecycle phases matter when I call Maven?

In other words, are these two exactly the same?

clean package site-deploy

site-deploy clean package


Best regards,
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


AW: AW: AW: Does the sequence of goals/phases matter?

Posted by "Lewis, Eric" <Er...@ipi.ch>.
Yep, that sounds smart! Especially since I can activate the profile by the existence of HUDSON_HOME.
I'll try that, thanks!

Best regards,
Eric 

-----Ursprüngliche Nachricht-----
Von: Jörg Schaible [mailto:joerg.schaible@gmx.de] 
Gesendet: Dienstag, 20. Juli 2010 15:32
An: users@maven.apache.org
Betreff: Re: AW: AW: Does the sequence of goals/phases matter?

Lewis, Eric wrote:

> Actually, it's a bit complicated  :-)
> 
> The Maven build is started within Hudson. The plugins within Hudson (PMD,
> Checkstyle etc.) require the report XMLs (created by pmd:pmd etc.) to be
> able to work. So I need to call those goals for every build.
> 
> However, we also have a nightly build (which should also work with the
> Hudson plugins), which builds the Maven site (since that's not part of
> Continuous Integration). There are other metrics which are included there,
> but not the ones from the Hudson plugins.
> 
> So even though e.g. the PMD plugin says that pmd:pmd should be used as a
> Maven report, I need it outside of the site lifecycle.

Create a hudson profile and bind all these goals in this profile to e.g. the 
package phase.

- Jörg


---------------------------------------------------------------------
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: AW: AW: Does the sequence of goals/phases matter?

Posted by Jörg Schaible <jo...@gmx.de>.
Lewis, Eric wrote:

> Actually, it's a bit complicated  :-)
> 
> The Maven build is started within Hudson. The plugins within Hudson (PMD,
> Checkstyle etc.) require the report XMLs (created by pmd:pmd etc.) to be
> able to work. So I need to call those goals for every build.
> 
> However, we also have a nightly build (which should also work with the
> Hudson plugins), which builds the Maven site (since that's not part of
> Continuous Integration). There are other metrics which are included there,
> but not the ones from the Hudson plugins.
> 
> So even though e.g. the PMD plugin says that pmd:pmd should be used as a
> Maven report, I need it outside of the site lifecycle.

Create a hudson profile and bind all these goals in this profile to e.g. the 
package phase.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


AW: AW: Does the sequence of goals/phases matter?

Posted by "Lewis, Eric" <Er...@ipi.ch>.
Actually, it's a bit complicated  :-)

The Maven build is started within Hudson. The plugins within Hudson (PMD, Checkstyle etc.) require the report XMLs (created by pmd:pmd etc.) to be able to work. So I need to call those goals for every build.

However, we also have a nightly build (which should also work with the Hudson plugins), which builds the Maven site (since that's not part of Continuous Integration). There are other metrics which are included there, but not the ones from the Hudson plugins.

So even though e.g. the PMD plugin says that pmd:pmd should be used as a Maven report, I need it outside of the site lifecycle.

Best regards,
Eric

-----Ursprüngliche Nachricht-----
Von: Justin Edelson [mailto:justinedelson@gmail.com] 
Gesendet: Dienstag, 20. Juli 2010 14:40
An: Maven Users List
Betreff: Re: AW: Does the sequence of goals/phases matter?



On Jul 20, 2010, at 8:01 AM, "Lewis, Eric" <Er...@ipi.ch> wrote:

> Ok, thanks for the clarification!
> 
> So, is this the right sequence in your opinion?
> 
> clean package findbugs:findbugs pmd:pmd pmd:cpd checkstyle:checkstyle site-deploy
> 
Assuming that findbugs, pmd and checkstyle are configured as part of your reporting configuration, it shouldn't be necessary to include them explicitly on the command line.

> Or where can I find out more about that topic?
> http://www.sonatype.com/books/mvnref-book/reference/lifecycle.html doesn't tell me about how to call individual plugin goals within a lifecycle, unless I missed something.
I find it hard to believe the Maven reference doesn't talk about binding a plugin to a phase. In any case, it is discussed here: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html in the Plugins section

Justin

> 
> Best regards,
> Eric
> 
> -----Ursprüngliche Nachricht-----
> Von: Justin Edelson [mailto:justinedelson@gmail.com] 
> Gesendet: Dienstag, 20. Juli 2010 13:54
> An: Maven Users List
> Betreff: Re: Does the sequence of goals/phases matter?
> 
> 
> 
> On Jul 20, 2010, at 7:49 AM, "Lewis, Eric" <Er...@ipi.ch> wrote:
> 
>> Hi
>> 
>> This is probably a trivial question, but I'll ask it nonetheless  :-)
>> 
>> Does the sequence of the goals and lifecycle phases matter when I call Maven?
> Yes
>> 
>> In other words, are these two exactly the same?
> No
>> 
>> clean package site-deploy
>> 
>> site-deploy clean package
>> 
>> 
>> Best regards,
>> Eric
>> ---------------------------------------------------------------------
>> 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: AW: Does the sequence of goals/phases matter?

Posted by Justin Edelson <ju...@gmail.com>.

On Jul 20, 2010, at 8:01 AM, "Lewis, Eric" <Er...@ipi.ch> wrote:

> Ok, thanks for the clarification!
> 
> So, is this the right sequence in your opinion?
> 
> clean package findbugs:findbugs pmd:pmd pmd:cpd checkstyle:checkstyle site-deploy
> 
Assuming that findbugs, pmd and checkstyle are configured as part of your reporting configuration, it shouldn't be necessary to include them explicitly on the command line.

> Or where can I find out more about that topic?
> http://www.sonatype.com/books/mvnref-book/reference/lifecycle.html doesn't tell me about how to call individual plugin goals within a lifecycle, unless I missed something.
I find it hard to believe the Maven reference doesn't talk about binding a plugin to a phase. In any case, it is discussed here: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html in the Plugins section

Justin

> 
> Best regards,
> Eric
> 
> -----Ursprüngliche Nachricht-----
> Von: Justin Edelson [mailto:justinedelson@gmail.com] 
> Gesendet: Dienstag, 20. Juli 2010 13:54
> An: Maven Users List
> Betreff: Re: Does the sequence of goals/phases matter?
> 
> 
> 
> On Jul 20, 2010, at 7:49 AM, "Lewis, Eric" <Er...@ipi.ch> wrote:
> 
>> Hi
>> 
>> This is probably a trivial question, but I'll ask it nonetheless  :-)
>> 
>> Does the sequence of the goals and lifecycle phases matter when I call Maven?
> Yes
>> 
>> In other words, are these two exactly the same?
> No
>> 
>> clean package site-deploy
>> 
>> site-deploy clean package
>> 
>> 
>> Best regards,
>> Eric
>> ---------------------------------------------------------------------
>> 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


AW: Does the sequence of goals/phases matter?

Posted by "Lewis, Eric" <Er...@ipi.ch>.
Ok, thanks for the clarification!

So, is this the right sequence in your opinion?

clean package findbugs:findbugs pmd:pmd pmd:cpd checkstyle:checkstyle site-deploy

Or where can I find out more about that topic? http://www.sonatype.com/books/mvnref-book/reference/lifecycle.html doesn't tell me about how to call individual plugin goals within a lifecycle, unless I missed something.

Best regards,
Eric

-----Ursprüngliche Nachricht-----
Von: Justin Edelson [mailto:justinedelson@gmail.com] 
Gesendet: Dienstag, 20. Juli 2010 13:54
An: Maven Users List
Betreff: Re: Does the sequence of goals/phases matter?



On Jul 20, 2010, at 7:49 AM, "Lewis, Eric" <Er...@ipi.ch> wrote:

> Hi
> 
> This is probably a trivial question, but I'll ask it nonetheless  :-)
> 
> Does the sequence of the goals and lifecycle phases matter when I call Maven?
Yes
> 
> In other words, are these two exactly the same?
No
> 
> clean package site-deploy
> 
> site-deploy clean package
> 
> 
> Best regards,
> Eric
> ---------------------------------------------------------------------
> 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: Does the sequence of goals/phases matter?

Posted by Justin Edelson <ju...@gmail.com>.

On Jul 20, 2010, at 7:49 AM, "Lewis, Eric" <Er...@ipi.ch> wrote:

> Hi
> 
> This is probably a trivial question, but I'll ask it nonetheless  :-)
> 
> Does the sequence of the goals and lifecycle phases matter when I call Maven?
Yes
> 
> In other words, are these two exactly the same?
No
> 
> clean package site-deploy
> 
> site-deploy clean package
> 
> 
> Best regards,
> Eric
> ---------------------------------------------------------------------
> 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