maven仓库引入外部jar包

it2022-05-05  96

打开cmd.exe(win+R,输入cmd。注意:不能在资源管理器右键打开powershell操作,会报错),输入以下指令: 【Dfile=jar包文件路径】

mvn install:install-file -Dfile=C:\Users\dengz\.m2\repository\outer\outer-sdk-1.0.0.jar -DgroupId=com.oos -DartifactId=oos-sdk -Dversion=6.1.0 -Dpackaging=jar

然后就可以在pom.xml文件中引入jar包:

<dependency> <groupId>com.oos</groupId> <artifactId>outer-sdk</artifactId> <version>1.0.0</version> </dependency>

最新回复(0)