maven加载本地库
2015-12-29 17:02
381 查看
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>1.1.1</version>
<scope>system</scope>
<!--本地jar的路径,相对或者绝对都可以-->
<systemPath>path/to/yourLocalJar.jar</systemPath>
</dependency>
方式二:
把它添加到maven本地仓库,操作如下:
1、建立一个新的文件夹,将jar文件存放在该文件夹下。 注意文件夹下最好只存放该文件。
2、在该文件夹下建立一个pom.xml文件,在pom文件中定义其maven坐标。
3、在cmd窗口中执行以下命令:
mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
例如:mvn install:install-file -Dfile=D:/xxx.jar -DgroupId=xxx.xxx -DartifactId=xxx -Dversion=x.x -Dpackaging=jar
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>1.1.1</version>
<scope>system</scope>
<!--本地jar的路径,相对或者绝对都可以-->
<systemPath>path/to/yourLocalJar.jar</systemPath>
</dependency>
方式二:
把它添加到maven本地仓库,操作如下:
1、建立一个新的文件夹,将jar文件存放在该文件夹下。 注意文件夹下最好只存放该文件。
2、在该文件夹下建立一个pom.xml文件,在pom文件中定义其maven坐标。
3、在cmd窗口中执行以下命令:
mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
例如:mvn install:install-file -Dfile=D:/xxx.jar -DgroupId=xxx.xxx -DartifactId=xxx -Dversion=x.x -Dpackaging=jar
相关文章推荐
- 常见Linux目录名称
- libsvm3.21在MATLAB2014a的安装应用之一:安装
- 用Matlab实现字符串分割(split)
- 写在前面的话
- Zoho CRM助保险公司可靠管理商机
- oc 知识总结四 (NSSet、NSMutableSet)
- Java访问共享目录(samba和NFS配置及实现)
- 计算几何参考模板
- ------第二节-----------------第二讲----单链表的基本操作---------
- for-switch-continue的嵌套使用问题。
- POJ 2393 Yogurt factory(贪心)
- freerdp linux下连接windows远程终端工具
- 坑爹的ubuntu,自带的firefox浏览器居然只能以root权限使用。
- spring mvc 前台向后台传递参数方法总结
- 使用Shield保护ElasticSearch平台--兼权限控制
- 车道偏离之透视变换
- GCD 信号量控制并发 (dispatch_semaphore)
- 查找算法之哈希表
- java.net.SocketException: Software caused connection abort: socket write error
- day①:集合