1

this is my first time ever working with a framework, I decided to learn Spring Boot to create a web app project. I have followed some tutorials, and the steps were (for most of the videos):

  1. go to start.spring.io, add the "Spring Web" dependency, select Maven project and then download the zip file.
  2. import the project on IntelliJ as a Maven project.

But the problem is that, as shown in the screenshots: it says: Cannot resolve symbol 'springframework' screenshot 1 and as for the POM file, "Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.5.2 from https://repo.maven.apache.org/maven2 was cached in the local repository"

as well as: Project '...' not found Dependency '...' not found Plugin '...' not found screenshot 2

Please let me know, what steps did I miss. Thank you

  • Are you by any chance behind a proxy? – peterulb Jun 30 '21 at 13:52
  • 1
    yes i am, why? @peterulb – Meriam Bokri Jun 30 '21 at 13:55
  • Failure to transfer sounds like a connection issue to the central maven repository. You might need to try this https://www.jetbrains.com/help/idea/settings-http-proxy.html – peterulb Jun 30 '21 at 13:57
  • Or if this doesn't work, try to configure maven directly, see https://stackoverflow.com/questions/15334394/could-not-transfer-artifact-org-apache-maven-pluginsmaven-surefire-pluginpom2 – peterulb Jun 30 '21 at 14:01
  • If you trying it from your office network then you might need to add the settings.xml in .m2 folder to let maven know custom configuration which you wish to use. – ProgrammerBoy Jun 30 '21 at 14:09
  • This project is opened in a network behind proxy. Usually a `settings.xml` is included in the project root directory or you need to ask your colleagues for that `settings.xml`. `settings.xml` contains data such as local repository location, alternate remote repository servers, and authentication information which is to be placed in `~/.m2`. – n0noob Jun 30 '21 at 15:01
  • Welcome to SO. Please check if https://stackoverflow.com/questions/56775550/can-not-resolve-symbol-security-in-spring-boot-application/56775643 can be useful, I guess we've met the same problem of proxy or firewall which blocked the downloading from maven repo. Also please try to run maven from the command line instead of IDE. – Dmitriy Popov Jun 30 '21 at 17:24
  • All the possible solutions are addressed here- https://stackoverflow.com/questions/5074063/maven-error-failure-to-transfer – Caffeine Coder Jul 01 '21 at 09:28

1 Answers1

0

Make sure that you can access "https://repo.maven.apache.org/maven2". And check the HTTP proxy settings from Preferences | Appearance & Behavior | System Settings | HTTP Proxy. Select No proxy if you don't need it for accessing the Maven repo. Also, try to disable the downloaded 3rd party plugins temporarily and restart your IDE.