10

I have setup Maven project locally without eclipse, it is completed succefully. Now i have downloaded Eclipse indgo 3.7.0. Since Eclipse-indigo is having m2e(maven 2 eclipse )plugin enabled it by

Eclipse->help->install new software->work with(Indigo - http://download.eclipse.org/releases/indigo)->General purpose tools->m2e(check) and install.

in eclipse added project as as maven project, but i am getting error while running pom.xml file:

Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.625s
[INFO] Finished at: Thu Sep 15 12:33:01 CEST 2011
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to ibiblio.org (http://mirrors.ibiblio.org/pub/mirrors/maven2): null to http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom: UnresolvedAddressException -> [Help 1]
[ERROR] 

this is m2e plugin issue, how can i solve this error?

also getting following error while importing exsisting maven project to eclipse:

Could not calculate build plan
Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.1 or one of its dependencies 
could not be resolved: Transfer error: null
org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.1

from the specified remote repositories:
ibiblio.org (http://mirrors.ibiblio.org/pub/mirrors/maven2, releases=true, snapshots=false)
Description Resource    Path    Location    Type
Could not calculate build plan: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 
    from http://mirrors.ibiblio.org/pub/mirrors/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of ibiblio.org has elapsed or 
    updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to ibiblio.org 
    (http://mirrors.ibiblio.org/pub/mirrors/maven2): null to http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-
    plugin-2.4.3.pom    my-app      Unknown Maven Problem

POM.xml:

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.test.myapp</groupId>
  <artifactId>my-app</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>my-app</name>
  <url>http://maven.apache.org</url>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>
Jean-Rémy Revy
  • 5,607
  • 3
  • 39
  • 65
TechFind
  • 3,696
  • 18
  • 47
  • 62
  • 4
    How does your settings.xml file look like? It seemed to me that you changed the settings.xml in some way...but you shouldn't cause ibiblio is not Maven Central i would suggest to use http://repo1.maven.org/maven2/ instead. – khmarbaise Sep 15 '11 at 13:07
  • Have you checked to build your project on command line just mvn clean package ? – khmarbaise Sep 15 '11 at 13:07
  • @khmarbaise, from cmd maven is working fine. only problem is with eclipse plugin m2e. – TechFind Sep 15 '11 at 13:10
  • i just downloaded maven, changed repository path in conf as: /C:/software/maven repository. all other remain same. – TechFind Sep 16 '11 at 09:21
  • 1
    Why does your maven download from ibiblio instead of Maven Central if you didn't change other things ? I would suggest to clean your local repository (as described above) and do an other time on command line...BTW: Which version of Maven are you using on Command Line ? – khmarbaise Sep 16 '11 at 09:48
  • Apache Maven 3.0.3 Maven home: C:\software\apache-maven – TechFind Sep 16 '11 at 14:52
  • Have you declared the maven implementation you want to use in m2e? If you don't do that, Eclipse has no chance to use the Maven settings you have declared. – mliebelt Sep 17 '11 at 09:59
  • 1
    go to maven settings.xml file and enable proxy. http://stackoverflow.com/questions/5704010/maven-in-5-min-not-working – AKB Sep 19 '11 at 12:11

3 Answers3

5

Check the sha1 checksums in org/apache/maven/plugins/maven-resources-plugin/ under your local repository and delete the maven-resources-plugin directory if any of them are wrong. Or just delete the directory and let the maven to download it again.

palacsint
  • 28,416
  • 10
  • 82
  • 109
2

solved, issue was since working in an organization( where proxy enabled), enabled proxy in settings.xml as given by maven in 5 min not working

Community
  • 1
  • 1
TechFind
  • 3,696
  • 18
  • 47
  • 62
1

Eclipse has a built-in Maven implementation. Try to compile the project from command line with the same Maven version as Eclipse has or set your Maven installation in Eclipse (Window / Preferences / Maven / Installations).

palacsint
  • 28,416
  • 10
  • 82
  • 109
  • when i compile from cmd it is working fine as I had informed in my question – TechFind Sep 16 '11 at 09:29
  • The version of your command line Maven is the same as Eclipse has? (Usually 3.0-SNAPSHOT) Have you tried to change your Eclipse's Maven? – palacsint Sep 16 '11 at 09:47
  • i have changed repository location and settings.xml from eclipse->window->preference->Maven->user settings. How can i change maven location in eclipse? – TechFind Sep 17 '11 at 06:31
  • 2
    Eclipse / Window / Preferences / Maven / Installations – palacsint Sep 17 '11 at 09:32