README
Usage deployer:deploy => Fresh deployment of a war file deployer:undeploy => Undeploys a already deployed application. deployer:update => Undeploys and Deploys (Re-deployment) of the application.
There are sensible defaults.
- If appName is not provided then the project's artifactId is taken as one.
- By default deploys to localhost.
- Default scheme for authentication with tomcat is HTTP. Can be changed to HTTPS. Any other value will give error.
- The default war file is the generated war file in target directory.
- By default does not uses any proxy.
- Default tomcat port is 8080, if you are running tomcat on different port then please provide one.
- Default tomcatVersion is tomcat6, provide tomcat7 if using that one.
- Default proxy port is 80 - change if required.
Example Configuration
<plugin>
<groupId>com.github.vikesh.maven</groupId>
<artifactId>deployer</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<tomcatPort>80</tomcatPort>
<tomcatVersion>tomcat7</tomcatVersion>
<tomcatURL>192.168.159.128</tomcatURL>
<scriptUser>username</scriptUser>
<scriptPass>password</scriptPass>
<appName>Rental</appName>
<proxyHost>192.168.2.100</proxyHost>
<proxyPort>8080</proxyHost>
<warFile>target/whateverWar.war</warFile>
</configuration>
</plugin>
Can put the above configuration in pom.xml => Highly not recommended as credentials are with pom file.
To get around this. add a profile in settings.xml file. and add these values there - following is just an
Example
<profile>
<id>someProfile</id>
<property>
<tomcat.port>80</tomcat.port>
<tomcat.version>tomcat7</tomcat.version>
<tomcat.url>192.168.159.128</tomcat.url>
<script.user>username</script.user>
<script.pass>password</script.pass>
<app.name>Rental</app.name>
<proxy.host>192.168.2.100</proxy.host>
<proxy.port>8080</proxy.port>
<war.file>target/whateverWar.war</war.file>
</property>
</profile>
And in your POM.xml file
Example
<plugin>
<groupId>com.github.vikesh.maven</groupId>
<artifactId>deployer</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<tomcatPort>${tomcat.port}</tomcatPort>
<tomcatVersion>${tomcat.version}</tomcatVersion>
<tomcatURL>${tomcat.url}</tomcatURL>
<scriptUser>${script.user}</scriptUser>
<scriptPass>${script.pass}</scriptPass>
<appName>${app.name}</appName>
<proxyHost>${proxy.host}</proxyHost>
<proxyPort>${proxy.port}</proxyHost>
<warFile>${war.file}</warFile>
</configuration>
</plugin>
During execution specify the profile name using -P