文章引用:
1 http://www.blogjava.net/fancydeepin/archive/2012/06/12/380605.html (Maven 手动添加 JAR 包到本地仓库)
2 http://www.yiibai.com/maven/include-library-manully-into-maven-local-repository.html (定制库到Maven本地资源库)
3 https://blog.csdn.net/w410589502/article/details/53895408
可以看到下面有关于maven的配置,给出这个 jar 包的 groupId,artifactId,version信息。这些信息是不需要我们去修改的。
<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.5.RELEASE</version>
</dependency>
Maven 安装 JAR 包的命令:
mvn install:install-file -Dfile=jar包的位置 -DgroupId=groupId -DartifactId=artifactId -Dversion=version -Dpackaging=jar
jar包的位置:就是我们通过maven库下载的jar包存放在本地的位置,例如:D:\Maven
groupId:就是maven的groupId信息,如上面的xml的
<groupId>
标签中的信息
artifactld:就是maven的artifactld信息,如上面的xml的
<artifactld>
标签中的信息
version:就是maven的version信息,如上面的xml的
<version>
标签中的信息