I was trying to initialize a Spring Boot application in IntelliJ IDEA. Get this error. How can I fix this?
A problem occurred configuring root project 'DemoSpringApplication'.
> Could not resolve all files for configuration ':classpath'.
> Could not find org.springframework.boot:spring-boot-buildpack-platform:2.7.2.
Searched in the following locations:
- https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-buildpack-platform/2.7.2/spring-boot-buildpack-platform-2.7.2.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.7.2 > org.springframework.boot:spring-boot-gradle-plugin:2.7.2
> Could not find org.springframework.boot:spring-boot-loader-tools:2.7.2.
Searched in the following locations:
- https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-loader-tools/2.7.2/spring-boot-loader-tools-2.7.2.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.7.2 > org.springframework.boot:spring-boot-gradle-plugin:2.7.2
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
CodePudding user response:
fix build.gradle plugin org.springframework.boot
version 2.7.2
to 2.7.1
try this -> id 'org.springframework.boot' version '2.7.1'
CodePudding user response:
i had the same issue before so you need to update your intellij idea or if for any reason you can't update it uninstall the intellij idea and download the new version of that. According to the intellij idea community there is bug for springboot 2.7 that the older versions can't support it