Support different JDKs

This commit is contained in:
Oliver Burn 2011-04-03 21:26:54 +10:00
parent 984f71d15d
commit 0c9cf280e2
1 changed files with 40 additions and 11 deletions

51
pom.xml
View File

@ -136,6 +136,8 @@
<testinputs.dir>${basedir}/src/testinputs/com/puppycrawl/tools/checkstyle</testinputs.dir>
<testsrcs.dir>${basedir}/src/tests/com/puppycrawl/tools/checkstyle</testsrcs.dir>
<projectVersion>${project.version}</projectVersion>
<tools.jar.version>1.5.0</tools.jar.version>
<tools.jar.path>${java.home}/../lib/tools.jar</tools.jar.path>
</properties>
<dependencies>
@ -166,13 +168,6 @@
<version>1.7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
<!-- test scope stuff -->
<dependency>
@ -233,10 +228,6 @@
<requireJavaVersion>
<version>1.5</version>
</requireJavaVersion>
<requireProperty>
<property>java.vendor</property>
<regex>^Sun Microsystems Inc\.$</regex>
</requireProperty>
</rules>
</configuration>
</execution>
@ -532,5 +523,43 @@
</plugins>
</build>
</profile>
<!-- Bring in tools.jar for platforms which provide it -->
<profile>
<id>tools.jar-sun</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${tools.jar.version}</version>
<scope>system</scope>
<systemPath>${tools.jar.path}</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>default-tools.jar-oracle</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${tools.jar.version}</version>
<scope>system</scope>
<systemPath>${tools.jar.path}</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>