You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dean Schulze <de...@yahoo.com> on 2011/01/24 18:15:14 UTC

Declaring a dependency for tools.jar

The FAQ shows the <profile> below to declare a dependency for tools.jar.  This seems to be a problem waiting to happen now that Oracle is the vendor for the official JVM.  (A recent update to JDK 1.6 caused problems for Eclipse because Eclipse was expecting a property setting of Sun Microsystems instead of Oracle).

If you need tools.jar in the system path shouldn't the profile be activated automatically?

What would be the right way to activate this profile all of the time?

Thanks.


      <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.5</version>
            <scope>system</scope>
            <systemPath>${java.home}/../lib/tools.jar</systemPath>
          </dependency>
        </dependencies>
      </profile>

http://maven.apache.org/general.html#tools-jar-dependency