I specified the inherited element in different places in the plugin body
in the parent pom.xml, but no matter where I set it, it is still running
more than once! It is running for all the children modules? 

Should not setting the inherited element to false suppress Maven from
passing this execution onto its children?

Here are some of the variations I tried:

(1)
            <plugin>
                    <inherited>false</inherited>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <executions>
                <execution>
                  <goals>
                    <goal>exec</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <executable>Process_Files.cmd</executable>
              </configuration>
            </plugin>

(2)

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
                    <inherited>false</inherited>
              <executions>
                <execution>
                  <goals>
                    <goal>exec</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <executable>Process_Files.cmd</executable>
              </configuration>
            </plugin>
(3)

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <executions>
                <execution>
                  <goals>
                    <goal>exec</goal>
                  </goals>
                </execution>
              </executions>
              <inherited>false</inherited>
              <configuration>
                <executable>Process_Files.cmd</executable>
              </configuration>
            </plugin>
(4)

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <executions>
                <execution>
                  <goals>
                    <goal>exec</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                      <inherited>false</inherited>
                <executable>Process_Files.cmd</executable>
              </configuration>
            </plugin>


-----Original Message-----
From: Brian E. Fox [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2008 5:02 PM
To: Maven Users List
Subject: RE: How to run a script from a pom.xml file?

Fyi, the inherited in the execution block does not work, but it does
work in the plugin block.

-----Original Message-----
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2008 7:55 PM
To: Maven Users List
Subject: Re: How to run a script from a pom.xml file?

On Wed, Mar 12, 2008 at 4:25 PM, Tawfik, Sameh E
<[EMAIL PROTECTED]> wrote:

>  I tried the exe plugin and it did what I was looking for, but I
noticed
>  it repeated the execution few times and not just one time as needed!
...
>  Is there is a way where I can restrict the execution of this exe to
just
>  one time?

To have it run just once for the parent, use:
<inherited>false</inherited>

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

(You should also add an <id> for the execution.)

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to