This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis-thirdparty.git
The following commit(s) were added to refs/heads/master by this push:
new fa97c05 RATIS-2362. Use maven.compiler.release for target Java
version (#74)
fa97c05 is described below
commit fa97c05b46f145ad0ca275ea440c3cc4bb48220a
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Sun Nov 16 13:18:25 2025 +0100
RATIS-2362. Use maven.compiler.release for target Java version (#74)
---
pom.xml | 73 +++++++----------------------------------------------------------
1 file changed, 7 insertions(+), 66 deletions(-)
diff --git a/pom.xml b/pom.xml
index 5468eea..21c7679 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,16 +55,16 @@
<copy-rename-maven-plugin.version>1.0</copy-rename-maven-plugin.version>
<cyclonedx.version>2.8.0</cyclonedx.version>
<exec-maven-plugin.version>1.3.1</exec-maven-plugin.version>
+ <extra-enforcer-rules.version>1.11.0</extra-enforcer-rules.version>
<maven-bundle-plugin.version>2.5.3</maven-bundle-plugin.version>
<maven-replacer-plugin.version>1.5.3</maven-replacer-plugin.version>
<native-maven-plugin.version>1.0-alpha-8</native-maven-plugin.version>
<os-maven-plugin.version>1.5.0.Final</os-maven-plugin.version>
<!-- define the Java language version used by the compiler -->
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <java.min.version>${maven.compiler.source}</java.min.version>
- <maven.min.version>3.3.9</maven.min.version>
+ <maven.compiler.release>8</maven.compiler.release>
+ <!-- override maven.compiler.target=8 defined in parent POM 35; can be
removed on upgrade to 36+ -->
+ <maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<!--Version of protobuf to be shaded -->
<shaded.protobuf.version>3.25.8</shaded.protobuf.version>
@@ -195,20 +195,6 @@
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <configuration>
- <rules>
- <requireMavenVersion>
- <version>[${maven.min.version},)</version>
- </requireMavenVersion>
- <requireJavaVersion>
- <version>[${java.min.version},)</version>
- </requireJavaVersion>
- </rules>
- </configuration>
- </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
@@ -260,49 +246,6 @@
</pluginManagement>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <inherited>false</inherited>
- <executions>
- <execution>
- <id>clean</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <phase>pre-clean</phase>
- </execution>
- <execution>
- <id>default</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <phase>validate</phase>
- <configuration>
- <rules>
- <!-- The earliest maven version we verify builds for via ASF
Jenkins -->
- <requireMavenVersion>
- <version>[${maven.min.version},)</version>
- <message>Maven is out of date.
- Ratis requires at least version ${maven.min.version} of
Maven to properly build from source.
- You appear to be using an older version. You can use
either "mvn -version" or
- "mvn enforcer:display-info" to verify what version is
active.
- </message>
- </requireMavenVersion>
- <!-- The earliest JVM version we verify builds for via ASF
Jenkins -->
- <requireJavaVersion>
- <version>[${java.min.version},)</version>
- <message>Java is out of date.
- Ratis requires at least version ${java.min.version} of the
JDK to properly build from source.
- You appear to be using an older version. You can use
either "mvn -version" or
- "mvn enforcer:display-info" to verify what version is
active.
- </message>
- </requireJavaVersion>
- </rules>
- </configuration>
- </execution>
- </executions>
- </plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
@@ -338,7 +281,7 @@
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
- <version>1.0-beta-6</version>
+ <version>${extra-enforcer-rules.version}</version>
</dependency>
</dependencies>
<executions>
@@ -351,13 +294,11 @@
<configuration>
<rules>
<enforceBytecodeVersion>
- <maxJdkVersion>${java.min.version}</maxJdkVersion>
+ <maxJdkVersion>${maven.compiler.release}</maxJdkVersion>
<message>Ratis has unsupported dependencies.
- Ratis requires that all dependencies be compiled with
version ${java.min.version} or earlier
+ Ratis requires that all dependencies be compiled with
version ${maven.compiler.release} or earlier
of the JDK to properly build from source. You appear
to be using a newer dependency. You can use
either "mvn -version" or "mvn enforcer:display-info"
to verify what version is active.
- Non-release builds can temporarily build with a newer
JDK version by setting the
- 'javac.source' property (eg. mvn -Djavac.source=1.8
clean package).
</message>
</enforceBytecodeVersion>
</rules>