发布jar包至maven本地库及私服

pom文件见附件,如不打至私服,不需要 <distributionManagement> 标签 中的内容

C:\Users\chao.gao>E:


E:\>cd E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib


E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib>mvn install:install-file

 -DgroupId=com.cloopen -DartifactId=CCP_REST_SMS_SDK_JAVA -Dversion=v2.6.3r -Dpa

ckaging=jar -Dfile=CCP_REST_SMS_SDK_JAVA_v2.6.3r.jar

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building CCP_REST_SMS_SDK_JAVA v2.6.3r

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ CCP_REST_SMS_

SDK_JAVA ---

[INFO] Installing E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib\CCP_RE

ST_SMS_SDK_JAVA_v2.6.3r.jar to D:\apache-maven-3.0.4\repository\com\cloopen\CCP_

REST_SMS_SDK_JAVA\v2.6.3r\CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar

[INFO] Installing C:\Users\chao.gao\AppData\Local\Temp\mvninstall319341897495226

556.pom to D:\apache-maven-3.0.4\repository\com\cloopen\CCP_REST_SMS_SDK_JAVA\v2

.6.3r\CCP_REST_SMS_SDK_JAVA-v2.6.3r.pom

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 11.246s

[INFO] Finished at: Fri Aug 26 14:22:01 CST 2016

[INFO] Final Memory: 2M/15M

[INFO] ------------------------------------------------------------------------

E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib>


E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib>mvn deploy:deploy-file -

DgroupId=com.cloopen -DartifactId=CCP_REST_SMS_SDK_JAVA -Dversion=v2.6.3r -Dpack

aging=jar -Dfile=CCP_REST_SMS_SDK_JAVA_v2.6.3r.jar -Durl=http://172.16.100.131:8

081/nexus/content/repositories/release -DrepositoryId=release

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building CCP_REST_SMS_SDK_JAVA v2.6.3r

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ CCP_REST_SMS_SDK_

JAVA ---

Uploading: http://172.16.100.131:8081/nexus/content/repositories/release/com/clo

open/CCP_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar

Uploaded: http://172.16.100.131:8081/nexus/content/repositories/release/com/cloo

pen/CCP_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar (1987 KB at

2084.2 KB/sec)

Uploading: http://172.16.100.131:8081/nexus/content/repositories/release/com/clo

open/CCP_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.pom

Uploaded: http://172.16.100.131:8081/nexus/content/repositories/release/com/cloo

pen/CCP_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.pom (407 B at 7.

1 KB/sec)

Downloading: http://172.16.100.131:8081/nexus/content/repositories/release/com/c

loopen/CCP_REST_SMS_SDK_JAVA/maven-metadata.xml

Uploading: http://172.16.100.131:8081/nexus/content/repositories/release/com/clo

open/CCP_REST_SMS_SDK_JAVA/maven-metadata.xml

Uploaded: http://172.16.100.131:8081/nexus/content/repositories/release/com/cloo

pen/CCP_REST_SMS_SDK_JAVA/maven-metadata.xml (316 B at 5.1 KB/sec)

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 3.051s

[INFO] Finished at: Fri Aug 26 15:03:02 CST 2016

[INFO] Final Memory: 3M/15M

[INFO] ------------------------------------------------------------------------


以下是根据资料在测试过程中不同错误命令的三种错误提示信息

E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib>


DgroupId=com.cloopen -DartifactId=CCP_REST_SMS_SDK_JAVA -Dversion=v2.6.3r -Dpack

aging=jar -Dfile=CCP_REST_SMS_SDK_JAVA_v2.6.3r.jar -Durl=http://172.16.100.131:8

081/nexus/content/groups/public/

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building CCP_REST_SMS_SDK_JAVA v2.6.3r

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ CCP_REST_SMS_SDK_

JAVA ---

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.pom

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 3.543s

[INFO] Finished at: Fri Aug 26 14:51:11 CST 2016

[INFO] Final Memory: 3M/15M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:

deploy-file (default-cli) on project CCP_REST_SMS_SDK_JAVA: Failed to deploy art

