maven 安装第三方jar到本地 出现 The goal you specified requires a project to execute but there is no POM in this directory 错误

原因是因为操作系统的差异导致,把所有参数加上引号即可。

如下所示:

mvn install:install-file "-Dfile=cobra.jar" "-DgroupId=com.cobra" "-DartifactId=cobra" "-Dversion=0.98.4" "-Dpackaging=jar" "-DgeneratePom=true"

 

详见http://stackoverflow.com/questions/6704813/maven-generating-pom-file/11199865#11199865

posted @ 2016-07-15 16:37  demonrain  阅读(5592)  评论(0编辑  收藏  举报