Maven plugin for deployment of Tomcat web application
- Let's say git repository is cloned into local folder
C:\cc-deploy-maven-plugin. - Clone repository to separate folder, e.g.
C:\mvn-repo. - Switch to
mvn-repobranch in that folder. - Go back to folder
C:\cc-deploy-maven-plugin - First, change the version
mvn versions:set -DnewVersion=1.29 versions:commit - Then, if no new modules were added run
mvn clean install -DmvnRepo=C:\\mvn-repo(here and lower: \ is escaped for Cygwin). - If a new module was added, then do this:
- Run
mvn clean install -DmvnRepoNewModule=C:\\mvn-repo. - Revert changed files in mvn-repo folder. Don't revert (i.e. delete) new ones.
- Rename
maven-metadata-local*tomavent-metadata*. - Run the same line as for the case when no new modules were added.
- Run
- Go to folder
C:\mvn-repo. - Add new files to commit, then commit and push
mvn-repobranch to server.
mvn clean install
| parameter | description | required |
|---|---|---|
| deploy.warName | name of the folder where plugin will be uploaded to, usually it should be ${project.build.finalName} |
yes |
| deploy.hostName | hostname to connect to via SSH | yes |
| deploy.port | SSH port | no, default value is 22 |
| deploy.userName | SSH username | yes |
| deploy.sshKeyFile | SSH key file | yes |
| deploy.remoteWebApps | remote folder where upload files to | yes |
| deploy.nginxCacheDir | remote folder which must be cleaned after any changes were made | yes |
| touchWebXml | whether WEB-INF/web.xml must be touched after remote files were uploaded/removed/overwritten |
no, default true |