微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决在当前项目和插件组[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 举报,一经查实,本站将立刻删除。