1

I am getting this error on importing https://github.com/spring-projects/spring-mvc-showcase in STS 3.7.3:---

Description Resource Path Location Type

Failure to transfer org.codehaus.mojo:aspectj-maven-plugin:pom:1.2 from https://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.codehaus.mojo:aspectj-maven-plugin:pom:1.2 from/to central: connect timed out pom.xml /spring-mvc-showcase line 1 Maven pom Loading Problem


Edit

Mvn is ok now but pom.xml error still persists if I remove the errors and do maven clean I get errors as:

[INFO] https://repo.maven.apache.org/maven2/org/codehaus/mojo/aspectj-maven-plugin/1.2/aspectj-maven-plugin-1.2.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [ERROR] Plugin org.codehaus.mojo:aspectj-maven-plugin:1.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:aspectj-maven-plugin:jar:1.2: Could not transfer artifact org.codehaus.mojo:aspectj-maven-plugin:pom:1.2 from/to central: connect timed out -> [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/PluginResolutionException

Patrick
  • 12,336
  • 15
  • 73
  • 115
Raaj
  • 31
  • 5
  • Is the project already imported in your workspace and does not run or has failures. Or are you not able to make the import in your IDE? Can you explain your problem a little bit more please – Patrick Apr 19 '16 at 07:17
  • I am able to import but pom.xml is showing this error – Raaj Apr 19 '16 at 07:39
  • are you able to build the project with this command: `mvn clean install`? looks like you have a connection or settings problem – Patrick Apr 19 '16 at 07:50
  • I am working on Windows .First of all do we need to have maven installed in the system for STS 3.7.3 which has m2e plugins already – Raaj Apr 19 '16 at 07:56
  • I would recommend to have it on the system. Its a easy installation. I cloned the project, too and it worked for me. – Patrick Apr 19 '16 at 08:05
  • I have it now.Can you plz help me in linking STS with Maven(in system).All I am getting is links for Eclipse release downloads.Plus I too think there can be some network issue as my dashboard is not opening properly all menus – Raaj Apr 19 '16 at 08:10

1 Answers1

0

First of all STS is build on Eclipse. So you can easily install the IDE Integration Eclipse IDE - M2Eclipse for STS. You can see how here. If you want to use it with this integration plugin you dont need to have a local maven repository.

Resolving Maven dependencies from the Eclipse workspace without installing to local Maven repository

But its also possible to use maven as a local system repository. Download is here and follow the steps for the installation and configuration here.

To see if you have a valid maven installation done, you can test it by typing mvn -v in a cmd shell or using STS -> right click on your project -> run as -> maven build or maven install.


Update:

I would say delete the project from your workspace and try it again. Download the project from gitHub as a zip file and import it again to your workspace. Right Click -> import -> existing maven project.

If you need to use a proxy for your connection you have to create a settings.xml in your .m2 folder. Look here for more info

Community
  • 1
  • 1
Patrick
  • 12,336
  • 15
  • 73
  • 115
  • @Raaj can you update your question with the new error messages please – Patrick Apr 19 '16 at 09:25
  • I have updated the error messages above.plz have a look – Raaj Apr 19 '16 at 09:32
  • have done that.I think its a network issue.Can you plz share ur settings.xml for reference – Raaj Apr 20 '16 at 03:08
  • @Raaj I dont need settings.xml. But if you need to use a proxy for your connection you have to create a `settings.xml` in your `.m2` folder. [Look here for more info.](http://stackoverflow.com/questions/1251192/how-do-i-use-maven-through-a-proxy) – Patrick Apr 20 '16 at 06:58
  • thx I found out it was some network issue correcting which all dependencies downloaded and errors resolved – Raaj Apr 20 '16 at 07:42