The Answer to Life, the Universe, and Everything

Sunday, December 09, 2007

Maven2 deploy to other server

Create file settings.xml under .m2
<?xml version='1.0' encoding='utf-8' ?>
<settings>
<servers>
<server>
<id>scp-repository</id>
<username>cavalier</username>
<privateKey>C:\Program Files\PuTTY\auth\id_rsa</privateKey>
<passphrase>xxxxxx</passphrase>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
</server>
</servers>
</settings>


Then add the following to pom.xml
<distributionManagement>
<repository>
<id>scp-repository</id>
<url>scp://192.168.0.xx/home/cav/repository</url>
</repository>
</distributionManagement>

No comments: