Ayo*_*oub 2 java maven-plugin maven maven-install-plugin jakarta-ee
我正在尝试将本地 jar 安装到我的 Maven 项目中,我正在从我的项目文件夹运行此命令:
mvn install:install-file -Dfile= ~/Downloads/<jar_path> -DgroupId=<groupId> -DartifactId=<artifactId> -Dversion=<version> -Dpackaging=jar -DgeneratePom=false
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
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]
Run Code Online (Sandbox Code Playgroud)
你的命令中,后面有一个空格-Dfile=!
mvn install:install-file -Dfile= ~/Downloads/<jar_path> -DgroupId=<groupId> -DartifactId=<artifactId> -Dversion=<version> -Dpackaging=jar -DgeneratePom=false
Run Code Online (Sandbox Code Playgroud)
尝试
mvn install:install-file -Dfile=~/Downloads/<jar_path> -DgroupId=<groupId> -DartifactId=<artifactId> -Dversion=<version> -Dpackaging=jar -DgeneratePom=false
Run Code Online (Sandbox Code Playgroud)