Open the cmd command prompt, mvn install the jar package to the local library, mvn deploy is to upload the jar package to the remote Server,install and deploy will be the first self-bulid compilation check, if you confirm that the jar package is not a problem, You can use the-dmaven.test.skip=true parameter to skip compilation and testing.
The full command is:
MVN Deploy:deploy-file-dmaven.test.skip=true-dfile=d:\work\scan\com.kevin.skeleton\target\skeleton-1.0.jar- dgroupid=hessian-dartifactid=skeleton-dversion=1.0-dpackaging=jar-drepositoryid=releases-durl=http:// 192.168.0.202:8080/nexus/content/repositories/releases
mvn deploy:deploy-file -dmaven.test.skip=true -dfile=d:\ mvnproject\service-mvn-1.0.0.jar -dgroupid=pri.roy.mvn.test -dartifactid=mvn-api -dversion= 1.0.0-snapshot -dpackaging=jar -drepositoryid=roy_privrepository_snapshots -durl=http:// 10.4.71.144:9090/REPOSITORY/ROY_PRIVREPOSITORY_SNAPSHOTS/1
-dmaven.test.skip=true //skips compilation, Test-dfile=d:\mvnproject\service-mvn-1.0.0.jar // Jar package file address, absolute path-dgroupid=pri.roy.mvn.test //gruopid--pom coordinates, Custom-dartifactid=mvn-api // Artifactid--pom coordinates, custom-dversion //Version number-dpackaging //Packing Method-drepositoryid // Remote library server id-durl //Remote library server address
Such as:
MVN Deploy:deploy-file-dgroupid=com.alipay-dartifactid=alipay-sdk-java-dversion=20170725114550-dpackaging=jar- Dfile=d:\com\alipay\alipay-sdk-java\20170725114550\alipay-sdk-java-20170725114550.jar-durl=http://xxxxxxxxx : 8081/repository/obanks-releases/-drepositoryid=obanks-releases
<dependency> <groupId>com.alipay</groupId> <artifactid>alipay-sdk-java</artifactid > <version>20170725114550</version></dependency>
Uploading jars to private warehouses using the Deploy command