You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Anders Hammar <an...@hammar.net> on 2012/12/21 11:20:39 UTC

Should I add tools.jar to my internal repo?

So far I've managed the few situations where tools.jar (included in the
JDK) is needed by using the deprecated system scope and point at a local
tools.jar file. Up until now it's just been used in build time by plugins,
but now I've run into a case where it's an actual dependency and therefore
it could cause issues.

Normally, artifacts should be in the repo but I'm wondering if there are
any problems adding this one to an internal repo? Is it platform neutral
for example?
It's a strictly internal repo so I think we can ignore any license problems
by adding it to the repo.

/Anders

Re: Should I add tools.jar to my internal repo?

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi everyone,

> I consider any project that has a dependency to tools.jar as broken.

The question follows: What is the Maven best practice for a project that
needs a Java compiler? (Formerly com.sun.tools.javac.Main,
com.sun.tools.apt.Main, etc.; now javax.tools.JavaCompiler as of Java 6.)

The Maven FAQ says to use system scope with a systemPath as follows:
    http://maven.apache.org/general.html#tools-jar-dependency

Anders mentioned that system scope is deprecated now. Where is that
discussed? I did find this ticket:
    http://jira.codehaus.org/browse/MNG-1867

But if I understand correctly, that ticket is not about deprecating
*systemPath*, only the "system" scope itself in favor of more clearly
specifying it as compile, runtime, test, etc.

> Not only does tools.jar have different content depending on the
> version of the jdk/jre but in fact on some it does not even exist.

True that tools.jar is not present as such on Apple's JDK, but otherwise I
thought the JAR was platform neutral. That is, you can (technically
speaking) distribute the same tools.jar to e.g. Windows, OS X and Linux
platforms and it works on all.

Regards,
Curtis


On Sun, Dec 23, 2012 at 8:50 PM, Manfred Moser <ma...@mosabuam.com> wrote:

> I agree with the rest of you all. Do not add it to the repo! In fact I
> consider any project that has a dependency to tools.jar as broken.
>
> Not only does tools.jar have different content depending on the version of
> the jdk/jre but in fact on some it does not even exist. There is no such
> thing as a tools.jar on Apple JDKs.. it is packaged differently.
>
> manfred
>
> On Sun, December 23, 2012 1:46 pm, Anders Hammar wrote:
> > Thanks! I believe I have to look into this project that has a dependency
> > to
> > tools.jar. Most likely they should execute on a JDK (and not a JRE)
> > instead
> > of bundling the tools jar.
> >
> > /Anders
> >
> >
> > On Sun, Dec 23, 2012 at 10:32 PM, Benson Margulies
> > <bi...@gmail.com>wrote:
> >
> >> 1. As Jeff says, it won't work.
> >>
> >> 2. It violate
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Should I add tools.jar to my internal repo?

Posted by Manfred Moser <ma...@mosabuam.com>.
I agree with the rest of you all. Do not add it to the repo! In fact I
consider any project that has a dependency to tools.jar as broken.

Not only does tools.jar have different content depending on the version of
the jdk/jre but in fact on some it does not even exist. There is no such
thing as a tools.jar on Apple JDKs.. it is packaged differently.

manfred

On Sun, December 23, 2012 1:46 pm, Anders Hammar wrote:
> Thanks! I believe I have to look into this project that has a dependency
> to
> tools.jar. Most likely they should execute on a JDK (and not a JRE)
> instead
> of bundling the tools jar.
>
> /Anders
>
>
> On Sun, Dec 23, 2012 at 10:32 PM, Benson Margulies
> <bi...@gmail.com>wrote:
>
>> 1. As Jeff says, it won't work.
>>
>> 2. It violate

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


Re: Should I add tools.jar to my internal repo?

Posted by Anders Hammar <an...@hammar.net>.
Thanks! I believe I have to look into this project that has a dependency to
tools.jar. Most likely they should execute on a JDK (and not a JRE) instead
of bundling the tools jar.

