Maven无法识别的标记:';执行';
问题很简单。我在pom.xml中添加了Maven无法识别的标记:';执行';,maven,tags,pom.xml,execution,Maven,Tags,Pom.xml,Execution,问题很简单。我在pom.xml中添加了标记,但出现以下错误: [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be t
标记,但出现以下错误:
[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
[信息]------------------------------------------------------------------------
[错误]致命错误
[信息]------------------------------------------------------------------------
[INFO]生成POM时出错(可能不是此项目的POM)。
项目ID:MyProject
POM位置:MyPOM
原因:读取POM时解析错误。原因:无法识别的标记:“执行”(位置:开始\u标记已看到…\t\n\t\t\t\t\t…@2014:23)
对于项目MyProject
这可能是由我使用的Maven版本引起的吗?我的Maven版本是2.1.0。我找不到何时实现了“executions”标记。没有“executions”标记,一切都正常,我尝试了一些来自web的代码示例,但也没有成功。有什么想法吗?我刚刚通过在
标记之前插入true
解决了这个问题。
结构正如
.......
</plugin>
<plugin>
<extensions>true</extensions>
<executions>
<execution>
<phase></phase>
<goals>
<goal></goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
。。。。。。。
真的
标记必须位于节内
如果您的插件不在主构建部分中,请将其移动到主构建部分。首先,为什么要添加它们,并请显示完整的pom文件?为什么以哈文斯的名义使用这样一个古老的Maven版本?请参阅
标记用于配置插件的行为。它们属于POM文件中的特定位置。正如前面的人所说,显示完整的POM文件。
<executions> tag must be within the <build> </build> section