aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes m2eclipse issues ArtifactTransferException - But pom.xml compiles / installs from the command line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "m2eclipse issues ArtifactTransferException - But pom.xml compiles / installs from the command line" Watch "m2eclipse issues ArtifactTransferException - But pom.xml compiles / installs from the command line" New topic
Author

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

James Dekker
Ranch Hand

Joined: Dec 09, 2006
Posts: 219
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

Joined: Oct 01, 2001
Posts: 2861
    
  11

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

Joined: Dec 09, 2006
Posts: 219
Thanks Greg,

I already had looked into these settings in Eclipse.

-James
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

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?


JBoss In Action
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: m2eclipse issues ArtifactTransferException - But pom.xml compiles / installs from the command line