Jacob 需要JDk1.8
pom.xml
<dependency>
<groupId>com.jacob</groupId>
<artifactId>jacob</artifactId>
<version>1.18</version>
<scope>system</scope>
<systemPath>C:\Users\Lenovo\.m2\repository\jacob\jacob.jar</systemPath>
</dependency>
说明:<systemPath>这个路径在自己电脑写死后对自己有好处,如果SVN提交后其它后端同事会报错(把这个jacob.jar给后端同事也行),为了解决这个问题请继续往下阅读。
如果pom.xml 里面添加jacob依赖后,jar从Maven远程仓库下载本地仓库并没有,解决方案如下(亲自测试过):
亲自测试后感觉这个路径最佳(cmd输入命令):这个复制
mvn install:install-file -Dfile=C:\\Users\\Lenovo\\.m2\\repository\\jacob.jar -DgroupId=com.jacob -DartifactId=jacob -Dversion=1.18 -Dpackaging=jar
参数说明:
-Dfile:需安装的jar路径 --> jacob.jar这个一定要存在
-DgroupId:组名 --> 对应 groupId
-DartifactId:包名 --> 对应 artifactId
-Dversion:版本 --> 对应 version(版本自己定义)
-Dpackaging:安装文件类型 --> jar
留言与评论(共有 0 条评论) |