Renamed Java9 artifact to Java11.

pull/1573/head
Gili Tzabari 5 years ago
parent aaf4d3a59e
commit d9ee5fab69

@ -9,8 +9,8 @@ before_script:
script: script:
- export JDK8_HOME=$(jdk_switcher home oraclejdk8) - export JDK8_HOME=$(jdk_switcher home oraclejdk8)
- export JDK9_HOME=/usr/lib/jvm/java-9-oracle - export JDK11_HOME=/usr/lib/jvm/java-11-oracle
- test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk8) - test -d "${JDK11_HOME}" || export JDK11_HOME=$(jdk_switcher home oraclejdk8)
before_cache: before_cache:
# No sense in caching current build artifacts # No sense in caching current build artifacts
@ -24,10 +24,9 @@ matrix:
fast_finish: true fast_finish: true
include: include:
- jdk: oraclejdk8 - jdk: oraclejdk8
- jdk: oraclejdk9
env:
- JDK=9
- jdk: oraclejdk11 - jdk: oraclejdk11
env:
- JDK=11
install: /bin/true install: /bin/true

@ -1,16 +1,17 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sureFireOptions9 /> <sureFireOptions11/>
<sureFireForks9>false</sureFireForks9> <sureFireForks11>false</sureFireForks11>
<java9.sourceDirectory>${project.basedir}/src/main/java9</java9.sourceDirectory> <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
<java9.build.outputDirectory>${project.build.directory}/classes-java9</java9.build.outputDirectory> <java11.build.outputDirectory>${project.build.directory}/classes-java11</java11.build.outputDirectory>
<artifact.classifier /> <artifact.classifier/>
<docker.maven.plugin.fabric8.version>0.33.0</docker.maven.plugin.fabric8.version> <docker.maven.plugin.fabric8.version>0.33.0</docker.maven.plugin.fabric8.version>
<felix.bundle.plugin.version>4.1.0</felix.bundle.plugin.version> <felix.bundle.plugin.version>4.2.1</felix.bundle.plugin.version>
<felix.version>6.0.1</felix.version> <felix.version>6.0.1</felix.version>
<hibernate.version>5.2.10.Final</hibernate.version> <hibernate.version>5.2.10.Final</hibernate.version>
<javassist.version>3.24.1-GA</javassist.version> <javassist.version>3.24.1-GA</javassist.version>
@ -72,10 +73,6 @@
<version>9</version> <version>9</version>
</parent> </parent>
<prerequisites>
<maven>3.3.9</maven>
</prerequisites>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
@ -246,6 +243,27 @@
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.3.9</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<!-- Generate proxies --> <!-- Generate proxies -->
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
@ -376,7 +394,7 @@
<configuration> <configuration>
<classifier>${artifact.classifier}</classifier> <classifier>${artifact.classifier}</classifier>
<instructions> <instructions>
<Automatic-Module-Name>com.zaxxer.hikari</Automatic-Module-Name> <Automatic-Module-Name>${automatic.module.name}</Automatic-Module-Name>
<Multi-Release>true</Multi-Release> <Multi-Release>true</Multi-Release>
<Bundle-Name>HikariCP</Bundle-Name> <Bundle-Name>HikariCP</Bundle-Name>
<Export-Package> <Export-Package>
@ -452,10 +470,10 @@
<version>2.22.1</version> <version>2.22.1</version>
<configuration> <configuration>
<!-- Sets the VM argument line used when unit tests are run. --> <!-- Sets the VM argument line used when unit tests are run. -->
<argLine>${surefireArgLine} ${sureFireOptions9}</argLine> <argLine>${surefireArgLine} ${sureFireOptions11}</argLine>
<!-- Skips unit tests if the value of skip.unit.tests property is true --> <!-- Skips unit tests if the value of skip.unit.tests property is true -->
<skipTests>${skip.unit.tests}</skipTests> <skipTests>${skip.unit.tests}</skipTests>
<reuseForks>${sureFireForks9}</reuseForks> <reuseForks>${sureFireForks11}</reuseForks>
</configuration> </configuration>
</plugin> </plugin>
@ -504,19 +522,28 @@
<profiles> <profiles>
<profile> <profile>
<id>Java9</id> <id>Java8</id>
<activation>
<jdk>[,11)</jdk>
</activation>
<properties>
<automatic.module.name>com.zaxxer.hikari</automatic.module.name>
</properties>
</profile>
<profile>
<id>Java11</id>
<activation> <activation>
<jdk>[9,)</jdk> <jdk>[11,)</jdk>
</activation> </activation>
<properties> <properties>
<!-- sureFireOptions9> <!-- sureFireOptions11>
-add-opens java.base/java.net=ALL-UNNAMED -add-opens java.base/java.net=ALL-UNNAMED
-add-opens java.base/java.security=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.http=ALL-UNNAMED
-add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED -add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED
</sureFireOptions9 --> </sureFireOptions11 -->
<sureFireForks9>true</sureFireForks9> <sureFireForks11>true</sureFireForks11>
<artifact.classifier>java9</artifact.classifier> <artifact.classifier>java11</artifact.classifier>
</properties> </properties>
<build> <build>
@ -526,18 +553,18 @@
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>compile-java9</id> <id>compile-java11</id>
<phase>compile</phase> <phase>compile</phase>
<goals> <goals>
<goal>run</goal> <goal>run</goal>
</goals> </goals>
<configuration> <configuration>
<tasks> <tasks>
<mkdir dir="${java9.build.outputDirectory}"/> <mkdir dir="${java11.build.outputDirectory}"/>
<copy todir="${java9.build.outputDirectory}"> <copy todir="${java11.build.outputDirectory}">
<fileset dir="${project.build.outputDirectory}"/> <fileset dir="${project.build.outputDirectory}"/>
</copy> </copy>
<javac srcdir="${java9.sourceDirectory}" destdir="${java9.build.outputDirectory}" <javac srcdir="${java11.sourceDirectory}" destdir="${java11.build.outputDirectory}"
classpath="${project.build.outputDirectory}" includeantruntime="false"/> classpath="${project.build.outputDirectory}" includeantruntime="false"/>
</tasks> </tasks>
</configuration> </configuration>
@ -548,6 +575,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions> <executions>
<execution> <execution>
<id>copy-module-info</id> <id>copy-module-info</id>
@ -556,10 +584,10 @@
<goal>copy-resources</goal> <goal>copy-resources</goal>
</goals> </goals>
<configuration> <configuration>
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/9</outputDirectory> <outputDirectory>${project.build.outputDirectory}/META-INF/versions/11</outputDirectory>
<resources> <resources>
<resource> <resource>
<directory>${java9.build.outputDirectory}</directory> <directory>${java11.build.outputDirectory}</directory>
<includes> <includes>
<include>module-info.class</include> <include>module-info.class</include>
</includes> </includes>

