How to fix this no goals have been specified for this build on maven?

The goal can be specified in the build-plugins-plugin section of your pom.xml, depending on what you want to happen with the application.

E.g. if you want to execute it, you can follow the steps described on the question How do I execute a program using Maven?.

I don't think you can do it with just mvn, but you need to specify what happens (like mvn package or mvn install)

You can read more about goals and phases on Introduction to the Build Lifecycle.


Run the following command in cmd: mvn clean


Enter the required life cycle event in Command line field in run/debug configurations. For me, I want to run the project so, I used spring-boot:run

It worked for me

Maven life cycle references

enter image description here

Tags:

Java

Maven