[
https://issues.apache.org/jira/browse/HADOOP-8527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400549#comment-13400549
]
Alejandro Abdelnur commented on HADOOP-8527:
--------------------------------------------
To compile you need a JDK, JREs don't bundle javac/javadoc and corresponding
classes.
The dependency on *tools.jar* is within a profile which is meant for *nix
platforms other than Mac (see snipped below). As the dependency is defined with
*system* scope, maven does not attempt to download it from a repo, instead uses
the <systemPath> element to find it.
{code}
<profile>
<id>os.linux</id>
<activation>
<os>
<family>!Mac</family>
</os>
</activation>
<properties>
<build.platform>${os.name}-${os.arch}-${sun.arch.data.model}</build.platform>
</properties>
<dependencies>
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.6</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
{code}
If you are making a JAR including the dependency classes in it (thing I
strongly discourage) then you should use a profile to exclue the
jdk.tools/jdk.tools groupId/artifactId.
> Dont use JDK6 tools as dependency
> ---------------------------------
>
> Key: HADOOP-8527
> URL: https://issues.apache.org/jira/browse/HADOOP-8527
> Project: Hadoop Common
> Issue Type: Bug
> Components: build
> Affects Versions: 0.23.0, 2.0.0-alpha, 3.0.0
> Reporter: Radim Kolar
> Attachments: hadoop-jdk.tools.txt
>
>
> In hadoop-project/pom.xml there is dependency on jdk.tools/jdk.tools/1.6 with
> system scope. This dependency breaks maven-assembly jar-with-dependencies
> because it tries to find artifact which does not exists in maven repo.
> It should not be needed. if hadoop is build with JRE, then compile fails.
> Adding dependency on jdk.tools does not improve situation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira