Skip to content

Commit 3fb1902

Browse files
author
chenby@nextop.cn
committed
jdk9 support
1 parent 2e0eef4 commit 3fb1902

6 files changed

Lines changed: 299 additions & 11 deletions

File tree

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
language: java
22
jdk:
33
- oraclejdk8
4+
- oraclejdk9
45
branches:
56
only:
67
- master
8+
before_install:
9+
- pwd && ls
10+
- cp ./toolchains.xml ~/.m2/
711
script: "mvn clean package -P travis"
812
after_success:
913
- mvn clean test jacoco:report coveralls:report

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ A lite fast object pool written by Java.
2828

2929
## 1.2. Requirements
3030
jdk 1.8+
31-
maven-3.2.3+
31+
maven-3.3.1+(support [toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html))
3232

3333
## 1.3. Maven dependency
3434

3535
```xml
3636
<dependency>
3737
<groupId>cn.nextop</groupId>
3838
<artifactId>lite-pool</artifactId>
39-
<version>1.0.0-RC2</version>
39+
<version>1.0.0-RC3</version>
4040
</dependency>
4141
```
4242

4343
## 1.4. Install from source code
4444

4545
```
46-
$mvn clean install -Dmaven.test.skip=true
46+
$mvn clean install -Dmaven.test.skip=true --global-toolchains ./toolchains.xml
4747
```
4848

4949
# 2. Usage

README.zh_CN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ Lite-pool : 轻量快速的对象池
2828

2929
## 1.2. 安装前置条件
3030
jdk 1.8+
31-
maven-3.2.3+
31+
maven-3.3.1+(支持 [toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html))
3232

3333
## 1.3. Maven依赖
3434

3535
```xml
3636
<dependency>
3737
<groupId>cn.nextop</groupId>
3838
<artifactId>lite-pool</artifactId>
39-
<version>1.0.0-RC2</version>
39+
<version>1.0.0-RC3</version>
4040
</dependency>
4141
```
4242

4343
## 1.4. 安装源码到本地Maven仓库
4444

4545
```
46-
$mvn clean install -Dmaven.test.skip=true
46+
$mvn clean install -Dmaven.test.skip=true --global-toolchains ./toolchains.xml
4747
```
4848

4949
# 2. 用法

pom.xml

Lines changed: 171 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<groupId>cn.nextop</groupId>
2424
<artifactId>lite-pool</artifactId>
25-
<version>1.0.0-RC2</version>
25+
<version>1.0.0-RC3</version>
2626

2727
<name>lite-pool</name>
2828
<description>A lite fast object pool written by java</description>
@@ -53,7 +53,7 @@
5353
<connection>scm:git:git@github.com:nextopcn/lite-pool.git</connection>
5454
<url>scm:git:git@github.com:nextopcn/lite-pool.git</url>
5555
<developerConnection>scm:git:git@github.com:nextopcn/lite-pool.git</developerConnection>
56-
<tag>1.0.0-RC2</tag>
56+
<tag>1.0.0-RC3</tag>
5757
</scm>
5858

5959
<issueManagement>
@@ -65,7 +65,7 @@
6565
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6666
<maven.compiler.source>1.8</maven.compiler.source>
6767
<maven.compiler.target>1.8</maven.compiler.target>
68-
<slf4j.api.version>1.7.25</slf4j.api.version>
68+
<slf4j.api.version>1.8.0-beta2</slf4j.api.version>
6969
</properties>
7070

