耳朵和战争没有建立 [英] Ear and WAR not building
问题描述
在执行命令 'maven clean install' 后,我得到以下控制台屏幕.我的输出控制台使用 m2eclipse 插件
Upon executing the command 'maven clean install', I get the following console screen. My output console using m2eclipse plugin
当我访问控制台屏幕中提到的路径时,只有 pom.xml 文件的副本,而没有 EAR 和 WAR 文件.
When I visit the path mentioned in the console screen, there is only a copy of pom.xml file but not EAR and WAR file.
我希望构建一个包含 WAR 文件的 EAR 文件.这个问题是我今天贴出来的,我按照绅士说的步骤做了.
I wish to build an EAR file which contains a WAR file. This question was posted by me today and I followed the steps as mentioned by the Gentleman.
我也会分享我的父母 pom.xml
I will also share my parent pom.xml
<artifactId>itaras</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>itaras</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<finalName>MyEarFile</finalName>
<version>5</version>
<generatedDescriptorLocation>$D:/itaras
/ITARAS_Branch_3Aug2017/itaras/WebContent
</generatedDescriptorLocation>
<modules>
<webModule>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<uri>appITARAS.war</uri>
<bundleFileName>appITARAS.war</bundleFileName>
<contextRoot>/ITARAS</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
<groupId>itaras</groupId>
<profiles>
<profile>
<modules>
<module>itaras-ear</module>
<module>itaras-war</module>
<module>?</module>
</modules>
</profile>
</profiles>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>itaras</groupId>
<artifactId>itaras-war</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
推荐答案
如果你说
,你只构建了一个 pom.您的子项目需要指定 war
或 ear
作为包装.
If you say <packaging>pom</packaging>
, you only build a pom. Your child project needs to specify war
or ear
as packaging.
这篇关于耳朵和战争没有建立的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!