安装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" 
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