本文共 751 字,大约阅读时间需要 2 分钟。
mvn \ deploy:deploy-file -DgroupId=nlu.engine.serviceinvoker \ -DartifactId=nlu-engine-serviceinvoker \ -Dversion=0.2 \ -Dpackaging=jar \ -Dfile=nlu-engine-serviceinvoker.jar \ -DrepositoryId=analysis \ -Durl=http://p:port/nexus/content/repositories/analysis/
mvn \ deploy:deploy-file(固定) \ -DgroupId=根据项目确定group ID \ -DartifactId=根据自己的项目确定artifactid \ -Dversion=发布的版本号 \ -Dpackaging=发布的类型如果是jar包的话选择jar \ -Dfile=本地jar包的名称 \ -DrepositoryId=maven的setting.xml中server id\ -Durl=远程仓库的路径
其中DrepositoryId 为maven的setting.xml中配置server信息中的id
如果id为改为的其他名字,DrepositoryId 也需要改成对应的名字,这个跟pom中的引用方式是一样的,如下 如果这个地方填错了,会报 Return code is: 401, ReasonPhrase: Unauthorized. 其次,在上传jar包到仓库的时候,一定记得在maven的setting.xml中配置server信息的认证信息。转载地址:http://lfktn.baihongyu.com/