The maven dependency of this plug-in is:
The document address of the plug-in is:
It mainly provides the following goal s
- wagon:upload-single uploads the specified file to a remote location.
- wagon:upload uploads the specified set of files to a remote location.
- wagon:download-single downloads the specified file from a remote location.
- wagon:download downloads the specified set of files from a remote location.
- wagon:list lists the content of a specified location in a remote repository.
- wagon:copy copies a set of files under a Wagon repository to another.
- wagon:merge-maven-repos merges , including metadata, a Maven repository to another.
- wagon:sshexec Executes a set of commands at remote SSH host.
The usage is as follows:
In order for the wagon Maven plugin to SSH to the Linux server, you need to configure the server user name and password in Maven's configuration file settings.xml.
To use this plug-in, you need to configure the following in build
The following is a demonstration of how to deploy a war to tomcat using this query
When the configuration is complete, execute the command
mvn clean package wagon:upload-single wagon:sshexec
You can deploy to the server and restart tomcat