这个版本没有指定目标。

我试图在Docker中运行Maven。

所以我从她的https://hub.docker.com/_/maven/中提取了图片。

docker pull maven 

但是,当我运行它:

 docker run maven 

我得到:

 [ERROR] No goals have been specified for this build. 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] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] 

我没有Maven的经验,所以我不明白是什么原因造成这个问题。

Docker容器只安装了Maven,但没有运行它,所以我不明白Maven如何抛出错误。