发布本地(sap hana)Jar包到Maven私有仓库

在控制台执行如下命令:

bash 复制代码
mvn deploy:deploy-file -DgroupId="com.sap.cloud.db.jdbc" -DartifactId="ngdbc" -Dversion="2.0.13" -Dpackaging="jar" -Dfile="F:\sap_ngdbc\ngdbc-2.0.13.jar" -DrepositoryId="releases" -Durl="http://x-repo.corp.net/repository/maven-releases" -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

-Dfile:需要推送的jar包路径

DgroupId: 指定jar包的分组id

DartifactId:指定jar包的组件id

Dversion:指定jar包所属版本号(如果推送到快照SNAPSHOT版本,则版本命名必须以-SNAPSHOT结尾,否则拉取时会去release正式版本仓库中拉取)

-DrepositoryId:指定你需要推送的仓库id和setting中对应

-Durl:指定你需要推送仓库id的地址

-Dmaven.wagon.http.ssl.allowall和

-Dmaven.wagon.http.ssl.insecure:如果不加可能抛出异常

出现异常及解决方法:

Cannot deploy artifact from the local repository

错误原因:

要推送的jar和pom是位于本地repository的目录下。

解决方法:

把要推送的jar和pom移动到其他目录,就可以操作了。

相关推荐
wjjzhbb1 天前
中小团队敏捷转型:Scrum还是看板?
java·maven·scrum
XS0301062 天前
【无标题】
java·tomcat·maven·intellij-idea
卓怡学长3 天前
w176基于SpringBoot的医院管理系统
java·spring boot·spring·maven·intellij-idea
han_hanker4 天前
新手公司项目实战
java·maven
LINgZone24 天前
Maven多模块依赖管理与私有JAR包策略
java·maven·jar
MetaLite4 天前
SpringBoot项目Maven-BOM统一版本就不会冲突吗
spring boot·后端·maven
Linux-lucky5 天前
28-Linux学习之旅之Maven与Nexus制品库
linux·运维·学习·nginx·tomcat·maven
yurenpai(27届找实习中)5 天前
从零读懂AI智能客服(二):Java 多模块项目如何协作:Maven 依赖、Spring 注入与运行时装配
java·spring·maven
deng12045 天前
Maven多模块父子工程与IDEA导入异常排查记录
人工智能·maven·intellij-idea