在当前项目和插件组[org.apache.maven.plugins,org.codehaus.mojo]中找不到前缀为'?Dfile = C'的插件

问题描述

我正在尝试在Windows 8.1中使用cmd将自定义jar安装到我的Maven本地存储库中。

mvn -X install:install-file – Dfile="C:../Desktop/custom.jar" -DgroupId=dave.maven_csafasfaf -DartifactId=add-custom-jar -Dversion=1.0 -Dpackaging=jar

但出现此错误。而且我对Maven还是很陌生,因此希望得到一个简化的答案。

C:\Users\Flying Dutchman\Desktop\tempWorkSpace\add-custom-jar>mvn install:install-file –Dfile=C:/Users/Flying Dutchman/Desktop/custom.jar -DgroupId=da
ve.maven_csafasfaf -DartifactId=add-custom-jar -Dversion=1.0
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.3.3.RELEASE/spring-boot-maven-plugi
n-2.3.3.RELEASE.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.3.3.RELEASE/spring-boot-maven-plugin
-2.3.3.RELEASE.pom (2.9 kB at 2.5 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.3.3.RELEASE/spring-boot-maven-plugi
n-2.3.3.RELEASE.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.3.3.RELEASE/spring-boot-maven-plugin
-2.3.3.RELEASE.jar (93 kB at 120 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-Metadata.xml
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-Metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-Metadata.xml (14 kB at 40 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-Metadata.xml (20 kB at 23 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.750 s
[INFO] Finished at: 2020-08-28T02:58:08+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix '?Dfile=C' in the current project and in the plugin groups [org.apache.maven.plugins,org.codehaus.mojo] available
from the repositories [local (C:\Users\Flying Dutchman\.m2\repository),central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors,re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/nopluginFoundForPrefixException

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)