Friday 3 January 2014

Could not resolve dependencies for project / Failed to execute goal on project

Solution :
Under .M2 folder(hint: click on start->search for .M2 it will show list of folders select .M2 folder)

Settings.xml file might be missing proxy settings or

Your proxy settings password expired

Just in case if you don't have any proxy details you can use this

<?xml version="1.0"?>
<settings>
 <proxies>
  <proxy>
   <active>true</active>
   <protocol>http</protocol>
   <host>proxyurl</host>
   <port>8080</port>
   <username>proxyusername</username>
   <password>password</password>
  </proxy>
 </proxies>
</settings>

Problem example:
Could not resolve dependencies for project ProjectName:ProjectName:jar:1.0: Failed to collect dependencies for [org.uncommons:reportng:jar:1.1.2 (test), javax.mail:mail:jar:1.4.3 (compile), net.sourceforge.jexcelapi:jxl:jar:2.6 (compile), org.seleniumhq.selenium:selenium-java:jar:2.38.0 (compile), log4j:log4j:jar:1.2.16 (compile), junit:junit:jar:4.8.1 (test), org.testng:testng:jar:6.3.1 (test), com.opera:operadriver:jar:1.2 (compile)]: Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:2.38.0: Could not transfer artifact org.seleniumhq.selenium:selenium-java:pom:2.38.0 from/to central (http://repo.maven.apache.org/maven2): java.lang.NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

No comments:

Post a Comment