有些jar在Maven的repository上找不到,必须要自己加,用这个命令
mvn clean install:install-file -Dfile=/Users/admin/Downloads/ghost4j-0/ghost4j-0.4.5.jar -DpomFile=/Users/admin/Downloads/ghost4j-0/ghost4j.pom
你就会看到这些log出现
Installing /Users/admin/Downloads/ghost4j-0/ghost4j-0.4.5.jar to /Users/admin/.m2/repository/ghost4j/ghost4j/0.4.5/ghost4j-0.4.5.jar
[INFO] Installing /Users/admin/Downloads/ghost4j-0/ghost4j.pom to /Users/admin/.m2/repository/ghost4j/ghost4j/0.4.5/ghost4j-0.4.5.pom
这样你就可以在你的project里的pom.xml里加上
<dependency>
<groupId>ghost4j</groupId>
<artifactId>ghost4j</artifactId>
<version>0.4.5</version>
</dependency>
哈哈,真好用呀。。。。