You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jaikiran <ja...@yahoo.co.in> on 2008/12/09 13:07:56 UTC

Maven lifecycle - Is there a "run-only-once-in-a-lifetime" phase?

I am using Maven-2.0.9. In my project, i have a parent pom and n child poms.
Something like this:

Parent POM:
<modules>
  
    <module>child-one</module>
        <module>child-two</module>
  
  </modules>

<build>

 <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
          <id>doSomething</id>
          <!--  Do something here -->
            <phase>install</phase>
            <configuration>

              <tasks>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          
        </executions>
      </plugin>
</build>

Note the "execution" which will be run during install phase of each module
(child-one, child-two etc...). I am looking for a phase which will be run
only once during the lifetime of the maven build process. Or is there some
way i can make the plugin run only once during the build, even if the child
modules inherit them? 
-- 
View this message in context: http://www.nabble.com/Maven-lifecycle---Is-there-a-%22run-only-once-in-a-lifetime%22-phase--tp20913469p20913469.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: Maven lifecycle - Is there a "run-only-once-in-a-lifetime" phase?

Posted by Jaikiran <ja...@yahoo.co.in>.
Thanks Wendy, i'll give that a try.


Wendy Smoak-3 wrote:
> 
> 
> Try <plugin><inherited>false</inherited>...
> 
> http://maven.apache.org/ref/2.0.9/maven-model/maven.html#class_plugin
> 
> -- 
> Wendy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Maven-lifecycle---Is-there-a-%22run-only-once-in-a-lifetime%22-phase--tp20913469p20935964.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: Maven lifecycle - Is there a "run-only-once-in-a-lifetime" phase?

Posted by Wendy Smoak <ws...@gmail.com>.
On Tue, Dec 9, 2008 at 7:07 AM, Jaikiran <ja...@yahoo.co.in> wrote:
> Note the "execution" which will be run during install phase of each module
> (child-one, child-two etc...). I am looking for a phase which will be run
> only once during the lifetime of the maven build process. Or is there some
> way i can make the plugin run only once during the build, even if the child
> modules inherit them?

Try <plugin><inherited>false</inherited>...

http://maven.apache.org/ref/2.0.9/maven-model/maven.html#class_plugin

-- 
Wendy

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