<!-- Another sample, using keys to authenticate. <server> <id>siteServer</id> <privateKey>/path/to/private/key</privateKey> <passphrase>optional</passphrase> </server> --> <server> <id>alipay-java-sdk</id> <username>deployment</username> <password>deployment123</password> </server>
mvn deploy:deploy-file -DgroupId=com.alipay -DartifactId=sdk-Java -Dversion=*** -Dpackaging=jar -Dfile=alipay-sdk-java*.jar -Durl=http://host:port/nexus/content/repositories/releases/ -DrepositoryId=alipay-java-sdk
原文:http://www.cnblogs.com/niejunlei/p/5979196.html