1

I try to do run-as -> mvn install in eclipse, but then i get an error but i dont know how to solve it.

This is the error:

Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.0:shade (default) on project reminder: Execution default of goal org.apache.maven.plugins:maven-shade-plugin:2.0:shade failed: Plugin org.apache.maven.plugins:maven-shade-plugin:2.0 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-shade-plugin:jar:2.0 (): Failed to read artifact descriptor for commons-io:commons-io:jar:1.3.2: Could not transfer artifact org.apache.commons:commons-parent:pom:3 from/to central (http://repo.maven.apache.org/maven2): No response received after 60000 -> [Help 1] 

My pom looks like this:

<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>mednanny</groupId> <artifactId>reminder</artifactId> <version>0.0.1-SNAPSHOT</version> <name>Reminder</name> <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.24</version> </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4.6</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.0</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>Reminder.ReminderErinnerungJob</mainClass> </transformer> </transformers> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> 
6
  • 1
    Maven caches some things in your local repo, like failed attempts to resolve dependencies. This causes it to not even attempt to get a package for a period of time after a first failure. You could try deleting the folders ~/.m2/repository/commons-* and let maven re-download them. Commented Mar 22, 2013 at 15:53
  • Tried it. But still the same. I even cant access this URL in my browser, can you? repo.maven.apache.org/maven2/org/apache/commons/commons-parent/…. This is where maven crashes while downloading because it seems to be not available Commented Mar 22, 2013 at 16:04
  • yes, I have no problem accessing that file. perhaps firewall or proxy issues? Commented Mar 22, 2013 at 16:08
  • Now i also can access it in my browser SOMETIMES but sometimes not.. strange. But eclipse still cant access it. Mh.. but eclipse doesnt have to be configured for a proxy or something like that? Because other common dependencies were downloaded correct Commented Mar 22, 2013 at 16:16
  • if you have a proxy, eclipse does need to be configured for it... even if using external maven instance (because it uses embeded maven for resolving project deps outside of actual build). Are you sure you are using the right central repo? Also, that appears to be a REALLY old version of commons-parent as it is now at 12 and your linking to 3. Lastly, if just for dbcp, then I recommend switching to tomcat-jdbc. Its a better, more current, more actively developed connection pooling library. Commented Mar 22, 2013 at 16:21

3 Answers 3

1

For other folks who are facing same issue, mine got resolved by falling back to Maven version 3.0.x. Coz my project was not ready for the version 3.1.x.

Sign up to request clarification or add additional context in comments.

Comments

0

Looks like an internet connection issue to me:

Could not transfer artifact org.apache.commons:commons-parent:pom:3 from/to central (http://repo.maven.apache.org/maven2): No response received after 60000 

What happens if you repeat the command? The file should be available on the central repo: http://search.maven.org/#artifactdetails%7Corg.apache.commons%7Ccommons-parent%7C3%7Cpom

Can you try to run the command again?

2 Comments

I tried it several times, but still the same. All the other dependencies seem to get downloaded ok. Mh.. i can also access it in my browser. Do i have to configure eclipse somehow in a strange way? ;-)
This answer should really be a comment.
0

Probably already solved this, but everyone else, try updating maven-shade-plugin to 2.1. You can do so by editing pom.xml.

Found this solution here: https://issues.apache.org/jira/browse/CAMEL-6587

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.