Cleanup maven build and modify for Java 11+ only.

pull/2034/head
Brett Wooldridge 2 years ago
parent 504ee7d1b2
commit a050d81004

3
.gitignore vendored

@ -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/

@ -3,32 +3,32 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sureFireOptions11/>
<sureFireOptions11>--add-modules=ALL-MODULE-PATH</sureFireOptions11>
<sureFireForks11>false</sureFireForks11>
<java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
<java11.build.outputDirectory>${project.build.directory}/classes-java11</java11.build.outputDirectory>
<!--java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory -->
<!--java11.build.outputDirectory>${project.build.directory}/classes-java11</java11.build.outputDirectory -->
<artifact.classifier/>
<docker.maven.plugin.fabric8.version>0.36.0</docker.maven.plugin.fabric8.version>
<docker.maven.plugin.fabric8.version>0.40.3</docker.maven.plugin.fabric8.version>
<felix.bundle.plugin.version>5.1.1</felix.bundle.plugin.version>
<felix.version>6.0.1</felix.version>
<hibernate.version>5.4.24.Final</hibernate.version>
<javassist.version>3.27.0-GA</javassist.version>
<javassist.version>3.29.2-GA</javassist.version>
<jndi.version>0.11.4.1</jndi.version>
<maven.release.version>2.5.3</maven.release.version>
<metrics.version>3.2.5</metrics.version>
<micrometer.version>1.5.10</micrometer.version>
<simpleclient.version>0.9.0</simpleclient.version>
<mockito.version>3.7.7</mockito.version>
<pax.exam.version>4.13.1</pax.exam.version>
<pax.exam.version>4.13.5</pax.exam.version>
<pax.url.version>2.5.4</pax.url.version>
<postgresql.version>42.3.3</postgresql.version>
<log4j.version>2.17.2</log4j.version>
<slf4j.version>1.7.30</slf4j.version>
<postgresql.version>42.5.1</postgresql.version>
<log4j.version>2.18.0</log4j.version>
<slf4j.version>1.7.36</slf4j.version>
<commons.csv.version>1.5</commons.csv.version>
<h2.version>2.1.212</h2.version>
<junit.version>4.13.1</junit.version>
<testcontainers.version>1.15.1</testcontainers.version>
<junit.version>4.13.2</junit.version>
<testcontainers.version>1.17.6</testcontainers.version>
</properties>
<groupId>com.zaxxer</groupId>
@ -59,7 +59,7 @@
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
@ -187,6 +187,12 @@
<version>${jndi.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<!-- OSGi test -->
<dependency>
@ -311,6 +317,7 @@
<argument>-cp</argument>
<argument>${project.build.outputDirectory}${path.separator}${maven.compile.classpath}</argument>
<argument>com.zaxxer.hikari.util.JavassistProxyFactory</argument>
<argument>${project.basedir}${file.separator}</argument>
</arguments>
</configuration>
</plugin>
@ -368,7 +375,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.2</version>
<version>0.8.8</version>
<executions>
<!-- Prepares the property pointing to the JaCoCo runtime agent which is passed as VM argument when Maven the Surefire plugin is executed. -->
<execution>
@ -429,7 +436,7 @@
<classifier>${artifact.classifier}</classifier>
<instructions>
<Automatic-Module-Name>${automatic.module.name}</Automatic-Module-Name>
<Multi-Release>true</Multi-Release>
<!-- Multi-Release>true</Multi-Release-->
<Bundle-Name>HikariCP</Bundle-Name>
<Export-Package>
com.zaxxer.hikari,
@ -504,7 +511,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.0.0-M8</version>
<configuration>
<!-- Sets the VM argument line used when unit tests are run. -->
<argLine>${surefireArgLine} ${sureFireOptions11}</argLine>
@ -558,56 +565,6 @@
</build>
<profiles>
<profile>
<id>Java11</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<properties>
<!-- sureFireOptions11>
-add-opens java.base/java.net=ALL-UNNAMED
-add-opens java.base/java.security=ALL-UNNAMED
-add-exports java.base/sun.net.www.protocol.http=ALL-UNNAMED
-add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED
</sureFireOptions11 -->
<slf4j.version>2.0.0-alpha1</slf4j.version>
<sureFireForks11>false</sureFireForks11>
<automatic.module.name>com.zaxxer.hikari</automatic.module.name>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j18-impl</artifactId>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<executions>
<execution>
<id>compile-java11</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>11</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release-sign-artifacts</id>
<activation>

@ -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;

@ -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"),

@ -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)

Loading…
Cancel
Save