Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>

If you are using debug configuration for maven, use the command

clean install

And skip all the tests.


Try without command mvn in the command line. Example:

From:

mvn clean install jetty:run

To:

clean install jetty:run

Thanks for the reply. I was using "mvn clean install" in the maven build configuration. we no need to use "mvn" command if running through eclipse.

After buiding the application using the command "clean install" , I got one more error -
"No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?"

I followed this link:- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

now application building is fine in eclipse.