ifacts: Could not transfer artifact com.cloopen:CCP_REST_SMS_SDK_JAVA:jar:v2.6.3

r from/to remote-repository (http://172.16.100.131:8081/nexus/content/groups/pub

lic/): Failed to transfer file: http://172.16.100.131:8081/nexus/content/groups/

public/com/cloopen/CCP_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.j

ar. Return code is: 401, ReasonPhrase:Unauthorized. -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE

xception

E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib>mvn deploy:deploy-file -

DgroupId=com.cloopen -DartifactId=CCP_REST_SMS_SDK_JAVA -Dversion=v2.6.3r -Dpack

aging=jar -Dfile=CCP_REST_SMS_SDK_JAVA_v2.6.3r.jar -Durl=http://172.16.100.131:8

081/nexus/content/groups/public/ -Dusername=admin -Dpassword=feixun*123

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building CCP_REST_SMS_SDK_JAVA v2.6.3r

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ CCP_REST_SMS_SDK_

JAVA ---

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.pom

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 2.787s

[INFO] Finished at: Fri Aug 26 14:52:52 CST 2016

[INFO] Final Memory: 3M/15M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:

deploy-file (default-cli) on project CCP_REST_SMS_SDK_JAVA: Failed to deploy art

ifacts: Could not transfer artifact com.cloopen:CCP_REST_SMS_SDK_JAVA:jar:v2.6.3

r from/to remote-repository (http://172.16.100.131:8081/nexus/content/groups/pub

lic/): Failed to transfer file: http://172.16.100.131:8081/nexus/content/groups/

public/com/cloopen/CCP_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.j

ar. Return code is: 401, ReasonPhrase:Unauthorized. -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE

xception

E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib>mvn deploy:deploy-file -

DgroupId=com.cloopen -DartifactId=CCP_REST_SMS_SDK_JAVA -Dversion=v2.6.3r -Dpack

aging=jar -Dfile=CCP_REST_SMS_SDK_JAVA_v2.6.3r.jar

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building CCP_REST_SMS_SDK_JAVA v2.6.3r

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ CCP_REST_SMS_SDK_

JAVA ---

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 1.084s

[INFO] Finished at: Fri Aug 26 14:56:55 CST 2016

[INFO] Final Memory: 3M/15M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:

deploy-file (default-cli) on project CCP_REST_SMS_SDK_JAVA: The parameters 'url'

 for goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file are missi

ng or invalid -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParamete

rException

E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib>mvn deploy:deploy-file -

DgroupId=com.cloopen -DartifactId=CCP_REST_SMS_SDK_JAVA -Dversion=v2.6.3r -Dpack

aging=jar -Dfile=CCP_REST_SMS_SDK_JAVA_v2.6.3r.jar -Durl=http://172.16.100.131:8

081/nexus/content/groups/public/

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building CCP_REST_SMS_SDK_JAVA v2.6.3r

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ CCP_REST_SMS_SDK_

JAVA ---

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.pom

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 2.230s

[INFO] Finished at: Fri Aug 26 14:58:07 CST 2016

[INFO] Final Memory: 3M/15M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:

deploy-file (default-cli) on project CCP_REST_SMS_SDK_JAVA: Failed to deploy art

ifacts: Could not transfer artifact com.cloopen:CCP_REST_SMS_SDK_JAVA:jar:v2.6.3

r from/to remote-repository (http://172.16.100.131:8081/nexus/content/groups/pub

lic/): Failed to transfer file: http://172.16.100.131:8081/nexus/content/groups/

public/com/cloopen/CCP_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.j

ar. Return code is: 401, ReasonPhrase:Unauthorized. -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE

xception

E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib>mvn deploy:deploy-file -

DgroupId=com.cloopen -DartifactId=CCP_REST_SMS_SDK_JAVA -Dversion=v2.6.3r -Dpack

aging=jar -Dfile=CCP_REST_SMS_SDK_JAVA_v2.6.3r.jar -Durl=http://172.16.100.131:8

081/nexus/content/groups/public/ -D-DrepositoryId=release

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building CCP_REST_SMS_SDK_JAVA v2.6.3r

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ CCP_REST_SMS_SDK_

