1.推荐几个好的 Maven 常用仓库网址:
http://mvnrepository.com/
http://search.maven.org/
http://repository.sonatype.org/content/groups/public/
http://people.apache.org/repo/m2-snapshot-repository/
http://people.apache.org/repo/m2-incubating-repository/

 

2.搜索jar文件,并下载

以 spring-context-support-3.1.0.RELEASE.jar 为例,在 @3图中已经给出这个 jar 包的 groupId,artifactId,version信息,
手动安装的时候这些信息不要改,否则 Maven 项目移植的话,jar 包下载就会失败。顺便把这信息帖下面,方便对照:

maven local responsitory 手工新增jar<dependency>
maven local responsitory 手工新增jar    <groupId>org.springframework</groupId>
maven local responsitory 手工新增jar    <artifactId>spring-context-support</artifactId>
maven local responsitory 手工新增jar    <version>3.1.0.RELEASE</version>
maven local responsitory 手工新增jar</dependency>


Maven 安装 JAR 包的命令是:

maven local responsitory 手工新增jarmvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar
 

mvn install:install-file -Dfile=D:\mvn\spring-context-support-3.1.0.RELEASE.jar -DgroupId=org.springframework -DartifactId=spring-context-support -Dversion=3.1.0.RELEASE -Dpackaging=jar
 
3.重新更新local repository 的rebuild index
 
4   https://my.oschina.net/sunchp/blog/100634  mirror 和resposity区别
 

相关文章:

  • 2022-02-20
  • 2022-02-15
  • 2022-12-23
  • 2021-07-19
  • 2022-03-09
  • 2021-11-30
  • 2021-07-31
猜你喜欢
  • 2021-09-07
  • 2022-01-20
  • 2021-08-14
  • 2022-01-10
  • 2021-08-14
相关资源
相似解决方案