tomcat - Packaging using Maven -
i have java web application deployed using tomcat. want package tomcat root .war file using maven. can guide me through process? thank you
create pom.xml file in root directory following code.
<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>package</groupid> <artifactid>artifactid</artifactid> <version>0.0.1-snapshot</version> <name>project</name> <packaging>war</packaging> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <configuration> <webxml>web-inf/web.xml</webxml> </configuration> </plugin> </plugins> </build> </project>
then execute following command in command line mvn:clean install.
the war file generated target directory.
Comments
Post a Comment