2014-03-05 27 views
-1

我有樹 的pom.xml .presentation(耳) ..business(戰爭) ..integration(JAR)誤差建設項目耳朵與Maven期間3

當我嘗試建立耳(演示文稿)我得到這個錯誤,我不明白爲什麼神器演示文稿應該是一個依賴和依賴的究竟是什麼? :

Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.6:generate-application-xml (default-generate-application-xml) on project presentation: Artifact[war:presentaion:presentation] is not a dependency of the project. ->Help 

耳朵:pom.xml中:

<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/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>presentation</groupId> 
    <artifactId>presentation</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <packaging>ear</packaging> 
    <parent> 
    <groupId>MyProject</groupId> 
    <artifactId>MyProject</artifactId> 
    <version>0.0.1</version> 
    </parent> 

<build> 
    <plugins> 

    <plugin> 
     <artifactId>maven-resources-plugin</artifactId> 
     <version>2.4</version> 
     <configuration> 
     <encoding>UTF-8</encoding> 
     </configuration> 
    </plugin> 
    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <version>3.1</version> 
    </plugin> 

    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-ear-plugin</artifactId> 
     <version>2.6</version> 
     <configuration> 
     <modules> 
      <webModule> 
      <groupId>presentaion</groupId> 
      <artifactId>presentation</artifactId> 
      <bundleFileName>presentation.war</bundleFileName> 
      <contextRoot>/presentation</contextRoot> 
      </webModule> 
      <jarModule> 
      <groupId>integration</groupId> 
      <artifactId>integration</artifactId> 
      <bundleFileName>integration.jar</bundleFileName> 
      </jarModule> 
     </modules> 
     <displayName>My Project</displayName> 
     </configuration> 
    </plugin> 
    </plugins> 
    <finalName>presentation</finalName> 
</build> 
    <dependencies> 
    <dependency> 
     <groupId>business</groupId> 
     <artifactId>business</artifactId> 
     <version>0.0.1-SNAPSHOT</version> 
     <type>war</type> 
    </dependency> 
    <dependency> 
     <groupId>integration</groupId> 
     <artifactId>integration</artifactId> 
     <version>0.0.1-SNAPSHOT</version> 
     <type>jar</type> 
    </dependency> 

    </dependencies> 
</project> 
+0

「presentaion」是一個錯字,也許你鏈接到不同的模塊名稱 – robermann

+0

可能是孩子的pom.xml有GROUPID「演示」 :) – robermann

+0

是的,謝謝你:) ...其實我修正了錯誤,我應該把業務,而不是 – elpazio

回答

0

在當前.pom你正在構建一個耳朵,你給同側耳爲warModule。

你應該給一個.war人工製品在耳插件webmodule