Hi,

First of all, let me say I think Maven 2 is great. The major problem was the
lack of documentation, but I think it's been ove with the upcoming of the
book "Better builds with Maven".

I'd like to do something, but I'm not sure it's possible. I know how to bind
a plugin execution to a lifecycle phase, but I wonder if it'd be possible to
make this bind only for some determined packaging types. Of course, this
binding would be done in a parent POM.

For instance, execution of Hibernate doclet:

            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>xdoclet-maven-plugin</artifactId>
               <executions>
                   <execution>
                       <phase>compile</phase>
                       <goals>
                           <goal>xdoclet</goal>
                       </goals>

                       <configuration>
                           <tasks>
                               <mkdir dir="${project.build.sourceDirectory}"
/>
                               <hibernatedoclet
                                      excludedtags="@version,@author,@todo"
           mergeDir="${project.build.outputDirectory}"
           destDir="${project.build.outputDirectory}">
                                   <fileset dir="${
project.build.sourceDirectory}">
                                       <include name="**/*.java" />
                                   </fileset>
                                   <hibernate version="2.0"
             mergeDir="${project.build.outputDirectory}"
             destDir="${project.build.outputDirectory}" />
                               </hibernatedoclet>
                           </tasks>
                       </configuration>
                   </execution>
               </executions>
           </plugin>

I like this to be executed in every child project with "jar" packaging.

Thanks in advance,

Akbarr

Reply via email to