You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Doron Solomon <do...@ericsson.com> on 2008/03/14 19:57:26 UTC

Execute only a specific phase

Hi,

I'm wondering if there's a way to execute ONLY a given phase of a
lifecycle.  For example, let's say I only want to execute the 'package'
phase.  Calling the specific goal that I might expect to be associated
to that phase isn't good enough because the POM might have configured
additional goals to that phase, and I want to execute all of them.

In particular, say I want to execute only the 'package' phase on an
aggregate (parent) POM.  If some of the modules of this POM are jars,
some are wars, etc. then I cannot call a particular goal; I need maven
to figure out which goal(s) to execute for that phase for each module.

Thanks,
Doron

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


RE: Execute only a specific phase

Posted by Doron Solomon <do...@ericsson.com>.
Hi Martin,

Thanks for your reply.  Unfortunately, I don't see how a profile can be
used to include/exclude certain phases of a lifecycle.  Can you please
elaborate?

Thanks,
Doron

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: March 15, 2008 00:24
To: Doron Solomon
Cc: Maven Users List
Subject: Re: Execute only a specific phase

for each <profile>

you can set activation conditions e.g
      <activation>
        <property>
   <name>target-env</name>
   <value>dev</value>
 </property>
      </activation>

http://maven.apache.org/ref/2.0.8/maven-model/maven.html

Tack/tack
Martin-
----- Original Message -----
From: "Doron Solomon" <do...@ericsson.com>
To: <us...@maven.apache.org>
Sent: Friday, March 14, 2008 1:57 PM
Subject: Execute only a specific phase


Hi,

I'm wondering if there's a way to execute ONLY a given phase of a
lifecycle.  For example, let's say I only want to execute the 'package'
phase.  Calling the specific goal that I might expect to be associated
to that phase isn't good enough because the POM might have configured
additional goals to that phase, and I want to execute all of them.

In particular, say I want to execute only the 'package' phase on an
aggregate (parent) POM.  If some of the modules of this POM are jars,
some are wars, etc. then I cannot call a particular goal; I need maven
to figure out which goal(s) to execute for that phase for each module.

Thanks,
Doron

---------------------------------------------------------------------
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 only a specific phase

Posted by Martin Gainty <mg...@hotmail.com>.
for each <profile>

you can set activation conditions e.g
      <activation>
        <property>
   <name>target-env</name>
   <value>dev</value>
 </property>
      </activation>

http://maven.apache.org/ref/2.0.8/maven-model/maven.html

Tack/tack
Martin-
----- Original Message ----- 
From: "Doron Solomon" <do...@ericsson.com>
To: <us...@maven.apache.org>
Sent: Friday, March 14, 2008 1:57 PM
Subject: Execute only a specific phase


Hi,

I'm wondering if there's a way to execute ONLY a given phase of a
lifecycle.  For example, let's say I only want to execute the 'package'
phase.  Calling the specific goal that I might expect to be associated
to that phase isn't good enough because the POM might have configured
additional goals to that phase, and I want to execute all of them.

In particular, say I want to execute only the 'package' phase on an
aggregate (parent) POM.  If some of the modules of this POM are jars,
some are wars, etc. then I cannot call a particular goal; I need maven
to figure out which goal(s) to execute for that phase for each module.

Thanks,
Doron

---------------------------------------------------------------------
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 only a specific phase

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
You can't do that. What you could attempt to do is call the plugin:goal
that might be bound to this phase. Like jar:package.

-----Original Message-----
From: Doron Solomon [mailto:doron.solomon@ericsson.com] 
Sent: Friday, March 14, 2008 2:57 PM
To: users@maven.apache.org
Subject: Execute only a specific phase

Hi,

I'm wondering if there's a way to execute ONLY a given phase of a
lifecycle.  For example, let's say I only want to execute the 'package'
phase.  Calling the specific goal that I might expect to be associated
to that phase isn't good enough because the POM might have configured
additional goals to that phase, and I want to execute all of them.

In particular, say I want to execute only the 'package' phase on an
aggregate (parent) POM.  If some of the modules of this POM are jars,
some are wars, etc. then I cannot call a particular goal; I need maven
to figure out which goal(s) to execute for that phase for each module.

Thanks,
Doron

---------------------------------------------------------------------
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