【问题标题】:in powershell mvn install command在 powershell mvn install 命令中
【发布时间】:2020-11-05 07:56:30
【问题描述】:
我遇到了 mvn:install 命令,它在 windows 操作系统的命令行界面上运行良好,但在 PowerShell 界面中却不起作用。
c:\mvn install:install-file -Dfile=C\example.jar -DgroupId=com.libs -DartifactId=example -Dversion=1.0.0 -Dpackaging=jar
您可以这样做。
【问题讨论】:
标签:
powershell
maven
command-line
jar
【解决方案1】:
你需要在-D标签前后加一个逗号(")。
这是一个命令行示例
c:\mvn install:install-file -Dfile=C:\example.jar -DgroupId=com.libs -DartifactId=example -Dversion=1.0.0 -Dpackaging=jar
用于 Powershell
ps c:\mvn install:install-file "-Dfile=$path\example.jar" "-DgroupId=com.libs" "-DartifactId=example" "-Dversion=1.0.0" "-Dpackaging=jar"