【发布时间】:2015-10-08 09:46:12
【问题描述】:
我正在尝试将本地 jar 安装到我的 maven 项目中,我正在从我的项目文件夹中运行此命令:
mvn install:install-file -Dfile= ~/Downloads/<jar_path> -DgroupId=<groupId> -DartifactId=<artifactId> -Dversion=<version> -Dpackaging=jar -DgeneratePom=false
我收到了这个错误:
Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project my-project: Error installing artifact 'my-artifact': Failed to install artifact groupId:artifactId:jar:version: /Users/my-project-path (Is a directory) -> [Help 1]
【问题讨论】:
-
您是否尝试放置确切的 jar 文件而不是项目的路径?
-
你试过设置
-DlocalRepositoryPath吗? -
谢谢你们的回答,但这是-Dfile=之后的空格
标签: java maven jakarta-ee maven-plugin maven-install-plugin