Maven’s wagon-ssh-external component enables deploying artifacts to remote SSH servers by leveraging an external SSH client. It requires an already installed SSH program on the system and allows Maven to interact with the remote server for deployments.
Key Concepts and Usage:
Wagon Provider:
wagon-ssh-external is a Wagon provider, meaning it implements the Wagon API for interacting with remote repositories.
External SSH Client:
This component relies on an existing SSH client (like OpenSSH) being installed on the machine where Maven is running.
Deployment:
It’s primarily used for deploying artifacts (JARs, WARs, etc.) and website content to SSH servers.
Configuration:
pom.xml
1 | ... |
- in url, scpexe:// instead of scp://
- if already configred ssh login to ssh server by rsa keys, then the above configuration will work without below setting.xml changed.
- if need password or scp command … configure in setting.xml as below.
setting.xml
1 | ... |