You can use this same dependency without using a profile at all. Just add it in like you would any other dependency. So long as the directory exists, it will work just fine.
On Mon, 24 Jan 2011 09:15:14 -0800 (PST), Dean Schulze dean_w_schu...@yahoo.com wrote: > > 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 > >