You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/09/24 17:49:54 UTC

[isis] branch master updated: ISIS-2033: simplified way to override java source compliance level

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 9a0a748  ISIS-2033: simplified way to override java source compliance level
9a0a748 is described below

commit 9a0a7480e3a5ea9b0ffc1bdde91c9ee5ba3ad809
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Sep 24 19:49:42 2020 +0200

    ISIS-2033: simplified way to override java source compliance level
    
    default is 1.8 (aka 8)
    projects my now override this by setting a maven property like
    
    <maven.compiler.release>11</maven.compiler.release>
---
 core/pom.xml                     |  9 ++++-----
 examples/demo/javafx/pom.xml     | 20 +-------------------
 incubator/viewers/javafx/pom.xml | 21 +--------------------
 regressiontests/pom.xml          | 12 +++---------
 starters/pom.xml                 |  5 +++--
 tooling/pom.xml                  | 12 ++----------
 6 files changed, 14 insertions(+), 65 deletions(-)

diff --git a/core/pom.xml b/core/pom.xml
index 7b0943f..f8e709b 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -35,7 +35,7 @@
     </description>
 
 	<properties>
-
+	
 		<isis.skipTests>false</isis.skipTests>
 		<maven.test.skip>${isis.skipTests}</maven.test.skip>
 
@@ -45,8 +45,6 @@
 		<git-plugin.propertiesDir>org/apache/isis/core</git-plugin.propertiesDir>
 		<git-plugin.gitDir>${coreBaseDir}/../.git</git-plugin.gitDir>
 
-		<maven.compiler.source>1.8</maven.compiler.source>
-		<maven.compiler.target>1.8</maven.compiler.target>
 		<maven.compiler.arg>-parameters</maven.compiler.arg>
 
 		<dependency.locations.enabled>false</dependency.locations.enabled>
@@ -301,8 +299,9 @@
 					<configuration>
 						<showDeprecation>false</showDeprecation>
 						<showWarnings>false</showWarnings>
-						<source>${maven.compiler.source}</source>
-						<target>${maven.compiler.target}</target>
+						<!-- defaults, to be overridden with option maven.compiler.release -->
+						<source>1.8</source>
+						<target>1.8</target>
 						<compilerArgs>
 					        <arg>${maven.compiler.arg}</arg>
 					    </compilerArgs>
diff --git a/examples/demo/javafx/pom.xml b/examples/demo/javafx/pom.xml
index 5f70406..8c4c28f 100644
--- a/examples/demo/javafx/pom.xml
+++ b/examples/demo/javafx/pom.xml
@@ -28,6 +28,7 @@
 	<packaging>jar</packaging>
 
 	<properties>
+		<maven.compiler.release>11</maven.compiler.release>
 		<sonar.skip>true</sonar.skip>
 	</properties>
 
@@ -48,25 +49,6 @@
 				</excludes>
 			</resource>
 		</resources>
-
-		<plugins>
-			<!-- Compile -->
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<showDeprecation>false</showDeprecation>
-					<showWarnings>false</showWarnings>
-					<release>11</release>
-					<compilerArgs>
-						<arg>${maven.compiler.arg}</arg>
-					</compilerArgs>
-				</configuration>
-				<!-- goal:compile binds to phase:compile -->
-				<!-- goal:testCompile binds to phase:test-compile -->
-			</plugin>
-		</plugins>
-
 	</build>
 
 	<dependencies>
diff --git a/incubator/viewers/javafx/pom.xml b/incubator/viewers/javafx/pom.xml
index 23806a7..dd47d80 100644
--- a/incubator/viewers/javafx/pom.xml
+++ b/incubator/viewers/javafx/pom.xml
@@ -30,6 +30,7 @@
 	</description>
 
 	<properties>
+		<maven.compiler.release>11</maven.compiler.release>
 		<jar-plugin.automaticModuleName>org.apache.isis.incubator.viewer.javafx</jar-plugin.automaticModuleName>
 		<git-plugin.propertiesDir>org/apache/isis/incubator/viewer/javafx</git-plugin.propertiesDir>
 		<javafx.version>11.0.2</javafx.version>
@@ -37,26 +38,6 @@
 
 	<packaging>pom</packaging>
 
-	<build>
-		<plugins>
-			<!-- Compile -->
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<showDeprecation>false</showDeprecation>
-					<showWarnings>false</showWarnings>
-					<release>11</release>
-					<compilerArgs>
-						<arg>${maven.compiler.arg}</arg>
-					</compilerArgs>
-				</configuration>
-				<!-- goal:compile binds to phase:compile -->
-				<!-- goal:testCompile binds to phase:test-compile -->
-			</plugin>
-		</plugins>
-	</build>
-
 	<dependencyManagement>
 		<dependencies>
 
diff --git a/regressiontests/pom.xml b/regressiontests/pom.xml
index db64654..c03b967 100644
--- a/regressiontests/pom.xml
+++ b/regressiontests/pom.xml
@@ -33,11 +33,12 @@
 	<packaging>pom</packaging>
 
 	<properties>
+		
+		<maven.compiler.release>11</maven.compiler.release>
+		
 		<skip.regressionTests>false</skip.regressionTests>
 		<skipTests>${skip.regressionTests}</skipTests>
 		
-		<java.version>11</java.version>
-		
 	</properties>
 
 	<build>
@@ -60,13 +61,6 @@
 		<plugins>
 		
 			<plugin>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<release>${java.version}</release>
-				</configuration>
-			</plugin>
-		
-			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-surefire-plugin</artifactId>
 				<configuration>
diff --git a/starters/pom.xml b/starters/pom.xml
index fc855a8..3b2eb82 100644
--- a/starters/pom.xml
+++ b/starters/pom.xml
@@ -59,8 +59,9 @@
 					<configuration>
 						<showDeprecation>false</showDeprecation>
 						<showWarnings>false</showWarnings>
-						<source>${maven.compiler.source}</source>
-						<target>${maven.compiler.target}</target>
+						<!-- defaults, to be overridden with option maven.compiler.release -->
+						<source>1.8</source>
+						<target>1.8</target>
 						<compilerArgs>
 							<arg>${maven.compiler.arg}</arg>
 						</compilerArgs>
diff --git a/tooling/pom.xml b/tooling/pom.xml
index c7675f1..25b62ae 100644
--- a/tooling/pom.xml
+++ b/tooling/pom.xml
@@ -34,12 +34,12 @@
 	<packaging>pom</packaging>
 
 	<properties>
+	
+		<maven.compiler.release>11</maven.compiler.release>
 
 		<jar-plugin.automaticModuleName>org.apache.isis.tooling</jar-plugin.automaticModuleName>
 		<git-plugin.propertiesDir>org/apache/isis/tooling</git-plugin.propertiesDir>
 
-		<java.version>11</java.version>
-
 		<asciidoctorj.version>2.4.1</asciidoctorj.version>
 		<gradle-tooling.version>6.6.1</gradle-tooling.version>
 		<lombok.version>1.18.12</lombok.version>
@@ -82,14 +82,6 @@
 				</excludes>
 			</resource>
 		</resources>
-		<plugins>
-			<plugin>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<release>${java.version}</release>
-				</configuration>
-			</plugin>
-		</plugins>
 	</build>
 
 	<dependencyManagement>