Skip to content

Commit

Permalink
Merge pull request #118 from k-wall/issue-117-toolsjar
Browse files Browse the repository at this point in the history
Avoid tools.jar dependency when Java version >= 9
  • Loading branch information
iocanel committed Nov 14, 2018
2 parents 97ef887 + c76d2b1 commit 7711290
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 30 deletions.
20 changes: 15 additions & 5 deletions annotations/builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,21 @@
<artifactId>hamcrest-all</artifactId>
</dependency>

<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</dependency>

</dependencies>

<profiles>
<profile>
<id>jdk9</id>
<activation>
<jdk>[1,1.9)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>

</project>
21 changes: 16 additions & 5 deletions annotations/dsl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,21 @@
<artifactId>hamcrest-all</artifactId>
</dependency>

<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</dependency>
</dependencies>

</project>
<profiles>
<profile>
<id>jdk9</id>
<activation>
<jdk>[1,1.9)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>

</project>
22 changes: 15 additions & 7 deletions annotations/resourcecify/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,18 @@
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</dependency>
</dependencies>
</project>
<profiles>
<profile>
<id>jdk9</id>
<activation>
<jdk>[1,1.9)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
19 changes: 14 additions & 5 deletions codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,24 @@
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
</dependency>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>jdk9</id>
<activation>
<jdk>[1,1.9)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
25 changes: 17 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,6 @@
<version>${javaparser.version}</version>
</dependency>

<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${sun.tools.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -177,6 +169,23 @@
</plugins>
</build>
</profile>
<profile>
<id>jdk9</id>
<activation>
<jdk>[1,1.9)</jdk>
</activation>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${sun.tools.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
</profiles>

<distributionManagement>
Expand Down

0 comments on commit 7711290

Please sign in to comment.