amaresh,

you include the plugin in the "Parent" therefore it is automatically available in the child.

chuck

On 04/11/2011 08:08 AM, amaresh mourya wrote:
Hi I have a parent pom and a child POM.

*Parent POM is like : *

<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0";>
     <modelVersion>4.0.0</modelVersion>
     <groupId>Application6</groupId>
     <artifactId>Application6</artifactId>
     <version>1.0-SNAPSHOT</version>
     <modules>
         <module>mavenProj</module>
     </modules>
     <packaging>pom</packaging>
     <build>
     <pluginManagement>
         <plugins>
             <plugin>
                 <groupId>MyPlugins</groupId>
                 <artifactId>hiPlugin</artifactId>
                 <version>1.0</version>
                 <configuration>
                     <greetings>welcome</greetings>
                 </configuration>
             </plugin>
         </plugins>
         </pluginManagement>
     </build>
     <pluginRepositories>
         <pluginRepository>
             <id>228655859</id>
             <name>hosted</name>
             <url>http://localhost/hostedRepo/</url>
         </pluginRepository>
     </pluginRepositories>
</project>


*And Child POM is : *

<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0";>
     <modelVersion>4.0.0</modelVersion>
     <groupId>Application6</groupId>
     <artifactId>mavenProj</artifactId>
     <version>1.0-SNAPSHOT</version>
     <description>Project for mavenProj</description>
     <parent>
         <groupId>Application6</groupId>
         <artifactId>Application6</artifactId>
         <version>1.0-SNAPSHOT</version>
     </parent>
</project>

Please note that I have created a maven plugin (hiPlugin) that takes a
string via<greetings>  and just shows it.

*Question : My question is when I rum this plugin's goal on the child POM I
am getting the output. I was expecting nothing to happen since I haven't
specified
<plugin>
                 <groupId>MyPlugins</groupId>
                 <artifactId>hiPlugin</artifactId>
</plugin>
  section in my child POM. And the maven documentation also says you won't be
able to run any plugin defined the the plugiManagement section unless you
specify that plugin in child POM. here is the link :
http://maven.apache.org/pom.html#Plugin_Management



Thanks,
Amaresh
**
*



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

Reply via email to