gpt4 book ai didi

java - 使用cmd命令在maven中本地安装jar

转载 作者:行者123 更新时间:2023-11-30 07:22:07 28 4
gpt4 key购买 nike

我尝试使用CMD命令在netbeans的maven项目中本地安装jar文件

根据这个例子:

mvn install:install-file -Dfile=<path-to-file> \
-DgroupId=<group-id> -DartifactId=<artifact-id> \
-Dversion=<version> -Dpackaging=<packaging>

来自here

我运行这个命令

mvn install:install-file -Dfile=C:\opt\glassfish4\glassfish\domains\domain1\applications\myapplication\files\rrunner_jar\Ropt.jar \ -DgroupId=acaller -DartifactId=ACaller \ -Dversion=1.4 -Dpackaging=jar

在cd路径C:/Users/Alia

但我收到此错误

'mvn' is not recognized as an internal or external command,
operable program or batch file.

如何才能正确运行它?

最佳答案

这意味着 Windows 无法找到 mvn 可执行文件,因为它不在您的路径上。请确保maven安装正确。这是一个教程,其中包括有关设置 Maven 路径的部分。

http://www.mkyong.com/maven/how-to-install-maven-in-windows/

关于java - 使用cmd命令在maven中本地安装jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37383241/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com