/Anders


On Sun, Dec 23, 2012 at 10:32 PM, Benson Margulies <bi...@gmail.com>wrote:

> 1. As Jeff says, it won't work.
>
> 2. It violates the terms of the JDK license, most likely.
>
>
>
> On Sun, Dec 23, 2012 at 1:17 PM, Jeff MAURY <je...@jeffmaury.com>
> wrote:
> > I don't think you should as there are probably some differences between
> > versions of the JDK
> >
> > Regards
> > Jeff MAURY
> >
> >
> >
> > On Fri, Dec 21, 2012 at 11:20 AM, Anders Hammar <an...@hammar.net>
> wrote:
> >
> >> So far I've managed the few situations where tools.jar (included in the
> >> JDK) is needed by using the deprecated system scope and point at a local
> >> tools.jar file. Up until now it's just been used in build time by
> plugins,
> >> but now I've run into a case where it's an actual dependency and
> therefore
> >> it could cause issues.
> >>
> >> Normally, artifacts should be in the repo but I'm wondering if there are
> >> any problems adding this one to an internal repo? Is it platform neutral
> >> for example?
> >> It's a strictly internal repo so I think we can ignore any license
> problems
> >> by adding it to the repo.
> >>
> >> /Anders
> >>
> >
> >
> >
> > --
> > Jeff MAURY
> >
> >
> > "Legacy code" often differs from its suggested alternative by actually
> > working and scaling.
> >  - Bjarne Stroustrup
> >
> > http://www.jeffmaury.com
> > http://riadiscuss.jeffmaury.com
> > http://www.twitter.com/jeffmaury
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Should I add tools.jar to my internal repo?

Posted by Benson Margulies <bi...@gmail.com>.
1. As Jeff says, it won't work.

2. It violates the terms of the JDK license, most likely.



On Sun, Dec 23, 2012 at 1:17 PM, Jeff MAURY <je...@jeffmaury.com> wrote:
> I don't think you should as there are probably some differences between
> versions of the JDK
>
> Regards
> Jeff MAURY
>
>
>
> On Fri, Dec 21, 2012 at 11:20 AM, Anders Hammar <an...@hammar.net> wrote:
>
>> So far I've managed the few situations where tools.jar (included in the
>> JDK) is needed by using the deprecated system scope and point at a local
>> tools.jar file. Up until now it's just been used in build time by plugins,
>> but now I've run into a case where it's an actual dependency and therefore
>> it could cause issues.
>>
>> Normally, artifacts should be in the repo but I'm wondering if there are
>> any problems adding this one to an internal repo? Is it platform neutral
>> for example?
>> It's a strictly internal repo so I think we can ignore any license problems
>> by adding it to the repo.
>>
>> /Anders
>>
>
>
>
> --
> Jeff MAURY
>
>
> "Legacy code" often differs from its suggested alternative by actually
> working and scaling.
>  - Bjarne Stroustrup
>
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
> http://www.twitter.com/jeffmaury

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


Re: Should I add tools.jar to my internal repo?

Posted by Jeff MAURY <je...@jeffmaury.com>.
I don't think you should as there are probably some differences between
versions of the JDK

Regards
Jeff MAURY



On Fri, Dec 21, 2012 at 11:20 AM, Anders Hammar <an...@hammar.net> wrote:

> So far I've managed the few situations where tools.jar (included in the
> JDK) is needed by using the deprecated system scope and point at a local
> tools.jar file. Up until now it's just been used in build time by plugins,
> but now I've run into a case where it's an actual dependency and therefore
> it could cause issues.
>
> Normally, artifacts should be in the repo but I'm wondering if there are
> any problems adding this one to an internal repo? Is it platform neutral
> for example?
> It's a strictly internal repo so I think we can ignore any license problems
> by adding it to the repo.
>
> /Anders
>



-- 
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury