Reputation: 1
My Spring Boot application cannot build. It seems maven is having issues even with the least dependency. I have not added any dependency apart from the spring web, which I have added right from the start.spring.io initializer.
4.0.0 org.springframework.boot spring-boot-starter-parent 2.3.1.RELEASE com.example demo 0.0.1-SNAPSHOT demo Demo project for Spring Boot
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
I couldn't upload an image of the error message, but here is the message
Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'vehicleTransFleets'. Could not calculate build plan: Plugin org.apache.maven.plugins:maven-jar-plugin:3.2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:3.2.0 Plugin org.apache.maven.plugins:maven-jar-plugin:3.2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:3.2.0 Could not calculate build plan: Plugin org.apache.maven.plugins:maven-jar-plugin:3.2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:3.2.0 Plugin org.apache.maven.plugins:maven-jar-plugin:3.2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:3.2.0
Upvotes: 0
Views: 1683
Reputation: 905
Possible issues:
~/.m2/repository/org/apache/maven/plugins/maven-jar-plugin/3.2.0
to debug this one.Upvotes: 0
Reputation: 76
Try removing the .m2 folder. It's the maven local repository. It contains all the jar files downloaded from maven and sometimes these files are corrupted. All the required files will be downloaded again when you build the project.
It is in this path by default:
Windows: C:\Users\<User_Name>\.m2
Linux: /home/<User_Name>/.m2
Mac: /Users/<user_name>/.m2
Upvotes: 1