Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

m2eclipse issues ArtifactTransferException - But pom.xml compiles / installs from the command line

 
James Dekker
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am using Eclipse Juno, Maven 2.2.1, m2eclipse (installed from http://download.eclipse.org/technology/m2e/releases through Eclipse's Add New Software feature).

My pom.xml looks like this:



Am able to successfully clean, compile, and install this project from the command line using the standard mvn commands...

However, in Eclipse Juno's Problems pane, I have the following 2 errors:

1. Missing artifact org.kitchen-eel:json-schema-validator:jar:1.2.1 pom.xml /com.cloudst line 45 Maven Dependency Problem

2. ArtifactTransferException: Failure to transfer org.kitchen-eel:json-schema-validator:jar:1.2.1

from http://repo.maven.apache.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has
elapsed or updates are forced. Original error: Could not transfer artifact
org.kitchen-eel:json-schema-validator:jar:1.2.1 from/to central
(http://repo.maven.apache.org/maven2):
Failed to transfer http://repo.maven.apache.org/maven2/org/kitchen-eel/json-schema-validator/1.2.1/json-schema-validator-1.2.1.jar.

Why does it work in the command line but m2eclipse is posting problems?

Thanks for taking the time to read this...
 
Greg Charles
Sheriff
Posts: 2989
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I've had problems with Maven in Eclipse not acting like Maven from a command line, it's always been an Eclipse configuration issue. First, you want to be sure that Eclipse is using the correct version. Go into Window - Preferences, and choose Maven - Installations. If the embedded version of Maven isn't what you run from the command line, add the external Maven to the Installations and select it as the default. If that still doesn't work, look at Maven - User Settings, and make sure it's using the right path to your settings.xml and your repository.
 
James Dekker
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Greg,

I already had looked into these settings in Eclipse.

-James
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error "resolution will not be reattempted until the update interval of central has elapsed or updates are forced" usually means that the local repository has some information about the JAR in question, but it might be partial or outdated information. Usually deleting the local repository, or in your case deleting the org/kitchen-eel directory, should clean up the situation. The other possibility is to run mvn with the -U option.

But it does sound as if Eclipse hasn't read the settings.xml file and is not looking at the correct location for the local repository.

Oh, did you change the Eclipse configuration to use your local copy of Maven, and not the one that comes with Eclipse?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic