maven-javadoc-plugin打破了mvn release:perform [英] maven-javadoc-plugin breaks mvn release:perform
问题描述
我正在尝试执行 mvn release:执行
对我过去发布到Nexus服务器很多次的三个项目。突然今天,由于没有明显的原因,所有版本都无法执行目标 org.apache.maven.plugins:maven-javadoc-plugin:2.10:jar(attach-javadocs)
。
I'm trying to execute mvn release:perform
on three projects that I have released to our Nexus server many times in the past. Suddenly today, for no apparent reason, all releases are failing to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10:jar (attach-javadocs)
.
启用完整堆栈跟踪和调试日志记录( -e
和 -X
),我看到有关丢失包裹的几百行错误:
With full stack tracing and debug logging turned on (-e
and -X
), I see several hundred lines of errors about missing packages:
...
package org.apache.http does not exist
package org.slf4j does not exist
package org.joda.time does not exist
...
但是,所有这些软件包都在我的本地存储库和Nexus服务器中。此外,我没有从 mvn clean install
中获得任何这些错误,并且所有项目(Java Web应用程序)实际上都是从Intellij启动而没有问题 - 所以很清楚我是实际上并没有丢失数百个软件包。
However, all of these packages are in both my local repository and Nexus server. Moreover, I don't get any of these errors from mvn clean install
, and all the projects (Java web apps) actually launch from Intellij without issues—so clearly I'm not actually missing hundreds of packages.
什么可能阻止 mvn发布:执行
从<$找到这些软件包时c $ c> mvn clean install 和 mvn release:prepare
没有任何问题?
What could be preventing mvn release:perform
from finding these packages when mvn clean install
and mvn release:prepare
don't have any problems?
推荐答案
似乎有一系列关于更新 maven-javadoc-plugin
的问题。请参见 http://jira.codehaus.org/browse/MJAVADOC-408 。
There seems to be a cascade of issues regarding update to maven-javadoc-plugin
. See http://jira.codehaus.org/browse/MJAVADOC-408.
如果没有另外指定,我可以看到使用最新版本的内置插件的一些好处 mvn
与给定Maven版本的固定版本相比,但这意味着插件维护者必须在插件发布时针对每个版本的Maven进行回归测试。也许错过了一些东西。
I can see some benefit in having mvn
use the latest versions of "built-in" plugins if not otherwise specified (vs. a "pinned version" for a given Maven version), but it means plug-in maintainers are obliged to do regression testing against every version of Maven upon a plugin release. Maybe something was missed.
一种解决方法是明确指定以前版本的 maven-javadoc-plugin
in您的组织的超级POM,或者项目POM,如果不能快速更改超级POM:
One workaround would be to explicitly specify the previous version of maven-javadoc-plugin
in your organization's super POM, or alternatively, the project POM if it's not possible to change the super POM in a hurry:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
</plugin>
</plugins>
</pluginManagement>
我们的CI装备(Jenkins)今天遇到了同样的问题。希望新的 maven-javadoc-plugin
将被推送,并更新它的依赖树(如果这确实是问题)。 FWIW,我们在3.0.5(是的,由于各种原因而感到悲伤)。
Our CI rig (Jenkins) hit the same problem today. Hopefully a new maven-javadoc-plugin
will get pushed with it's dependency tree updated (if that is indeed the issue). FWIW, we were on 3.0.5 (ya, sad for a variety of reasons).
整个hubub似乎源于<$ h $ => https://bugzilla.redhat的 maven-javadoc-plugin
维护者的响应。 com / show_bug.cgi?id = 1113877rel =noreferrer>尚未结束的问题在 java-1.8.0-openjdk
中 MJAVADOC-398 。我不知道为什么有人会为未解决的下游项目缺陷发布突破性的解决办法。
This whole hubub seems to have originated in the response of maven-javadoc-plugin
maintainers to an yet-to-be-closed issue in java-1.8.0-openjdk
in MJAVADOC-398. I have no idea why anyone would release a breaking work-around for a unresolved downstream project defect.
MJAVADOC-406 已经解决,并且 2.10.1
Maven Central中可用的 maven-javadoc-plugin
版本,可能还有很多靠近你的存储库。
MJAVADOC-406 has been resolved and there is a 2.10.1
version of maven-javadoc-plugin
available in Maven Central and likely many repositories near you.
使用未固定的javadoc插件版本构建应立即恢复正常。
Builds with un-pinned javadoc plugin version should be returning to normal now.
Maven-folk,你已被警告过。锁定插件依赖项,因为它们可能会变得流氓。
Maven-folk, you have been warned. Lock down your plug-in dependencies because they could go rogue.
PS, MJAVADOC-408 已作为 MJAVADOC-的副本关闭407 。
这篇关于maven-javadoc-plugin打破了mvn release:perform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!