Maven 外部包打包进本地仓库:
直接记录命令:
mvn install:install-file -Dmaven.repo.local=D:\respository -DgroupId=com.sg.jdbc -DartifactId=sgjdbc -Dversion=1.0.0 -Dfile=D:\Desktop\sgjdbc-1.0.0.jar -Dpackaging=jar
修改位置:
-Dmaven.repo.local=“指定仓库地址”
-Dfile=“当前文件位置”
-DgroupId=
-DartifactId=
-Dversion=
pom使用:
<dependency>
<groupId>com.sg.jdbc</groupId>
<artifactId>sgjdbc</artifactId>
<version>1.0.0</version>
</dependency>
本文详细介绍了如何使用Maven的install-file命令将外部jar包安装到本地仓库,并提供了在pom.xml中添加依赖的示例。
3954

被折叠的 条评论
为什么被折叠?



