2012-07-13 2 views
3

Maven이있는 프로젝트 A에서 프로젝트 B로 리소스 (.java, .gwt.xml, .ui.xml)를 내보내려고합니다. 그래서 프로젝트에서 나는 다음과 같은 치어 쓰기 :maven이 build-helper-maven-plugin에서 execution'a 태그를 인식하지 못했습니다.

<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> 

을하지만 메이븐을 설치 실행할 때이 오류가있어 : 없음 이유를 알고

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] 

를?

감사합니다.

답변

5

<execution> 요소는 단일 <execution>를 지정하는 경우에도, <executions> 수집 용기로 묶어야합니다.

<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>build-helper-maven-plugin</artifactId> 
    <executions> <!-- Notice the container element here --> 
    <execution> 
    ... 
관련 문제