How to create a maven project in eclipse which give a war which in turn contains sub modules as jar? -


i having client requirement maven project generate war in turn contains submodules jar?

let me clarify question

this master pom.xml inside having 2 modules named child1 , child2.

i need masterwebapp.war inside child1.jar , child2.jar presents.

if changing packaging war packaging - pom error disappeared cant required war while maven clean install

<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> <groupid>com.abc</groupid> <artifactid>masterwebapp</artifactid> <packaging>war</packaging> <version>0.0.1-snapshot</version> <name>master maven webapp</name> <url>http://maven.apache.org</url> <properties>     <org.springframework.version>4.1.7.release</org.springframework.version> </properties> <modules>     <module>child1</module>     <module>child2</module> </modules>  ....... 

you can execute 2 ways.

1) in eclipse. right click on project , click on run --> maven build , give goals "clean install" generate war in target folder of project

2) using command prompt, navigate directory pom.xml present , execute below commands

mvn clean install package

it generate war in target folder


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -