[ https://jira.codehaus.org/browse/MPLUGIN-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299932#comment-299932 ]
Chris Lott edited comment on MPLUGIN-202 at 5/29/12 8:14 AM: ------------------------------------------------------------- I bobbled the artifactId on this one, of course it's "maven-plugin-tools-javadoc". Anyhow, sorry for the trouble. Maybe you can straighten me out, please. I ran into problems when I added a Maven dependency on this artifact to a little Java project. M2E posted errors about build-path problems, it was simply unable to resolve tools.jar. The Eclipse workspace was *absolutely* configured to use a Java JDK; the path "JAVA_HOME/../lib/tools.jar" was totally there, etc. Anyhow, this artifact was the only one in my repository using tools.jar in that manner; I searched thru POM files, found the log4j approach, thought it might be worth raising as an issue. So when M2E works it's great; when it fails, it leaves no log messages, no nothing, just frustration and confusion. Thanks for any help. was (Author: chrislott): I bobbled the artifactId on this one, of course it's "maven-plugin-tools-javadoc". Anyhow, sorry for the trouble. Maybe you can straighten me out, please. I ran into problems when I added a Maven dependency on maven-plugin-tools to a little Java project. M2E posted errors about build-path problems, it was simply unable to resolve tools.jar. The Eclipse workspace was *absolutely* configured to use a Java JDK; the path "JAVA_HOME/../lib/tools.jar" was totally there, etc. Anyhow, this artifact was the only one using tools.jar in that manner; I searched thru POM files, found the log4j approach, thought it might be worth raising as an issue. So when M2E works it's great; when it fails, it leaves no log messages, no nothing, just frustration and confusion. Thanks for any help. > Dependency on tools.jar should be expressed with profiles > --------------------------------------------------------- > > Key: MPLUGIN-202 > URL: https://jira.codehaus.org/browse/MPLUGIN-202 > Project: Maven 2.x Plugin Tools > Issue Type: Bug > Components: maven-plugin-tools-javadoc > Affects Versions: 2.9 > Reporter: Chris Lott > Priority: Minor > > The POM for org.apache.maven.plugin-tools, org.apache.maven.plugin-tools, > Version 2.9 asserts a dependency on the JDK's tools.jar like this: > {code:xml}<dependency> > <groupId>com.sun</groupId> > <artifactId>tools</artifactId> > <version>1.4.2</version> > <scope>system</scope> > <systemPath>${java.home}/../lib/tools.jar</systemPath> > </dependency>{code} > This caused build path failures on my windows system that m2eclipse simply > was not able to resolve, despite my use of the JDK, finally had to give up. > I also note that on a Mac it will never work. Compare with the approach > taken by artifact log4j, group log4j, version 1.2.16 for a tools.jar > dependency: > {code:xml}<dependency> > <groupId>sun.jdk</groupId> > <artifactId>tools</artifactId> > <version>1.4.2</version> > <scope>system</scope> > <systemPath>${tools.jar}</systemPath> > </dependency>{code} > This "tools.jar" variable is defined in terms of machine profiles. > Thanks for listening. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira