java – maven不识别来自build-helper-maven-plugin的execution’a标签
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了java – maven不识别来自build-helper-maven-plugin的execution’a标签,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2192字,纯文字阅读大概需要4分钟。
内容图文
![java – maven不识别来自build-helper-maven-plugin的execution’a标签](/upload/InfoBanner/zyjiaocheng/721/979e0e60db9b45b1b142b0f98c4c6c4a.jpg)
我试图用Maven将资源(.java,.gwt.xml,.ui.xml)从项目A导出到项目B.所以在项目A中我写下面的pom:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.pe.interbank</groupId>
<artifactId>reactor</artifactId>
<version>1.0.0</version>
<relativePath>../reactor</relativePath>
</parent>
<properties>
<path2>Reactor/pom.xml</path2>
<path1>C:/Angelo/Workspace/MultipleGWTv2/Reactor/pom.xml</path1>
</properties>
<artifactId>transferencias</artifactId>
<packaging>jar</packaging>
<name>transferencias</name>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
<include>**/*.gwt.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java</source>
</sources>
</configuration>
</execution>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
</dependency>
</dependencies>
但是当我运行Install Maven时出现了这个错误:
The build could not read 1 project -> [Help 1]
The project com.pe.interbank:transferencias:1.0.0 (C:\Angelo\Workspace\MultipleGWTv2\Transferencias\pom.xml) has 1 error
Malformed POM C:\Angelo\Workspace\MultipleGWTv2\Transferencias\pom.xml: Unrecognised tag: 'execution' (position: START_TAG seen ...</artifactId>\r\n\t\t\t\t<execution>... @36:16) @ C:\Angelo\Workspace\MultipleGWTv2\Transferencias\pom.xml, line 36, column 16 -> [Help 2]
谁知道为什么?
谢谢.
解决方法:
<执行>元素必须用< executions>包围收集容器,即使您指定单个< execution>.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions> <!-- Notice the container element here -->
<execution>
...
内容总结
以上是互联网集市为您收集整理的java – maven不识别来自build-helper-maven-plugin的execution’a标签全部内容,希望文章能够帮你解决java – maven不识别来自build-helper-maven-plugin的execution’a标签所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。