maven - mvnw 令人困惑的错误消息 NoPluginFoundForPrefixException
问题描述
为什么:
./mvnw -X versions:set -DnewVersion=${VERSION_TO_DEPLOY}
给出这个错误:
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'C' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\tools\mvnrepo), nexus (https://nexus.corporate.net/repository/maven-public/)]
Maven指向错误文档
但这也无济于事。
解决方案
在一些跟踪(在 mvnw 中设置 -x)的帮助下,似乎 mvnw 在我们的构建服务器上使用了环境变量 $MAVEN_CONFIG,它恰好也被其他软件用于不同的目的。
感谢这个错误报告,它开始变得有意义
如果这恰好指向一个本地 Windows 文件(前面没有 -config),maven 将尝试将其解析为插件:
C:\tools\apache-maven-2.2.1\conf\settings.xml
推荐阅读
- xamarin - MvvmCross 6.4.1 不能用 Xamarin 的 PCL 项目更新
- kotlin - 在 Kotlin 文档 (KDoc) 中,是否可以链接到特定的重载方法?
- python - 如何从 Python 中的 aa 列表的不同列表中添加元组的数量?
- wxpython - wxPython 和 win32gui 匹配打开窗口的大小/位置不准确
- javascript - 如何在单击时切换两个菜单项并在切换下一个时关闭上一个?
- c# - 为什么用 C# 创建的 Windows 服务无法检测到当前正在运行的屏幕保护程序?
- javascript - 电子邮件正文中的多行文本
- java - 正在附加 Spring Boot URL
- mysql - 无法销毁rails中某些模型的记录
- swift - 快速编程核心数据fetchedResultsController.sections nil错误