mvn clean package: Unknown lifecycle phase "mvn".

maven in eclipse package command: mvn clean package

错误:Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]

The reason: The main thing has its own maven plugin in eclipse, when the package will automatically add the command mvn, that is when the command "mvn clean package", the command is "mvn mvn clean package".

Solution: command to change to "clean package" can be.

note:

Prevail here maven settings.xml file to the introduction of the eclipse, not its name restrictions.

Guess you like

Origin blog.csdn.net/yunxuantu/article/details/87607641