You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2015/01/31 16:59:27 UTC

svn commit: r1656209 - /maven/plugins/trunk/maven-pmd-plugin/src/site/apt/examples/targetJdk.apt.vm

Author: michaelo
Date: Sat Jan 31 15:59:27 2015
New Revision: 1656209

URL: http://svn.apache.org/r1656209
Log:
Rework target JDK exmaple to the changes made in MPMD-170

Modified:
    maven/plugins/trunk/maven-pmd-plugin/src/site/apt/examples/targetJdk.apt.vm

Modified: maven/plugins/trunk/maven-pmd-plugin/src/site/apt/examples/targetJdk.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pmd-plugin/src/site/apt/examples/targetJdk.apt.vm?rev=1656209&r1=1656208&r2=1656209&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pmd-plugin/src/site/apt/examples/targetJdk.apt.vm (original)
+++ maven/plugins/trunk/maven-pmd-plugin/src/site/apt/examples/targetJdk.apt.vm Sat Jan 31 15:59:27 2015
@@ -28,43 +28,27 @@
 
 Target JDK
 
- There is a configuration element in the PMD plugin that let you set which
- target JDK to use. Often you want this to be in sync with the configuration
- for maven-compiler-plugin. The best practice for this is to set up a property
- and use that in the configuration section for each of the plugins. Here is
- an example on how to set that up:
+ There is a configuration element in the PMD plugin that lets you set which
+ {{{../pmd-mojo.html#targetJdk}target JDK}} your Java code will be compiled for.
+ Often you want this to be in sync with the configuration for maven-compiler-plugin.
+ The best practice for this is to set up the wellknown property <<<maven.compiler.target>>>
+ and the rest will work automatically. Alternatively, you can set it manually:
 
 +--------------------+
 <project>
   ...
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0.2</version>
-        <configuration>
-          <source>${compileSource}</source>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  ...
   <reporting>
     <plugins>
       <plugin>
         <artifactId>maven-pmd-plugin</artifactId>
         <version>${project.version}</version>
         <configuration>
-          <targetJdk>${compileSource}</targetJdk>
+          <targetJdk>1.6</targetJdk>
         </configuration>
       </plugin>
     </plugins>
   </reporting>
   ...
-  <properties>
-    <compileSource>1.5</compileSource>
-  </properties>
-  ...
 </project>
 +--------------------+