wood burning stoves*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven shows a missing artifact error even though I tried fixing the POM.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven shows a missing artifact error even though I tried fixing the POM.xml" Watch "Maven shows a missing artifact error even though I tried fixing the POM.xml" New topic
Author

Maven shows a missing artifact error even though I tried fixing the POM.xml

karthik raghunathan
Greenhorn

Joined: Nov 12, 2011
Posts: 10
Hi

I'm installing Broadleaf to learn J2EE .
I followed instructions at http://docs.broadleafcommerce.org/core/ ... ng-started

I get the following error when the project is loaded into eclipse.
Missing artifact jdk.tools:jdk.tools.jar:1.6
The container 'Maven Dependencies' references non-existing library 'C:/<home>/.m2/jdk/tools/jdk.tools/1.6/jdk.tools-1.6.jar
I tried following a couple of stack overflow links but even then the errors continued to show up.
http://stackoverflow.com/questions/11118070/buiding-hadoop-with-eclipse-maven-missing-artifact-jdk-toolsjdk-toolsjar1


EDIT: I have Java JDK 1.7 installed and Eclipse configured to use it

Could you help me resolve this ? Am I missing something basic ?
Thanks in advance
Karthik
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

The link to the tutorial is broken, so I'm not sure what you were following. Can you copy/paste your pom here?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
karthik raghunathan
Greenhorn

Joined: Nov 12, 2011
Posts: 10
Apologies for incorrect link, here's the link again

http://www.broadleafcommerce.com/docs/core/current/getting-started


And here's the POM.
1. jdktools1.6 is not in it. Should it be ?
2. I'm sure tools.jar is part of my eclipse's JVM . Does it have to be in the POM ?





Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

It sounds like one of the dependencies, or one of the listed plugins, has the tools.jar file listed as a dependency, which it should not be doing because tools.jar is part of the JDK and will be included automatically.

You have several options:
1) Try to find out who is referencing tools.jar and removing the reference. The dependency plugin might help, something like: mvn dependency:tree
Or you turn on the -X option, run the build again, and post the full console output.

2) Install the tools.jar into your local repository. Look at the docs for the install plugin for more details.

By the way, you mentioned Eclipse. It would be better it you did the builds from the command line for now until the issue is resolved. This will help eliminate Eclipse from being the culprit (sometime in tryin to be too helpful, Eclipse just makes things worse).


JBoss In Action
karthik raghunathan
Greenhorn

Joined: Nov 12, 2011
Posts: 10
>> By the way, you mentioned Eclipse. It would be better it you did the builds from the command line for now until the issue is resolved. This will help eliminate Eclipse from being the culprit (sometime in tryin to be too helpful, Eclipse just makes things worse).

Thanks a lot ! It _was_ Eclipse that wasn't playing nice. I could run maven from the command line/prompt and everything went fine. Now I just need to read up on how to start modifying the code to my needs ...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

This is exactly why I use Eclipse only as an intelligent editor - all builds, test runs, etc. I do from the command line. I suspect that in a parallel universe where by counterpart uses Eclipse to do such things, he has way more grey hairs than I do, and an ulcer. Poor guy...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven shows a missing artifact error even though I tried fixing the POM.xml
 
Similar Threads
hibernate in Eclipse helios
Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3:install
Multiple annotations found at this line: <Maven POM>
Apache Ant Installation - Build Failed
how to download remote repo using maven 3