From 4b282179f4b6b2193ded4ef9086c83eecdfe2818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E6=88=9F?= Date: Wed, 4 Nov 2020 11:48:07 +0800 Subject: [PATCH] fix tools.jar issue with java 9+ --- README.md | 4 +++- testable-processor/pom.xml | 27 ++++++++++++++++++++------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1634bb2..9429804 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ 主项目使用JDK 1.6+和Maven 3+版本构建,其中`demo`子项目需要JDK 1.8+版本。 +由于`Testable`的测试也用到了`Testable`本身,本地首次构建时候需要使用`install`而不能只做`package`: + ```bash -mvn clean package +mvn clean install ``` diff --git a/testable-processor/pom.xml b/testable-processor/pom.xml index 4358546..8bb22af 100644 --- a/testable-processor/pom.xml +++ b/testable-processor/pom.xml @@ -26,13 +26,6 @@ testable-core ${testable.version} - - sun.jdk - tools - ${java.version} - system - ${java.home}/../lib/tools.jar - org.junit.jupiter junit-jupiter-api @@ -41,6 +34,26 @@ + + + tools-jar + + + ${java.home}/../lib/tools.jar + + + + + sun.jdk + tools + ${java.version} + system + ${java.home}/../lib/tools.jar + + + + +