7171
<dependencies>
@@ -84,13 +84,13 @@
8484
<dependency>
8585
<groupId>org.apache.logging.log4j</groupId>
8686
<artifactId>log4j-core</artifactId>
87-
<version>2.6.1</version>
87+
<version>2.11.0</version>
8888
<scope>test</scope>
8989
</dependency>
9090
<dependency>
9191
<groupId>org.apache.logging.log4j</groupId>
9292
<artifactId>log4j-slf4j-impl</artifactId>
93-
<version>2.6.1</version>
93+
<version>2.11.0</version>
9494
<scope>test</scope>
9595
</dependency>
9696
<dependency>
@@ -130,11 +130,59 @@
130130
</archive>
131131
</configuration>
132132
</plugin>
133+
<plugin>
134+
<groupId>org.apache.maven.plugins</groupId>
135+
<artifactId>maven-toolchains-plugin</artifactId>
136+
<version>1.1</version>
137+
<executions>
138+
<execution>
139+
<id>toolchain</id>
140+
<goals>
141+
<goal>toolchain</goal>
142+
</goals>
143+
</execution>
144+
</executions>
145+
<configuration>
146+
<toolchains>
147+
<jdk>
148+
<version>9</version>
149+
</jdk>
150+
<jdk>
151+
<version>1.8</version>
152+
</jdk>
153+
</toolchains>
154+
</configuration>
155+
</plugin>
133156
<plugin>
134157
<groupId>org.apache.maven.plugins</groupId>
135158
<artifactId>maven-compiler-plugin</artifactId>
136159
<version>3.7.0</version>
160+
<executions>
161+
<execution>
162+
<id>base-compile</id>
163+
<goals>
164+
<goal>compile</goal>
165+
</goals>
166+
<configuration>
167+
<excludes>
168+
<exclude>module-info.java</exclude>
169+
</excludes>
170+
</configuration>
171+
</execution>
172+
<execution>
173+
<id>default-compile</id>
174+
<configuration>
175+
<jdkToolchain>
176+
<version>[9, )</version>
177+
</jdkToolchain>
178+
<release>9</release>
179+
</configuration>
180+
</execution>
181+
</executions>
137182
<configuration>
183+
<jdkToolchain>
184+
<version>[1.8, )</version>
185+
</jdkToolchain>
138186
<source>${maven.compiler.source}</source>
139187
<target>${maven.compiler.target}</target>
140188
<encoding>${project.build.sourceEncoding}</encoding>
@@ -154,6 +202,12 @@
154202
<version>3.0.0</version>
155203
<configuration>
156204
<encoding>${project.build.sourceEncoding}</encoding>
205+
<sourceFileExcludes>
206+
<sourceFileExclude>**/module-info.java</sourceFileExclude>
207+
</sourceFileExcludes>
208+
<jdkToolchain>
209+
<version>[9, )</version>
210+
</jdkToolchain>
157211
</configuration>
158212
<executions>
159213
<execution>
@@ -223,11 +277,59 @@
223277
</archive>
224278
</configuration>
225279
</plugin>
280+
<plugin>
281+
<groupId>org.apache.maven.plugins</groupId>
282+
<artifactId>maven-toolchains-plugin</artifactId>
283+
<version>1.1</version>
284+
<executions>
285+
<execution>
286+
<id>toolchain</id>
287+
<goals>
288+
<goal>toolchain</goal>
289+
</goals>
290+
</execution>
291+
</executions>
292+
<configuration>
293+
<toolchains>
294+
<jdk>
295+
<version>9</version>
296+
</jdk>
297+
<jdk>
298+
<version>1.8</version>
299+
</jdk>
300+
</toolchains>
301+
</configuration>
302+
</plugin>
226303
<plugin>
227304
<groupId>org.apache.maven.plugins</groupId>
228305
<artifactId>maven-compiler-plugin</artifactId>
229306
<version>3.7.0</version>
307+
<executions>
308+
<execution>
309+
<id>base-compile</id>
310+
<goals>
311+
<goal>compile</goal>
312+
</goals>
313+
<configuration>
314+
<excludes>
315+
<exclude>module-info.java</exclude>
316+
</excludes>
317+
</configuration>
318+
</execution>
319+
<execution>
320+
<id>default-compile</id>
321+
<configuration>
322+
<jdkToolchain>
323+
<version>[9, )</version>
324+
</jdkToolchain>
325+
<release>9</release>
326+
</configuration>
327+
</execution>
328+
</executions>
230329
<configuration>
330+
<jdkToolchain>
331+
<version>[1.8, )</version>
332+
</jdkToolchain>
231333
<source>${maven.compiler.source}</source>
232334
<target>${maven.compiler.target}</target>
233335
<encoding>${project.build.sourceEncoding}</encoding>
@@ -247,6 +349,12 @@
247349
<version>3.0.0</version>
248350
<configuration>
249351
<encoding>${project.build.sourceEncoding}</encoding>
352+
<sourceFileExcludes>
353+
<sourceFileExclude>**/module-info.java</sourceFileExclude>
354+
</sourceFileExcludes>
355+
<jdkToolchain>
356+
<version>[9, )</version>
357+
</jdkToolchain>
250358
</configuration>
251359
<executions>
252360
<execution>
@@ -289,6 +397,64 @@
289397
</archive>
290398
</configuration>
291399
</plugin>
400+
<plugin>
401+
<groupId>org.apache.maven.plugins</groupId>
402+
<artifactId>maven-toolchains-plugin</artifactId>
403+
<version>1.1</version>
404+
<executions>
405+
<execution>
406+
<id>toolchain</id>
407+
<goals>
408+
<goal>toolchain</goal>
409+
</goals>
410+
</execution>
411+
</executions>
412+
<configuration>
413+
<toolchains>
414+
<jdk>
415+
<version>9</version>
416+
</jdk>
417+
<jdk>
418+
<version>1.8</version>
419+
</jdk>
420+
</toolchains>
421+
</configuration>
422+
</plugin>
423+
<plugin>
424+
<groupId>org.apache.maven.plugins</groupId>
425+
<artifactId>maven-compiler-plugin</artifactId>
426+
<version>3.7.0</version>
427+
<executions>
428+
<execution>
429+
<id>base-compile</id>
430+
<goals>
431+
<goal>compile</goal>
432+
</goals>
433+
<configuration>
434+
<excludes>
435+
<exclude>module-info.java</exclude>
436+
</excludes>
437+
</configuration>
438+
</execution>
439+
<execution>
440+
<id>default-compile</id>
441+
<configuration>
442+
<jdkToolchain>
443+
<version>[9, )</version>
444+
</jdkToolchain>
445+
<release>9</release>
446+
</configuration>
447+
</execution>
448+
</executions>
449+
<configuration>
450+
<jdkToolchain>
451+
<version>[1.8, )</version>
452+
</jdkToolchain>
453+
<source>${maven.compiler.source}</source>
454+
<target>${maven.compiler.target}</target>
455+
<encoding>${project.build.sourceEncoding}</encoding>
456+
</configuration>
457+
</plugin>
292458
<plugin>
293459
<groupId>org.eluder.coveralls</groupId>
294460
<artifactId>coveralls-maven-plugin</artifactId>

src/main/java/module-info.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* @author Baoyi Chen
3+
* @since 1.0.0
4+
*/
5+
module cn.nextop.lite.pool {
6+
exports cn.nextop.lite.pool;
7+
exports cn.nextop.lite.pool.glossary;
8+
exports cn.nextop.lite.pool.impl;
9+
exports cn.nextop.lite.pool.support;
10+
exports cn.nextop.lite.pool.support.allocator;
11+
exports cn.nextop.lite.pool.support.allocator.allocation;
12+
exports cn.nextop.lite.pool.util;
13+
exports cn.nextop.lite.pool.util.builder;
14+
exports cn.nextop.lite.pool.util.concurrent;
15+
exports cn.nextop.lite.pool.util.concurrent.executor;
16+
exports cn.nextop.lite.pool.util.concurrent.future;
17+
exports cn.nextop.lite.pool.util.concurrent.future.impl;
18+
exports cn.nextop.lite.pool.util.concurrent.thread;
19+
exports cn.nextop.lite.pool.util.scheduler;
20+
exports cn.nextop.lite.pool.util.scheduler.impl;
21+
exports cn.nextop.lite.pool.util.scheduler.impl.executor;
22+
requires org.slf4j;
23+
requires java.management;
24+
}

0 commit comments

Comments
 (0)