edit delete favorite
Posted by mavenmaven on Nov 08, 2007
The following code includes tools.jar on Sun JDKs (it is already included in the runtime for Mac OS X and some free JDKs). It adds it via a profile so compilation is less likely to break using other JDKs.
<project>
  ...
  <profiles>
    <profile>
      <id>default-tools.jar</id>
      <activation>
        <property>
          <name>java.vendor</name>
          <value>Sun Microsystems Inc.</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>com.sun</groupId>
          <artifactId>tools</artifactId>
          <version>1.4.2</version>
          <scope>system</scope>
          <systemPath>${java.home}/../lib/tools.jar</systemPath>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
  ...
</project>
 
Must be logged in to add a comment or review

Comments

Please submit any bugs/features and report abuse. Thanks!
Spacer
Spacer
Spacer
Top Users
Spacer
Top Tags
Spacer