在我的项目中(继承了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
&gt;时可以很好地构建Maven Install
。