Skip to content

Commit

Permalink
jdk9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Apr 11, 2018
1 parent 2e0eef4 commit 3fb1902
Show file tree
Hide file tree
Showing 6 changed files with 299 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
language: java
jdk:
- oraclejdk8
- oraclejdk9
branches:
only:
- master
before_install:
- pwd && ls
- cp ./toolchains.xml ~/.m2/
script: "mvn clean package -P travis"
after_success:
- mvn clean test jacoco:report coveralls:report
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ A lite fast object pool written by Java.

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

## 1.3. Maven dependency

```xml
<dependency>
<groupId>cn.nextop</groupId>
<artifactId>lite-pool</artifactId>
<version>1.0.0-RC2</version>
<version>1.0.0-RC3</version>
</dependency>
```

## 1.4. Install from source code

```
$mvn clean install -Dmaven.test.skip=true
$mvn clean install -Dmaven.test.skip=true --global-toolchains ./toolchains.xml
```

# 2. Usage
Expand Down
6 changes: 3 additions & 3 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ Lite-pool : 轻量快速的对象池

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

## 1.3. Maven依赖

```xml
<dependency>
<groupId>cn.nextop</groupId>
<artifactId>lite-pool</artifactId>
<version>1.0.0-RC2</version>
<version>1.0.0-RC3</version>
</dependency>
```

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

```
$mvn clean install -Dmaven.test.skip=true
$mvn clean install -Dmaven.test.skip=true --global-toolchains ./toolchains.xml
```

# 2. 用法
Expand Down
176 changes: 171 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>cn.nextop</groupId>
<artifactId>lite-pool</artifactId>
<version>1.0.0-RC2</version>
<version>1.0.0-RC3</version>

<name>lite-pool</name>
<description>A lite fast object pool written by java</description>
Expand Down Expand Up @@ -53,7 +53,7 @@
<connection>scm:git:[email protected]:nextopcn/lite-pool.git</connection>
<url>scm:git:[email protected]:nextopcn/lite-pool.git</url>
<developerConnection>scm:git:[email protected]:nextopcn/lite-pool.git</developerConnection>
<tag>1.0.0-RC2</tag>
<tag>1.0.0-RC3</tag>
</scm>

<issueManagement>
Expand All @@ -65,7 +65,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<slf4j.api.version>1.7.25</slf4j.api.version>
<slf4j.api.version>1.8.0-beta2</slf4j.api.version>
</properties>

<dependencies>
Expand All @@ -84,13 +84,13 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6.1</version>
<version>2.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.6.1</version>
<version>2.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -130,11 +130,59 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>toolchain</id>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>9</version>
</jdk>
<jdk>
<version>1.8</version>
</jdk>
</toolchains>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<executions>
<execution>
<id>base-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>default-compile</id>
<configuration>
<jdkToolchain>
<version>[9, )</version>
</jdkToolchain>
<release>9</release>
</configuration>
</execution>
</executions>
<configuration>
<jdkToolchain>
<version>[1.8, )</version>
</jdkToolchain>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
Expand All @@ -154,6 +202,12 @@
<version>3.0.0</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<sourceFileExcludes>
<sourceFileExclude>**/module-info.java</sourceFileExclude>
</sourceFileExcludes>
<jdkToolchain>
<version>[9, )</version>
</jdkToolchain>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -223,11 +277,59 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>toolchain</id>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>9</version>
</jdk>
<jdk>
<version>1.8</version>
</jdk>
</toolchains>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<executions>
<execution>
<id>base-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>default-compile</id>
<configuration>
<jdkToolchain>
<version>[9, )</version>
</jdkToolchain>
<release>9</release>
</configuration>
</execution>
</executions>
<configuration>
<jdkToolchain>
<version>[1.8, )</version>
</jdkToolchain>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
Expand All @@ -247,6 +349,12 @@
<version>3.0.0</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<sourceFileExcludes>
<sourceFileExclude>**/module-info.java</sourceFileExclude>
</sourceFileExcludes>
<jdkToolchain>
<version>[9, )</version>
</jdkToolchain>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -289,6 +397,64 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>toolchain</id>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>9</version>
</jdk>
<jdk>
<version>1.8</version>
</jdk>
</toolchains>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<executions>
<execution>
<id>base-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>default-compile</id>
<configuration>
<jdkToolchain>
<version>[9, )</version>
</jdkToolchain>
<release>9</release>
</configuration>
</execution>
</executions>
<configuration>
<jdkToolchain>
<version>[1.8, )</version>
</jdkToolchain>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @author Baoyi Chen
* @since 1.0.0
*/
module cn.nextop.lite.pool {
exports cn.nextop.lite.pool;
exports cn.nextop.lite.pool.glossary;
exports cn.nextop.lite.pool.impl;
exports cn.nextop.lite.pool.support;
exports cn.nextop.lite.pool.support.allocator;
exports cn.nextop.lite.pool.support.allocator.allocation;
exports cn.nextop.lite.pool.util;
exports cn.nextop.lite.pool.util.builder;
exports cn.nextop.lite.pool.util.concurrent;
exports cn.nextop.lite.pool.util.concurrent.executor;
exports cn.nextop.lite.pool.util.concurrent.future;
exports cn.nextop.lite.pool.util.concurrent.future.impl;
exports cn.nextop.lite.pool.util.concurrent.thread;
exports cn.nextop.lite.pool.util.scheduler;
exports cn.nextop.lite.pool.util.scheduler.impl;
exports cn.nextop.lite.pool.util.scheduler.impl.executor;
requires org.slf4j;
requires java.management;
}
Loading

0 comments on commit 3fb1902

Please sign in to comment.