> -----Original Message-----
> From: Vincent Massol [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 23, 2005 9:33 AM
> To: 'Maven Users List'
> Subject: RE: Defining a dependency on the JDK's tools.jar?
>
>
>
> > -----Original Message-----
> > From: Michael Schuerig [mailto:[EMAIL PROTECTED]
> > Sent: mercredi 23 f�vrier 2005 15:12
> > To: Maven Users List
> > Subject: Re: Defining a dependency on the JDK's tools.jar?
> >
> > On Wednesday 23 February 2005 13:19, Vincent Massol wrote:
> > [snip]
> > > > 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.
> >
> > That's probably the key to the solution, but I don't quite
> see how to
> > use it, yet. I need to have tools.jar on the classpath as
> I'm writing a
> > javadoc taglet. Also, I'm using Eclipse and create its
> .classpath with
> > the maven eclipse plugin, which needs to add in tools.jar, too.
>
> Ah I see... Several possible use cases:
>
> - you are the one writing a custom plugin or some maven.xml
> code. You can
> use ${tools.jar} as you wish
> - you are using an existing plugin and this plugin does not
> offer an easy
> way to add some custom classpath. You can use this maven.xml
> scriptlet (but
> then I'm not 100% sure if it's better than your solution...):
>
> <ant:path id="mycp">
> <ant:pathelement location="${tools.jar}"/>
> </ant:path>
>
> <maven:addPath id="maven.dependency.classpath" refid="mycp"/>
>
> -Vincent
I missed the earlier part of this thread, so forgive me if I'm repeating
a solution identified earlier. My suggestion would be to add the
following properties to project.properties:
maven.jar.override=on
maven.jar.tools=${tools.jar}
Then add the following dependency to project.xml:
<dependency>
<id>tools</id>
</dependency>
Again, if this soloution was already mentioned, forgive me.
Cheers,
Chuck
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]