MAVEN 资源库 如何安装本地jar包



1.进入存放jar目录,执行命令,安装jar

mvn install:install-file -Dfile=SourceCodeConstraint-1.0-SNAPSHOT.jar -DgroupId=com.yss.platform.tools -DartifactId=SourceCodeConstraint -Dversion=1.0-RELEASE -Dpackaging=jar

-DgroupId 和 -DartifactId 这两个参数与pom.xml中配置的内容相同.
 

2. pom.xml 添加依赖

<dependency>
    <groupId>com.henghe.platform.tools</groupId>
    <artifactId>SourceCodeConstraint</artifactId>
    <version>1.0-RELEASE</version>
</dependency>

发布了336 篇原创文章 · 获赞 846 · 访问量 41万+

猜你喜欢

转载自blog.csdn.net/zhanglong_4444/article/details/105478502