I'm using Maven in my Java project and I want to deploy the WAR to my localhost Tomcat.
I have this lines in my pom.xml file:
<properties>
<tomcat.target>C:\Directory</tomcat.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<webappDirectory>${tomcat.target}</webappDirectory>
</configuration>
</plugin>
</plugins>
</build>
The output logs are:
[INFO] --- maven-install-plugin:2.3.1:install (default-install) ---
[INFO] Installing C:\Directory\name.war to C:\Directory\name.war
[INFO] Installing C:\Directory\pom.xml to C:\Directory\name.pom
As you can see I want to config this line:
to C:\Directory\name.war
How to point it to Tomcat's /webapps folder?
<configuration>
<url>http://127.0.0.1:8080/manager</url>
<server>TomcatServer</server>
<path>/mkyongWebApp</path>
</configuration>
check the link http://www.mkyong.com/maven/how-to-deploy-maven-based-war-file-to-tomcat/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With