Maven settings for deployment using scp

Create a file settings.xml in ~/.m2 that’s C:Documents and Settingsiwright.m2 in my case using cygwin on XP

Create a server entry with the necessary info e.g. if using ssh
<privateKey>C:Documents and Settingsiwright.sshid_rsa</privateKey>

Note that if you are using cygwin then you will probably need to copy your .ssh directory from /cygwin/home/username to Documents and Settingusername

Run a deploy command
mvn verify install:install deploy:deploy

If the deployment repository isn’t set in the pom then you can also define it using:

(Note the id cggh must match the id in settings.xml otherwise the permissions won’t be resolved from the settings.xml)

Leave a comment

Your email address will not be published. Required fields are marked *