Maven 手动添加 JAR 包到本地仓库
来源:互联网 发布:软件测试老是面试java 编辑:程序博客网 时间:2024/05/16 10:42
首先,
推荐几个好的 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/
第一个是我最常用的,然后是第二个,然后是第三个,最后两个是 Apache 的私有仓库,我还没用过,不过感觉应该还可以吧...
接下来,还是一贯的作风,使用截图通俗易懂的方式来解说:
如果你看过我的上一篇:Spring邮件服务之Html:Maven + Spring SMTP Mail With Html 文章,里面需要用到一个
spring-context-support-3.1.0.RELEASE.jar 的 JAR 包,我把它安装到本地仓库的时候把图截了下来,顺便写了这篇文章,
供有需要的网友参考。
首先,到 http://mvnrepository.com/ 这个网,在搜索栏中输入你要搜索的 JAR 包的关键字来搜索,下面直接贴图:
@1图
@2图
@3图
以 spring-context-support-3.1.0.RELEASE.jar 为例,在 @3图中已经给出这个 jar 包的 groupId,artifactId,version信息,
手动安装的时候这些信息不要改,否则 Maven 项目移植的话,jar 包下载就会失败。顺便把这信息帖下面,方便对照:
Maven 安装 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
回车,显示安装成功:
推荐几个好的 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/
第一个是我最常用的,然后是第二个,然后是第三个,最后两个是 Apache 的私有仓库,我还没用过,不过感觉应该还可以吧...
接下来,还是一贯的作风,使用截图通俗易懂的方式来解说:
如果你看过我的上一篇:Spring邮件服务之Html:Maven + Spring SMTP Mail With Html 文章,里面需要用到一个
spring-context-support-3.1.0.RELEASE.jar 的 JAR 包,我把它安装到本地仓库的时候把图截了下来,顺便写了这篇文章,
供有需要的网友参考。
首先,到 http://mvnrepository.com/ 这个网,在搜索栏中输入你要搜索的 JAR 包的关键字来搜索,下面直接贴图:
@1图
@2图
@3图
以 spring-context-support-3.1.0.RELEASE.jar 为例,在 @3图中已经给出这个 jar 包的 groupId,artifactId,version信息,
手动安装的时候这些信息不要改,否则 Maven 项目移植的话,jar 包下载就会失败。顺便把这信息帖下面,方便对照:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>3.1.0.RELEASE</version>
</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
回车,显示安装成功:
0 0
- maven手动添加本地jar包到本地仓库中
- Maven如何手动添加jar包到本地Maven仓库
- Maven如何手动添加jar包到本地Maven仓库
- Maven如何手动添加jar包到本地Maven仓库
- Maven如何手动添加jar包到本地Maven仓库
- Maven如何手动添加jar包到本地Maven仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- Maven 手动添加 JAR 包到本地仓库
- 初学java:Java面向对象与c语言面向过程的不同
- C++拷贝构造函数详解
- HDU1026 Ignatius and the Princess I 【BFS】+【路径记录】
- Linux性能统计 - iostat
- Discuz系统结构分析(一): MVC
- Maven 手动添加 JAR 包到本地仓库
- Sincpac C3D v3.7.5297 for Civil 3D 2014 and 2015 Win64 1CD
- 被废弃的dispatch_get_current_queue
- apache 设置 虚拟目录、别名目录
- ESI.ProCAST.2014.0.&.Visual-Environment.v9.6.Linux64 1DVD铸造模拟软件
- Android开发:实现带图片和checkbox的listview
- ITASCA FLAC2D.v5.0 1CD
- 图的广度优先遍历算法JAVA实现
- oracle转储