maven手动导入jar包到本地仓库,引用第三方jar


运行命令:

mvn install:install-file  -Dfile=jar包的路径  -DgroupId=gruopId中的内容  -DartifactId=actifactId的内容  -Dversion=version的内容  -Dpackaging=jar

1.cmd进入  

2.执行

mvn install:install-file -Dfile=E:\cloud_cms\mail-1.4.jar -DgroupId=javax.mail -DartifactId=mail -Dversion=1.4 -Dpackaging=jar
3.pom.xml 添加依赖
<dependency>
    <groupId>javax.mail</groupId>
    <artifactId>mail</artifactId>
    <version>1.4</version>
</dependency>

 

4.bulidpath后在pom.xml 添加第三方jar

<dependency>
     <groupId>com.amazonaws</groupId>
     <artifactId>aws-java-sdk-core</artifactId>
     <version>1.11.269</version>
     <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/lib/aws-java-sdk-core-1.11.269.jar</systemPath>
 </dependency>

 

 

 

相关链接:

https://www.jianshu.com/p/280c0f75a217


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM