Skip to content

Commit d9ee5fa

Browse files
committed
Renamed Java9 artifact to Java11.
1 parent aaf4d3a commit d9ee5fa

File tree

6 files changed

+66
-40
lines changed

6 files changed

+66
-40
lines changed

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ before_script:
99

1010
script:
1111
- export JDK8_HOME=$(jdk_switcher home oraclejdk8)
12-
- export JDK9_HOME=/usr/lib/jvm/java-9-oracle
13-
- test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk8)
12+
- export JDK11_HOME=/usr/lib/jvm/java-11-oracle
13+
- test -d "${JDK11_HOME}" || export JDK11_HOME=$(jdk_switcher home oraclejdk8)
1414

1515
before_cache:
1616
# No sense in caching current build artifacts
@@ -24,10 +24,9 @@ matrix:
2424
fast_finish: true
2525
include:
2626
- jdk: oraclejdk8
27-
- jdk: oraclejdk9
28-
env:
29-
- JDK=9
3027
- jdk: oraclejdk11
28+
env:
29+
- JDK=11
3130

3231
install: /bin/true
3332

pom.xml

Lines changed: 54 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
<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">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23
<modelVersion>4.0.0</modelVersion>
34

45
<properties>
56
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6-
<sureFireOptions9 />
7-
<sureFireForks9>false</sureFireForks9>
8-
<java9.sourceDirectory>${project.basedir}/src/main/java9</java9.sourceDirectory>
9-
<java9.build.outputDirectory>${project.build.directory}/classes-java9</java9.build.outputDirectory>
10-
<artifact.classifier />
7+
<sureFireOptions11/>
8+
<sureFireForks11>false</sureFireForks11>
9+
<java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
10+
<java11.build.outputDirectory>${project.build.directory}/classes-java11</java11.build.outputDirectory>
11+
<artifact.classifier/>
1112

1213
<docker.maven.plugin.fabric8.version>0.33.0</docker.maven.plugin.fabric8.version>
13-
<felix.bundle.plugin.version>4.1.0</felix.bundle.plugin.version>
14+
<felix.bundle.plugin.version>4.2.1</felix.bundle.plugin.version>
1415
<felix.version>6.0.1</felix.version>
1516
<hibernate.version>5.2.10.Final</hibernate.version>
1617
<javassist.version>3.24.1-GA</javassist.version>
@@ -72,10 +73,6 @@
7273
<version>9</version>
7374
</parent>
7475

75-
<prerequisites>
76-
<maven>3.3.9</maven>
77-
</prerequisites>
78-
7976
<dependencies>
8077
<dependency>
8178
<groupId>org.slf4j</groupId>
@@ -246,6 +243,27 @@
246243

247244
<build>
248245
<plugins>
246+
<plugin>
247+
<groupId>org.apache.maven.plugins</groupId>
248+
<artifactId>maven-enforcer-plugin</artifactId>
249+
<version>3.0.0-M3</version>
250+
<executions>
251+
<execution>
252+
<id>enforce-maven</id>
253+
<goals>
254+
<goal>enforce</goal>
255+
</goals>
256+
<configuration>
257+
<rules>
258+
<requireMavenVersion>
259+
<version>3.3.9</version>
260+
</requireMavenVersion>
261+
</rules>
262+
</configuration>
263+
</execution>
264+
</executions>
265+
</plugin>
266+
249267
<plugin>
250268
<!-- Generate proxies -->
251269
<groupId>org.codehaus.mojo</groupId>
@@ -376,7 +394,7 @@
376394
<configuration>
377395
<classifier>${artifact.classifier}</classifier>
378396
<instructions>
379-
<Automatic-Module-Name>com.zaxxer.hikari</Automatic-Module-Name>
397+
<Automatic-Module-Name>${automatic.module.name}</Automatic-Module-Name>
380398
<Multi-Release>true</Multi-Release>
381399
<Bundle-Name>HikariCP</Bundle-Name>
382400
<Export-Package>
@@ -452,10 +470,10 @@
452470
<version>2.22.1</version>
453471
<configuration>
454472
<!-- Sets the VM argument line used when unit tests are run. -->
455-
<argLine>${surefireArgLine} ${sureFireOptions9}</argLine>
473+
<argLine>${surefireArgLine} ${sureFireOptions11}</argLine>
456474
<!-- Skips unit tests if the value of skip.unit.tests property is true -->
457475
<skipTests>${skip.unit.tests}</skipTests>
458-
<reuseForks>${sureFireForks9}</reuseForks>
476+
<reuseForks>${sureFireForks11}</reuseForks>
459477
</configuration>
460478
</plugin>
461479

@@ -504,19 +522,28 @@
504522

505523
<profiles>
506524
<profile>
507-
<id>Java9</id>
525+
<id>Java8</id>
526+
<activation>
527+
<jdk>[,11)</jdk>
528+
</activation>
529+
<properties>
530+
<automatic.module.name>com.zaxxer.hikari</automatic.module.name>
531+
</properties>
532+
</profile>
533+
<profile>
534+
<id>Java11</id>
508535
<activation>
509-
<jdk>[9,)</jdk>
536+
<jdk>[11,)</jdk>
510537
</activation>
511538
<properties>
512-
<!-- sureFireOptions9>
539+
<!-- sureFireOptions11>
513540
-add-opens java.base/java.net=ALL-UNNAMED
514541
-add-opens java.base/java.security=ALL-UNNAMED
515542
-add-exports java.base/sun.net.www.protocol.http=ALL-UNNAMED
516543
-add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED
517-
</sureFireOptions9 -->
518-
<sureFireForks9>true</sureFireForks9>
519-
<artifact.classifier>java9</artifact.classifier>
544+
</sureFireOptions11 -->
545+
<sureFireForks11>true</sureFireForks11>
546+
<artifact.classifier>java11</artifact.classifier>
520547
</properties>
521548

522549
<build>
@@ -526,18 +553,18 @@
526553
<artifactId>maven-antrun-plugin</artifactId>
527554
<executions>
528555
<execution>
529-
<id>compile-java9</id>
556+
<id>compile-java11</id>
530557
<phase>compile</phase>
531558
<goals>
532559
<goal>run</goal>
533560
</goals>
534561
<configuration>
535562
<tasks>
536-
<mkdir dir="${java9.build.outputDirectory}"/>
537-
<copy todir="${java9.build.outputDirectory}">
563+
<mkdir dir="${java11.build.outputDirectory}"/>
564+
<copy todir="${java11.build.outputDirectory}">
538565
<fileset dir="${project.build.outputDirectory}"/>
539566
</copy>
540-
<javac srcdir="${java9.sourceDirectory}" destdir="${java9.build.outputDirectory}"
567+
<javac srcdir="${java11.sourceDirectory}" destdir="${java11.build.outputDirectory}"
541568
classpath="${project.build.outputDirectory}" includeantruntime="false"/>
542569
</tasks>
543570
</configuration>
@@ -548,6 +575,7 @@
548575
<plugin>
549576
<groupId>org.apache.maven.plugins</groupId>
550577
<artifactId>maven-resources-plugin</artifactId>
578+
<version>3.1.0</version>
551579
<executions>
552580
<execution>
553581
<id>copy-module-info</id>
@@ -556,10 +584,10 @@
556584
<goal>copy-resources</goal>
557585
</goals>
558586
<configuration>
559-
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/9</outputDirectory>
587+
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/11</outputDirectory>
560588
<resources>
561589
<resource>
562-
<directory>${java9.build.outputDirectory}</directory>
590+
<directory>${java11.build.outputDirectory}</directory>
563591
<includes>
564592
<include>module-info.class</include>
565593
</includes>
File renamed without changes.

src/test/java/com/zaxxer/hikari/osgi/OSGiBundleTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import javax.inject.Inject;
3131
import java.io.File;
3232

33-
import static com.zaxxer.hikari.pool.TestElf.isJava9;
33+
import static com.zaxxer.hikari.pool.TestElf.isJava11;
3434
import static org.junit.Assert.assertNotNull;
3535
import static org.junit.Assert.assertTrue;
3636
import static org.ops4j.pax.exam.CoreOptions.*;
@@ -96,14 +96,14 @@ public ConditionalPaxExam(Class<?> klass) throws InitializationError {
9696

9797
@Override
9898
public void run(RunNotifier notifier) {
99-
if (!isJava9()) {
99+
if (!isJava11()) {
100100
super.run(notifier);
101101
}
102102
}
103103

104104
@Override
105105
public void filter(Filter filter) throws NoTestsRemainException {
106-
if (isJava9()) {
106+
if (isJava11()) {
107107
throw new NoTestsRemainException();
108108
}
109109

src/test/java/com/zaxxer/hikari/pool/TestElf.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ private TestElf() {
4646
// default constructor
4747
}
4848

49-
public static boolean isJava9() {
50-
return System.getProperty("java.version").startsWith("9");
49+
public static boolean isJava11() {
50+
return System.getProperty("java.version").startsWith("11");
5151
}
5252

5353
public static HikariPool getPool(final HikariDataSource ds)

src/test/java/com/zaxxer/hikari/util/TomcatConcurrentBagLeakTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.zaxxer.hikari.util;
1818

19-
import com.zaxxer.hikari.pool.TestElf;
2019
import com.zaxxer.hikari.pool.TestElf.FauxWebClassLoader;
2120
import com.zaxxer.hikari.util.ConcurrentBag.IConcurrentBagEntry;
2221
import org.junit.FixMethodOrder;
@@ -33,7 +32,7 @@
3332
import java.util.Iterator;
3433
import java.util.concurrent.CompletableFuture;
3534

36-
import static com.zaxxer.hikari.pool.TestElf.isJava9;
35+
import static com.zaxxer.hikari.pool.TestElf.isJava11;
3736
import static java.util.concurrent.TimeUnit.MILLISECONDS;
3837
import static org.junit.Assert.assertNotNull;
3938
import static org.junit.Assert.assertNull;
@@ -48,7 +47,7 @@ public class TomcatConcurrentBagLeakTest
4847
@Test
4948
public void testConcurrentBagForLeaks() throws Exception
5049
{
51-
assumeTrue(!isJava9());
50+
assumeTrue(!isJava11());
5251

5352
ClassLoader cl = new FauxWebClassLoader();
5453
Class<?> clazz = cl.loadClass(this.getClass().getName() + "$FauxWebContext");
@@ -65,7 +64,7 @@ public void testConcurrentBagForLeaks() throws Exception
6564
@Test
6665
public void testConcurrentBagForLeaks2() throws Exception
6766
{
68-
assumeTrue(!isJava9());
67+
assumeTrue(!isJava11());
6968

7069
ClassLoader cl = this.getClass().getClassLoader();
7170
Class<?> clazz = cl.loadClass(this.getClass().getName() + "$FauxWebContext");

0 commit comments

Comments
 (0)