From a050d81004265567a92af5162e164a73823ee0b2 Mon Sep 17 00:00:00 2001 From: Brett Wooldridge Date: Wed, 1 Feb 2023 02:00:27 +0900 Subject: [PATCH] Cleanup maven build and modify for Java 11+ only. --- .gitignore | 3 +- pom.xml | 87 +++++-------------- src/main/{java11 => java}/module-info.java | 1 + .../zaxxer/hikari/osgi/OSGiBundleTest.java | 4 +- .../java/com/zaxxer/hikari/pool/TestElf.java | 2 +- 5 files changed, 27 insertions(+), 70 deletions(-) rename src/main/{java11 => java}/module-info.java (94%) diff --git a/.gitignore b/.gitignore index 45f16c83..6e129f22 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .classpath .project +.metadata target/ dependency-reduced-pom.xml @@ -17,8 +18,6 @@ dependency-reduced-pom.xml *.ipr .tm_* -.classpath -.project .idea/ .gradle/ out/ diff --git a/pom.xml b/pom.xml index 32cc5880..61994449 100644 --- a/pom.xml +++ b/pom.xml @@ -3,32 +3,32 @@ UTF-8 - + --add-modules=ALL-MODULE-PATH false - ${project.basedir}/src/main/java11 - ${project.build.directory}/classes-java11 + + - 0.36.0 + 0.40.3 5.1.1 6.0.1 5.4.24.Final - 3.27.0-GA + 3.29.2-GA 0.11.4.1 2.5.3 3.2.5 1.5.10 0.9.0 3.7.7 - 4.13.1 + 4.13.5 2.5.4 - 42.3.3 - 2.17.2 - 1.7.30 + 42.5.1 + 2.18.0 + 1.7.36 1.5 2.1.212 - 4.13.1 - 1.15.1 + 4.13.2 + 1.17.6 com.zaxxer @@ -59,7 +59,7 @@ The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt + https://www.apache.org/licenses/LICENSE-2.0.txt repo @@ -187,6 +187,12 @@ ${jndi.version} test + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + test + @@ -311,6 +317,7 @@ -cp ${project.build.outputDirectory}${path.separator}${maven.compile.classpath} com.zaxxer.hikari.util.JavassistProxyFactory + ${project.basedir}${file.separator} @@ -368,7 +375,7 @@ org.jacoco jacoco-maven-plugin - 0.8.2 + 0.8.8 @@ -429,7 +436,7 @@ ${artifact.classifier} ${automatic.module.name} - true + HikariCP com.zaxxer.hikari, @@ -504,7 +511,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 3.0.0-M8 ${surefireArgLine} ${sureFireOptions11} @@ -558,56 +565,6 @@ - - Java11 - - [11,) - - - - 2.0.0-alpha1 - false - com.zaxxer.hikari - - - - org.apache.logging.log4j - log4j-slf4j18-impl - ${log4j.version} - test - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - - compile-java11 - - compile - - - 11 - - ${project.basedir}/src/main/java11 - - true - - - - - - - - release-sign-artifacts diff --git a/src/main/java11/module-info.java b/src/main/java/module-info.java similarity index 94% rename from src/main/java11/module-info.java rename to src/main/java/module-info.java index 5a931ffd..dd7142a6 100644 --- a/src/main/java11/module-info.java +++ b/src/main/java/module-info.java @@ -9,6 +9,7 @@ module com.zaxxer.hikari requires static metrics.core; requires static metrics.healthchecks; requires static micrometer.core; + requires static org.javassist; exports com.zaxxer.hikari; exports com.zaxxer.hikari.hibernate; diff --git a/src/test/java/com/zaxxer/hikari/osgi/OSGiBundleTest.java b/src/test/java/com/zaxxer/hikari/osgi/OSGiBundleTest.java index 57374249..6c96104d 100644 --- a/src/test/java/com/zaxxer/hikari/osgi/OSGiBundleTest.java +++ b/src/test/java/com/zaxxer/hikari/osgi/OSGiBundleTest.java @@ -78,8 +78,8 @@ public class OSGiBundleTest return options( systemProperty("org.osgi.framework.storage.clean").value("true"), systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("WARN"), - mavenBundle("org.slf4j", "slf4j-api", "1.7.5"), - mavenBundle("org.slf4j", "slf4j-simple", "1.7.5").noStart(), + mavenBundle("org.slf4j", "slf4j-api", "1.7.36"), + mavenBundle("org.slf4j", "slf4j-simple", "1.7.36").noStart(), new File("target/classes").exists() ? bundle("reference:file:target/classes") : bundle("reference:file:../target/classes"), diff --git a/src/test/java/com/zaxxer/hikari/pool/TestElf.java b/src/test/java/com/zaxxer/hikari/pool/TestElf.java index 7846970a..352b9b33 100644 --- a/src/test/java/com/zaxxer/hikari/pool/TestElf.java +++ b/src/test/java/com/zaxxer/hikari/pool/TestElf.java @@ -48,7 +48,7 @@ public final class TestElf } public static boolean isJava11() { - return System.getProperty("java.version").startsWith("11"); + return Integer.parseInt(System.getProperty("java.version").split("\\.")[0]) >= 11; } public static HikariPool getPool(final HikariDataSource ds)