没有为此构建指定目标. [英] No goals have been specified for this build.

查看:80
本文介绍了没有为此构建指定目标.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Docker中运行Maven.

I'm trying to run Maven in Docker.

所以我从她的 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的经验,所以我不明白是什么原因导致了此问题.

I don't have experience with Maven so I don't understand what's causing this issue.

Docker容器仅安装了Maven,但未运行,因此我不明白Maven如何引发错误.

The Docker container only has Maven installed, but it's not running it so I don't understand how Maven can throw an error.

推荐答案

单击build as maven后,需要在目标"选项卡中定义clean install.

You need to define clean install in Goal tab after you click build as maven.

这篇关于没有为此构建指定目标.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