0

This is my first Spring Boot project. I Installed Spring Tool Suite IDE and when I try to create a new project! I Get these errors (as you can see on the GIF)

I tried with Java8 and Java11 and I still get the error.

The stack trace of the error:

ArtifactTransferException: Failure to transfer org.codehaus.plexus:plexus-utils:pom:3.1.0 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.plexus:plexus-utils:pom:3.1.0 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org

The 4 errors: enter image description here

I did cd %userprofile%\.m2\repository on the cmd and then I did start . to open the folder, then I manually deleted the cache.

That solved the 4 errors above. But I got 2 new warnings: Description Resource Path Location Type First warning:

Build path specifies execution environment JavaSE-11. There are no JREs installed in the workspace that are strictly compatible with this environment.

Second warning:

The compiler compliance specified is 11 but a JRE 14 is used produits

Image of the new warnings: enter image description here:

When I open File-> Properties I got this :

enter image description here

João Dias
  • 16,277
  • 6
  • 33
  • 45
  • 1
    Since it's based on Eclipse, https://stackoverflow.com/questions/5074063/maven-error-failure-to-transfer might be related – Martheen Oct 06 '20 at 08:58
  • 1
    sounds definitely like the issue mentioned in the previous comment, so please take a look and delete your local Maven cache. – Martin Lippert Oct 06 '20 at 10:42
  • I cleared the cache, and it solve those 4 errors .. but now I get 2 new warnings.. I edited my post! – Fack Coding Oct 06 '20 at 11:18
  • check your pom.xml, what version is there and check compiler compliance, what is there? Both values should be same. Also in build path the same native library should be used.(JDK not JRE) – prem30488 Oct 06 '20 at 13:13
  • THe warnings about jre means Eclipse/STS cannot find a jvm of the version that your project is configured to use. All you have to do is add a jre of the right version to your workspace. Go to "Window >> Preferences" then type 'JRE' in the searchbox. – Kris Oct 06 '20 at 15:51
  • @Kris I edited the default path of the JRE to the folder of the `JDK D:\Java\JDK` and it still doesn't work :( – Fack Coding Oct 07 '20 at 06:10
  • Maybe Eclipse doesn't update the info about the JRE if you just change its path, that could be a bug. Try deleting the JRE in preference. Then add it back. Also, make sure the JDK you point to is actually a JDK 11 (from the path `D:\Java\JDK` I cannot tell what version it is) – Kris Oct 13 '20 at 15:20

0 Answers0