You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Schuerig <mi...@schuerig.de> on 2005/02/23 13:01:25 UTC

Defining a dependency on the JDK's tools.jar?

Here's what I cobbled together

project.xml:

    <dependency>
      <groupId>jdk</groupId>
      <artifactId>tools</artifactId>
      <type>jar</type>
    </dependency>

project.properties:

maven.jar.override=on
maven.jar.tools=${java.home}/../lib/tools.jar

This isn't exactly elegant. So, is there a better, cleaner way?

Michael

-- 
Michael Schuerig                  Failures to use one's frontal lobes
mailto:michael@schuerig.de        can result in the loss of them.
http://www.schuerig.de/michael/   --William H. Calvin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Defining a dependency on the JDK's tools.jar?

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Michael,

> -----Original Message-----
> From: Michael Schuerig [mailto:michael@schuerig.de]
> Sent: mercredi 23 février 2005 13:01
> To: users@maven.apache.org
> Subject: Defining a dependency on the JDK's tools.jar?
> 
> 
> Here's what I cobbled together
> 
> project.xml:
> 
>     <dependency>
>       <groupId>jdk</groupId>
>       <artifactId>tools</artifactId>
>       <type>jar</type>
>     </dependency>
> 
> project.properties:
> 
> maven.jar.override=on
> maven.jar.tools=${java.home}/../lib/tools.jar
> 
> This isn't exactly elegant. So, is there a better, cleaner way?

Yep, using the ${tools.jar} default Maven property. I don't think you really
wish to download it so there's no need to define it as a dependency. Having
a JDK installed is meant to be a prereq.

-Vincent



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org