I\'m trying to create a spring mvc application. This is my pom.xml
Clearing metadata helped me or change the workspace.
In my case, I did remove maven nature manually from .project
file while having the project opened in Eclipse. So what I'd to do was to add maven nature again using the contextual menu (roght click on the project > configuration > add maven nature). Afterwards, everything worked nice :D
If you are running spring cloud application, make sure your boot version matches cloud version. You can check the version compatibility matrix at the bottom of this page : https://spring.io/projects/spring-cloud.
Mine was caused by a corrupt Maven repository.
I deleted everything under C:\Users\<me>\.m2\repository
.
Then did an Eclipse Maven Update, and it worked first time.
So it was simply spring-boot.jar
got corrupted.
Another option is to use the Apache Maven Shade Plugin: This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies.
add this to your build plugins section
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
</plugin>
May be your dependencies not build correctly. Check compilation issue in project.
Clean and rebuild project.
For maven project:
mvn clean install
For gradle projects:
gradle clean build
or gradlew clean build