You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Tawfik, Sameh E" <Sa...@fairisaac.com> on 2008/05/09 03:29:19 UTC

maven does not run code specified in the post-site phase?

Hi,

I'm using the following version:
Maven version: 2.0.7
Java version: 1.6.0_02-ea
OS name: "windows xp" version: "5.1" arch: "x86"

I placed the following code in the parent pom.xml file. When I run "mvn
-Dmaven.test.skip=true site", maven executes the code in the pre-site
phase, but it never executes the code in the post-site phase? 

Do I need to setup something, or is there is something wrong with my
settings?


            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <executions>
                <execution>
                  <phase>pre-site</phase>        
                  <goals>
                    <goal>exec</goal>
                  </goals>
                </execution>
              </executions>
              <inherited>false</inherited>
              <configuration>
                <executable>BuildNumber_Update.pl</executable>
                <arguments>
                  <argument>${project.version}.0</argument>
                  <argument>50</argument>
                </arguments>
              </configuration>
            </plugin>

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <executions>
                <execution>
                  <phase>post-site</phase>        
                  <goals>
                    <goal>exec</goal>
                  </goals>
                </execution>
              </executions>
              <inherited>false</inherited>
              <configuration>
                <executable>Jar_Update.pl</executable>
                <arguments>
                  <argument>${project.version}.0</argument>
                  <argument>50</argument>
                </arguments>
              </configuration>
            </plugin>


  Thanks,

     Sameh
This email and any files transmitted with it are confidential, proprietary
and intended solely for the individual or entity to whom they are addressed.
If you have received this email in error please delete it immediately.


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


RE: maven does not run code specified in the post-site phase?

Posted by "Tawfik, Sameh E" <Sa...@fairisaac.com>.

Thanks Wendy, Brian,

I used 'mvn post-site' and that worked just fine. Also, to avoid having
this goal executed more than once for all the sub modules. I moved the
code to execute this goal from the parent pom.xml to the pom.xml of the
last module that gets executed, and that accomplished the needed task.

  Thanks,

       Sameh


-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Thursday, May 08, 2008 9:50 PM
To: Maven Users List
Subject: RE: maven does not run code specified in the post-site phase?

Or bind your goal to site since bound plugins always run after the
default bound plugins on the same phase.


-----Original Message-----
From: Wendy Smoak [mailto:wsmoak@gmail.com] 
Sent: Thursday, May 08, 2008 6:53 PM
To: Maven Users List
Subject: Re: maven does not run code specified in the post-site phase?

On Thu, May 8, 2008 at 6:29 PM, Tawfik, Sameh E
<Sa...@fairisaac.com> wrote:

>  I placed the following code in the parent pom.xml file. When I run
"mvn
>  -Dmaven.test.skip=true site", maven executes the code in the pre-site
>  phase, but it never executes the code in the post-site phase?

See:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycl
e.html#Lifecycle_Reference
(and scroll down a bit).

The site lifecycle has the following phases:  pre-site, site,
post-site, site-deploy

By typing 'mvn site' you are telling it to run up to and including the
'site' phase.  So nothing bound to the post-site or site-deploy phases
is going to happen.

Type 'mvn post-site' instead and it should work.

-- 
Wendy

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

This email and any files transmitted with it are confidential, proprietary
and intended solely for the individual or entity to whom they are addressed.
If you have received this email in error please delete it immediately.


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


RE: maven does not run code specified in the post-site phase?

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Or bind your goal to site since bound plugins always run after the
default bound plugins on the same phase.

-----Original Message-----
From: Wendy Smoak [mailto:wsmoak@gmail.com] 
Sent: Thursday, May 08, 2008 6:53 PM
To: Maven Users List
Subject: Re: maven does not run code specified in the post-site phase?

On Thu, May 8, 2008 at 6:29 PM, Tawfik, Sameh E
<Sa...@fairisaac.com> wrote:

>  I placed the following code in the parent pom.xml file. When I run
"mvn
>  -Dmaven.test.skip=true site", maven executes the code in the pre-site
>  phase, but it never executes the code in the post-site phase?

See:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycl
e.html#Lifecycle_Reference
(and scroll down a bit).

The site lifecycle has the following phases:  pre-site, site,
post-site, site-deploy

By typing 'mvn site' you are telling it to run up to and including the
'site' phase.  So nothing bound to the post-site or site-deploy phases
is going to happen.

Type 'mvn post-site' instead and it should work.

-- 
Wendy

---------------------------------------------------------------------
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: maven does not run code specified in the post-site phase?

Posted by Wendy Smoak <ws...@gmail.com>.
On Thu, May 8, 2008 at 6:29 PM, Tawfik, Sameh E
<Sa...@fairisaac.com> wrote:

>  I placed the following code in the parent pom.xml file. When I run "mvn
>  -Dmaven.test.skip=true site", maven executes the code in the pre-site
>  phase, but it never executes the code in the post-site phase?

See:  http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference
(and scroll down a bit).

The site lifecycle has the following phases:  pre-site, site,
post-site, site-deploy

By typing 'mvn site' you are telling it to run up to and including the
'site' phase.  So nothing bound to the post-site or site-deploy phases
is going to happen.

Type 'mvn post-site' instead and it should work.

-- 
Wendy

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