在我的项目中(继承 BTW,所以它的某些方面仍然未知),在 Eclipse/m2e 下,我右键单击pom.xml
>1 Maven Build
并得到一个对话框:
选择要运行的启动配置:
- m2 myproj (1):
- m2 myproj (2):
- m2 myproj (3):
- m2 myproj:
但是查看项目的Properties
> Run/Debug Settings
,根本没有启动配置。没有任何。
这意味着什么?
我应该选择上面列出的 4 种配置之一吗?如果是这样,是哪一个?为什么?
更新 1:有趣的是,当我右键单击pom.xml
并选择Run As
>Run Configurations...
时,我看到定义了这些配置:
不过,我仍然不知道这意味着什么。我不记得曾经定义过它们。他们是怎么到那里的?
更新 2: 显然,这些启动配置是通过单击某些关闭/取消按钮或类似按钮无意中创建的。所以我删除了除一个之外的所有内容,然后运行它:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.093s
[INFO] Finished at: Wed Dec 05 16:44:24 EST 2012
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------
[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]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
奇怪的。我知道pom.xml
选择Run As
>时有目标并且构建良好Maven Install
。