DockerでMavenを実行しようとしています。このビルドの目標は指定されていません。
私は彼女から画像を引っ張ったhttps://hub.docker.com/_/maven/。しかし
docker pull maven
、私はそれを実行します。
docker run maven
私が手:私は、私は、この問題を引き起こしているのか理解していないの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]
。
DockerコンテナにはMavenがインストールされているだけですが、Mavenが動作していないため、Mavenがエラーをスローすることはできません。
ライフサイクルを 'package'や' deploy'などで実行するかどうかを定義するか、 'surefire:test'のようなプラグインのゴールを実行する必要があります。 – khmarbaise
私は分かりません。コード内で正確に何を変更する必要がありますか? – octavian
あなたは以下を行う必要があります: 'docher run maven clean'?これが問題なしに行われるかどうかを確認してください... – khmarbaise