安装jar到本地maven仓库命令时使用
mvn install:install-file -DgroupId=xxxx -DartifactId=xxxxx -Dversion=1.8 -Dpackaging=jar -Dfile=xxxx -DgeneratePom=true
在centos7的系统上会可能出现报错 The goal you specified requires a project to execute but there is no POM in this directory (xxxx). Please verify you invoked Maven from the correct directory.原因是因为操作系统的差异导致,把所有参数加上引号即可。
mvn install:install-file "-DgroupId=xxxx" "-DartifactId=xxx" "-Dversion=1.8" "-Dpackaging=jar" "-Dfile=xxx" "-DgeneratePom=true"
本文介绍在CentOS 7系统中,使用Maven命令将jar包安装到本地仓库时可能遇到的问题及解决办法。当出现找不到POM文件的错误时,可以通过在命令参数前添加引号的方式来解决。

2039

被折叠的 条评论
为什么被折叠?



