Permalink
Browse files

corrected profile settings for tools jar so they work with mac

pre-jdk7 and post-jdk7 fixes BYTEMAN-223
  • Loading branch information...
adinn committed Nov 26, 2012
1 parent a85fb28 commit 473119c1ff27ccc821933da8c068a1d1c1565d03
Showing with 25 additions and 11 deletions.
  1. +25 −11 pom.xml
View
36 pom.xml
@@ -92,7 +92,8 @@
</distributionManagement>
<properties>
- <tools.jar>${java.home}/../lib/tools.jar</tools.jar>
+ <!-- actual path to tools.jar is defined in the profiles below -->
+ <tools.jar>/file-not-found/tools.jar</tools.jar>
<!-- Decouple file encoding of the platform encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -357,18 +358,31 @@
</modules>
<profiles>
- <!-- We override the tools.jar property on mac osx -->
+ <!-- tools classes are needed by byteman -->
<profile>
- <id>mac</id>
- <activation>
- <os>
- <family>mac</family>
- </os>
- </activation>
- <properties>
- <tools.jar>${java.home}/../Classes/classes.jar</tools.jar>
- </properties>
+ <!-- normally tools jar is in ../lib/tools.jar -->
+ <id>default-toolsjar-profile</id>
+ <activation>
+ <file>
+ <exists>${java.home}/../lib/tools.jar</exists>
+ </file>
+ </activation>
+ <properties>
+ <tools.jar>${java.home}/../lib/tools.jar</tools.jar>
+ </properties>
</profile>
+ <profile>
+ <!-- on pre-jdk7 mac releases tools jar is in ../Classes/classes.jar -->
+ <id>mac-toolsjar-profile</id>
+ <activation>
+ <file>
+ <exists>${java.home}/../Classes/classes.jar</exists>
+ </file>
+ </activation>
+ <properties>
+ <tools.jar>${java.home}/../Classes/classes.jar</tools.jar>
+ </properties>
+ </profile> <!-- We override the tools.jar property on mac osx -->
<!--
new profile for releasing to maven central
to do a release update the version number from a SNAPSHOT

0 comments on commit 473119c

Please sign in to comment.