configuration and command to directoy deploy to remote server through maven :
-----------------------------------------------------------------------------
pom.xml configuration :
<build>
<finalName>MYWAR</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://XX.XX.XX.XX:8080/manager/text</url>
<username>admin</username>
<password>admin</password>
<path>/MYWAR </path>
</configuration>
</plugin>
</plugins>
</build>
------------------------------------------------------------------------------
maven command :
mvn compile tomcat7:redeploy
------------------------------------------------------------------------------
-----------------------------------------------------------------------------
pom.xml configuration :
<build>
<finalName>MYWAR</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://XX.XX.XX.XX:8080/manager/text</url>
<username>admin</username>
<password>admin</password>
<path>/MYWAR </path>
</configuration>
</plugin>
</plugins>
</build>
------------------------------------------------------------------------------
maven command :
mvn compile tomcat7:redeploy
------------------------------------------------------------------------------