Managing compiler-version through maven.compiler.*-settings
authorKai Moritz <kai@juplo.de>
Tue, 7 Jun 2016 18:32:24 +0000 (20:32 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 12 Jun 2016 12:39:26 +0000 (14:39 +0200)
Like recommended on:
https://maven.apache.org/plugins/maven-pmd-plugin/examples/targetJdk.html

pom.xml

diff --git a/pom.xml b/pom.xml
index e699542..aff5b72 100644 (file)
--- a/pom.xml
+++ b/pom.xml
 
   <properties>
 
+    <encoding>UTF-8</encoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+
     <!-- character encoding -->
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
         <artifactId>maven-compiler-plugin</artifactId>
         <version>3.3</version>
         <configuration>
-          <source>1.7</source>
-          <target>1.7</target>
-          <encoding>utf8</encoding>
           <showWarnings>true</showWarnings>
         </configuration>
       </plugin>
         <version>3.5</version>
         <configuration>
           <linkXref>true</linkXref>
-          <targetJdk>1.5</targetJdk>
         </configuration>
       </plugin>
     </plugins>