本地jar包导入maven项目

将jar包导入本地maven仓库的方法

首先需要在pom.xml中添加依赖:

<dependency>  
    <groupId>org.springframework</groupId>  
    <artifactId>spring-core</artifactId>  
    <version>4.2.3.RELEASE</version>  
</dependency> 
然后执行maven安装jar包的命令

mvn install:install-file -Dfile=jar包在你电脑中的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar
命令中尽量不要出现中文,避免安装失败。

猜你喜欢

转载自blog.csdn.net/ontheway0101/article/details/79018290