[
http://jira.codehaus.org/browse/MNG-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231831#action_231831
]
Jesse Glick commented on MNG-1867:
----------------------------------
Most of {{tools.jar}} - the part created by the OpenJDK langtools project - is
not JVM-specific and can be used as a plain old Java library with any JRE (1.5
or later). For example, if you want an implementation of
{{javax.tools.JavaCompiler}} to be present with test scope (because your unit
tests generate and compile source code on the fly), this would be the obvious
choice. Besides clarity, using regular artifacts provides better
reproducibility of builds since the version of the tool is encoded directly in
the POM in the normal way rather than being at the mercy of the environment,
and you could switch to a particular version of ECJ if that were faster or did
not have a crucial bug.
There are some less frequently used pieces like the {{com.sun.tools.attach}}
and {{com.sun.jdi}} APIs which should probably be packaged as separate
artifacts with the understanding that they are applicable to JREs derived from
the Sun codebase. You ought to be able to compile modules using these APIs
without requiring Maven to be run with a Sun JDK.
Special embedded JVMs generally need their own tools. For example, for Android
development the plugin handles the special build, packaging, and verification
steps needed by that platform. This would not be done with system-scope JARs to
begin with, and the JVM running Maven is almost certainly different from the
target JVM.
> deprecate system scope, analyse other use cases
> -----------------------------------------------
>
> Key: MNG-1867
> URL: http://jira.codehaus.org/browse/MNG-1867
> Project: Maven 2 & 3
> Issue Type: Task
> Components: Artifacts and Repositories, Design, Patterns & Best
> Practices
> Reporter: Brett Porter
> Priority: Trivial
> Fix For: 3.1
>
>
> possibly can avoid all use cases for system scope through proper use of
> alternate resolvers. Gather use cases (see MNG-1471) to ensure.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira