您的位置:首页 > 其它

转 Maven常用仓库地址以及手动添加jar包到仓库

2016-12-21 18:29 204 查看

转自:http://blog.csdn.net/kqygww/article/details/12837783

共有的仓库

http://repository.sonatype.org/content/groups/public/
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/acegisecurity/http://mvnrepository.com/ http://search.maven.org/

私有的仓库

http://repository.codehaus.org/
http://snapshots.repository.codehaus.org/ http://people.apache.org/repo/m2-snapshot-repository http://people.apache.org/repo/m2-incubating-repository/

手动添加jar包到仓库

@1图

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-context-support</artifactId>

<version>3.1.0.RELEASE</version>

</dependency>

Maven 安装 JAR 包的命令是:

mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar

例如:

我下载的这个 jar 包是放到了 D:\mvn 目录下(D:\mvn\spring-context-support-3.1.0.RELEASE.jar)

那么我在 cmd 中敲入的命令就应该是:

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

回车,显示安装成功:



转载自:http://www.blogjava.NET/fancydeepin
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: