问题很简单。我在pom.xml中添加了<executions></executions>标记,但是出现以下错误:

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: MyProject
POM Location: MyPOM

Reason: Parse error reading POM. Reason: Unrecognised tag: 'executions' (position: START_TAG seen ...</version>  \t\n\t\t\t\t\t\t    <executions>... @2014:23)
for project MyProject

可能是由于我使用的Maven版本引起的吗?我的Maven版本是2.1.0。我找不到何时执行“executions”标签。没有“executions”标记,一切都还可以,我尝试了一些Web上的代码示例,但也没有用。有任何想法吗?

最佳答案

   <executions> tag must be within the <build> </build> section

如果您的插件不在main build部分中,请将其移到那里。

10-07 21:17