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 <manf...@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
> > <bimargul...@gmail.com>wrote:
> >
> >> 1. As Jeff says, it won't work.
> >>
> >> 2. It violate
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to