fix tools.jar issue with java 9+

This commit is contained in:
金戟 2020-11-04 11:48:07 +08:00
parent 6454ae547e
commit 4b282179f4
2 changed files with 23 additions and 8 deletions

View File

@ -22,6 +22,8 @@
主项目使用JDK 1.6+和Maven 3+版本构建,其中`demo`子项目需要JDK 1.8+版本。
由于`Testable`的测试也用到了`Testable`本身,本地首次构建时候需要使用`install`而不能只做`package`
```bash
mvn clean package
mvn clean install
```

View File

@ -26,13 +26,6 @@
<artifactId>testable-core</artifactId>
<version>${testable.version}</version>
</dependency>
<dependency>
<groupId>sun.jdk</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
@ -41,6 +34,26 @@
</dependency>
</dependencies>
<profiles>
<profile>
<id>tools-jar</id>
<activation>
<file>
<exists>${java.home}/../lib/tools.jar</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>sun.jdk</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
<build>
<plugins>
<plugin>