@ -30,7 +30,7 @@ import org.osgi.framework.BundleContext;
import javax.inject.Inject; import javax.inject.Inject;
import java.io.File; import java.io.File;
import static com.zaxxer.hikari.pool.TestElf.isJava9; import static com.zaxxer.hikari.pool.TestElf.isJava11;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.*; import static org.ops4j.pax.exam.CoreOptions.*;
@ -96,14 +96,14 @@ public class OSGiBundleTest
@Override @Override
public void run(RunNotifier notifier) { public void run(RunNotifier notifier) {
if (!isJava9()) { if (!isJava11()) {
super.run(notifier); super.run(notifier);
} }
} }
@Override @Override
public void filter(Filter filter) throws NoTestsRemainException { public void filter(Filter filter) throws NoTestsRemainException {
if (isJava9()) { if (isJava11()) {
throw new NoTestsRemainException(); throw new NoTestsRemainException();
} }

@ -46,8 +46,8 @@ public final class TestElf
// default constructor // default constructor
} }
public static boolean isJava9() { public static boolean isJava11() {
return System.getProperty("java.version").startsWith("9"); return System.getProperty("java.version").startsWith("11");
} }
public static HikariPool getPool(final HikariDataSource ds) public static HikariPool getPool(final HikariDataSource ds)

@ -16,7 +16,6 @@
package com.zaxxer.hikari.util; package com.zaxxer.hikari.util;
import com.zaxxer.hikari.pool.TestElf;
import com.zaxxer.hikari.pool.TestElf.FauxWebClassLoader; import com.zaxxer.hikari.pool.TestElf.FauxWebClassLoader;
import com.zaxxer.hikari.util.ConcurrentBag.IConcurrentBagEntry; import com.zaxxer.hikari.util.ConcurrentBag.IConcurrentBagEntry;
import org.junit.FixMethodOrder; import org.junit.FixMethodOrder;
@ -33,7 +32,7 @@ import java.util.ConcurrentModificationException;
import java.util.Iterator; import java.util.Iterator;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import static com.zaxxer.hikari.pool.TestElf.isJava9; import static com.zaxxer.hikari.pool.TestElf.isJava11;
import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
@ -48,7 +47,7 @@ public class TomcatConcurrentBagLeakTest
@Test @Test
public void testConcurrentBagForLeaks() throws Exception public void testConcurrentBagForLeaks() throws Exception
{ {
assumeTrue(!isJava9()); assumeTrue(!isJava11());
ClassLoader cl = new FauxWebClassLoader(); ClassLoader cl = new FauxWebClassLoader();
Class<?> clazz = cl.loadClass(this.getClass().getName() + "$FauxWebContext"); Class<?> clazz = cl.loadClass(this.getClass().getName() + "$FauxWebContext");
@ -65,7 +64,7 @@ public class TomcatConcurrentBagLeakTest
@Test @Test
public void testConcurrentBagForLeaks2() throws Exception public void testConcurrentBagForLeaks2() throws Exception
{ {
assumeTrue(!isJava9()); assumeTrue(!isJava11());
ClassLoader cl = this.getClass().getClassLoader(); ClassLoader cl = this.getClass().getClassLoader();
Class<?> clazz = cl.loadClass(this.getClass().getName() + "$FauxWebContext"); Class<?> clazz = cl.loadClass(this.getClass().getName() + "$FauxWebContext");

Loading…
Cancel
Save