1、问题
pom.xml中报Missing artifact
2、解决:
(1) 在pom.xml中添加如下依赖:
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.2.5</version>
<type>jar</type>
<scope>system</scope>
<systemPath>[绝对路径]\\mybatis-3.2.5.jar</systemPath>
</dependency>
注:已验证。
(2)也可以在本地仓库中手动安装tools.jar,如下
mvn install:install-file -Dfile=d:\libs\mybatis-3.2.5.jar -DgroupId=org.apache -DartifactId=mybatis -Dversion=3.2.5 -Dpackaging=jar
D:\maven\maven3\bin>mvn install:install-file -Dfile=E:\libs\mybatis-3.2.5.jar -DgroupId=org.apache -DartifactId=mybatis -Dv
ersion=3.2.5 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom
---
[INFO] Installing E:\libs\mybatis-3.2.5.jar to C:\Use
rs\NR\.m2\repository\org\apache\mybatis\3.2.5\mybatis-3.2.5.jar
[INFO] Installing C:\Users\tester\AppData\Local\Temp\mvninstall2016778699061755969.p
om to C:\Users\tester\.m2\repository\org\apache\mybatis\3.2.5\mybatis-3.2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.595s
[INFO] Finished at: Thu Jul 28 11:31:33 CST 2016
[INFO] Final Memory: 2M/5M
[INFO] ------------------------------------------------------------------------
然后在pom.xml中添加:
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.2.5</version>
</dependency>