如何将 javadoc 添加到 Hudson 上的 Maven 构建中
我正在使用 Hudson 1.389 和 Maven 2,并生成 javadocs 作为我构建的一部分。 Javadoc 生成到:target/apidocs。 但是,Hudson 项目页面(或模块页面)没有指向它们的链接。
我的项目是一个多模块 Maven 项目,但 javadoc 仅为一个模块生成。在该模块的 pom.xml 中,我添加了以下内容:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</reporting>
我将不胜感激。 谢谢,
I am using Hudson 1.389 and Maven 2, and am generating javadocs as part of my build.
Javadocs are generated to: target/apidocs.
However, there is no link to them from the Hudson project page (or the module page).
My project is a multi-module Maven project, but the javadocs are only generated for one module. In that module's pom.xml, I have added this:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</reporting>
I'd appreciate any help.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只是想添加一些可能对其他人有帮助的花絮...
javadoc:javadoc
。Just want to add some tidbits that may help others...
javadoc:javadoc
.在 hudson 作业配置中查找
Publish javadocs
复选框。Look for the
Publish javadocs
checkbox in the hudson job configuration.我只需运行安装目标,然后运行 javadoc 目标,然后 Hudson 会自动选择它。
注意:javadoc 链接仅单独出现在作业页面上。
I just had to run the install target and then the javadoc target, then Hudson picked it up automagically.
Note: the javadoc link only appeared by itself on the job page.