yeah, the trick here though is using something like:

<systemPath>${java.home}/../lib/tools.jar</systemPath>

in a system-scoped dependency will break on a Mac. This is because the
tools.jar doesn't exist in that JDK...

System-scoped dependencies are a first attempt to get at that sort of
system-level dependency, and do so in a relatively portable way...however,
many of us feel that there has to be a better solution. Hopefully, we'll be
able to deprecate the system scope in the not-too-distant future.

-john

On 6/6/06, Roland Asmann <[EMAIL PROTECTED]> wrote:

I've been giving this some thought, and I think that putting it in your
local repo is NOT the answer...
Because, if you use it like in the example, it should run on ANY computer
that can run maven (remember, maven
needs to have the JAVA_HOME set), whereas putting it in your local repo
will force you to do this on EVERY
SINGLE system where you want to build this piece of software.
So, for portability reasons it is better to use the 'system'-scope for
these kind of dependencies.

Roland



On Tuesday 06 June 2006 16:35, Rémy Sanlaville wrote:
> Thanks Robert for your reply.
>
> It's now clearer and it's also the case for the Sun's J2EE JAR because
it
> is not redistribuable.
> But I'm still wondering if it not better to install the jar in your
local
> repository rather than using
> the scope system.
>
> Rémy
>
> 2006/6/6, Roland Asmann <[EMAIL PROTECTED]>:
> > Personally I don't use it, but I've seen it being used in Tobago...
> > You could use this if your software has a dependency to e.g. '
tools.jar'
> > from the JDK. This dependency CAN NOT be downloaded
> > from the repository and therefor can be set either to 'provided' or
> > 'system'. If you set it to system, you can let maven check for
> > its existence, whereas provided can't do such a thing.
> >
> > Snippet from Tobago:
> >
> > <dependency>
> >   <groupId>sun.jdk</groupId>
> >   <artifactId>tools</artifactId>
> >   <version>1.5.0</version>
> >   <scope>system</scope>
> >   <systemPath>${java.home}/jre/../lib/tools.jar</systemPath>
> > </dependency>
> >
> > Hope this helped,
> >
> > Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to