Reputation: 113
Upon executing the command 'maven clean install', I get the following console screen. My output console using m2eclipse plugin
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.
folder view mentioned in console
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.
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>
Upvotes: 1
Views: 84
Reputation: 35843
If you say <packaging>pom</packaging>
, you only build a pom. Your child project needs to specify war
or ear
as packaging.
Upvotes: 3