On 2011-09-28 18:18, codingplayer wrote:
> Hi everybody,
> 
> I'm currently reworking my master pom to use the <pluginManagement> section
> as proposed.
> 
> For me it is still unclear which parts of a plugin-definition need to be
> placed in which section? (pluginManagment, plugins, reporting)
> 
> As i would interpret, the default config for a plugin should be placed into
> the <pluginManagement> section, for example with the maven-javadoc-plugin:
> 
> 1. i would place this under <pluginManagement>:
> 
>                 <plugin>
>                     <groupId>org.apache.maven.plugins</groupId>
>                     <artifactId>maven-javadoc-plugin</artifactId>
>                     <version>${javadoc.plugin.version}</version>
>                     <configuration>
>                         <source>${java.source.version}</source>
>                     </configuration>
>                     <executions>
>                         <execution>
>                             <phase>deploy</phase>
>                             <goals>
>                                 <goal>jar</goal>
>                             </goals>
>                         </execution>
>                     </executions>
>                 </plugin>
> 
> in order to automatically create a -javadoc.jar everytime the deploy phase
> is executed.
> 
> 2. in the <plugins> section, i would only place this:
> 
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-javadoc-plugin</artifactId>
>             </plugin>
> 
> to enable the javadoc plugin for my project (the version and configuration
> would be taken from the section above).
> 
> 3. also in the <reporting> section, i would place:
> 
>           <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-javadoc-plugin</artifactId>
>             <configuration>
>               <source>${java.source.version}</source>
>               <minmemory>128m</minmemory>
>               <maxmemory>512m</maxmemory>
>               <quiet>true</quiet>
>             </configuration>
>           </plugin>
> 
> for the site generation.
> 
> Is this right?

That's exactly right!

> I also wonder, if those plugins only needed for the site generation, should
> be configured in the <pluginManagement> section as well?
> 
> for example: the maven-jxr-plugin
>           <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-jxr-plugin</artifactId>
>             <version>${jxr.plugin.version}</version>
>             <configuration>
>               <linkJavadoc>true</linkJavadoc>
>               
>             </configuration>
>           </plugin>

It would have been good if this worked in the same way as for build
plugins. Unfortunately it doesn't. See
http://jira.codehaus.org/browse/MSITE-443 for more info on this.

> 
> i would appreciate any help, or a link to the corresponding maven
> documentation, since everything i could find was not that helpful.
> 
> br
> Roman
> 
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/correct-section-for-plugins-definitons-tp4849832p4849832.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to