JAVA ---

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.pom

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 2.230s

[INFO] Finished at: Fri Aug 26 15:01:08 CST 2016

[INFO] Final Memory: 3M/15M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:

deploy-file (default-cli) on project CCP_REST_SMS_SDK_JAVA: Failed to deploy art

ifacts: Could not transfer artifact com.cloopen:CCP_REST_SMS_SDK_JAVA:jar:v2.6.3

r from/to remote-repository (http://172.16.100.131:8081/nexus/content/groups/pub

lic/): Failed to transfer file: http://172.16.100.131:8081/nexus/content/groups/

public/com/cloopen/CCP_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.j

ar. Return code is: 401, ReasonPhrase:Unauthorized. -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE

xception

E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib>mvn deploy:deploy-file -

DgroupId=com.cloopen -DartifactId=CCP_REST_SMS_SDK_JAVA -Dversion=v2.6.3r -Dpack

aging=jar -Dfile=CCP_REST_SMS_SDK_JAVA_v2.6.3r.jar -Durl=http://172.16.100.131:8

081/nexus/content/groups/public/ -DrepositoryId=release

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building CCP_REST_SMS_SDK_JAVA v2.6.3r

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ CCP_REST_SMS_SDK_

JAVA ---

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.pom

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 2.434s

[INFO] Finished at: Fri Aug 26 15:01:21 CST 2016

[INFO] Final Memory: 3M/15M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:

deploy-file (default-cli) on project CCP_REST_SMS_SDK_JAVA: Failed to deploy art

ifacts: Could not transfer artifact com.cloopen:CCP_REST_SMS_SDK_JAVA:jar:v2.6.3

r from/to release (http://172.16.100.131:8081/nexus/content/groups/public/): Fai

led to transfer file: http://172.16.100.131:8081/nexus/content/groups/public/com

/cloopen/CCP_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar. Return

 code is: 400, ReasonPhrase:Bad Request. -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE

xception

E:\old_passform\jfinal_demo_for_jsp\WebRoot\WEB-INF\lib>mvn deploy:deploy-file -

DgroupId=com.cloopen -DartifactId=CCP_REST_SMS_SDK_JAVA -Dversion=v2.6.3r -Dpack

aging=jar -Dfile=CCP_REST_SMS_SDK_JAVA_v2.6.3r.jar -Durl=http://172.16.100.131:8

081/nexus/content/groups/public/ -DrepositoryId=nexus

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building CCP_REST_SMS_SDK_JAVA v2.6.3r

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ CCP_REST_SMS_SDK_

JAVA ---

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar

Uploading: http://172.16.100.131:8081/nexus/content/groups/public/com/cloopen/CC

P_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.pom

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 2.181s

[INFO] Finished at: Fri Aug 26 15:02:03 CST 2016

[INFO] Final Memory: 3M/15M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:

deploy-file (default-cli) on project CCP_REST_SMS_SDK_JAVA: Failed to deploy art

ifacts: Could not transfer artifact com.cloopen:CCP_REST_SMS_SDK_JAVA:jar:v2.6.3

r from/to nexus (http://172.16.100.131:8081/nexus/content/groups/public/): Faile

d to transfer file: http://172.16.100.131:8081/nexus/content/groups/public/com/c

loopen/CCP_REST_SMS_SDK_JAVA/v2.6.3r/CCP_REST_SMS_SDK_JAVA-v2.6.3r.jar. Return c

ode is: 401, ReasonPhrase:Unauthorized. -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE

xception


maven执行命令时提示:cached in the local repository,则表示本地缓存中已存在,需删除本地库中的依赖,删除后即可

参考资料:

解决maven执行命令时提示:cached in the local repository

maven命令deploy本地文件到私服  

maven deploy到nexus报错:Return code is: 401

 

maven release插件将一版本发布到仓库中时Return code is: 401, ReasonPhrase:Unauthorized

Maven 向私服nexus上传jar  





     本文转自 gaochaojs 51CTO博客,原文链接:http://blog.51cto.com/jncumter/1843834,如需转载请自行联系原作者


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值