我有一个 Java 多模块 Maven 项目,我想构建一个 MVN 站点和 javadocs,并让 CruiseControl 将最新的每日构建发布到配置的静态位置。
问题是 CruiseControl artifactPublisher允许您指定 dest 目录,但它带有最后一次构建的最新时间的时间戳。我希望能够发布到在每次构建时都会被覆盖的位置,例如:
http://cc-buildserver/cruisecontrol/artifacts/gameplatform-documentation/
dir - 将复制此目录中的所有文件
dest - 实际目标目录的父目录;实际目标目录名称将是构建时间戳。
子目录 - 包含工件的唯一(时间戳)目录下的子目录
例如,如果我有一个名为 CruiseControl 的项目gameplatform-documentation
,并且我将我的 artifactPublisher 配置为:
<project name="gameplatform-documentation" forceOnly="true" requireModification="false" forceBuildNewProject="false" buildafterfailed="false">
...
<schedule>
<composite time="2300">
<maven2
mvnhome="${mvn.home}"
pomfile="${dev.root}/gameplatform-parent/pom.xml"
goal="site" />
</composite>
</schedule>
<publishers>
<artifactspublisher
dir="${dev.root}/gameplatform-parent/target/site"
dest="artifacts/gameplatform-documentation" />
</publishers>
</project>
我最终将我的 Maven 生成的站点和 javadocs 放在每个构建的不同目录中:
http://cc-buildserver/cruisecontrol/cruisecontrol/artifacts/gameplatform-documentation/20091110130202/
也许我需要使用自定义 AntPublisher 或 FTPPublisher 并创建另一个网络服务器来托管已发布的文档。我还可以使用 CC 源代码控制工具并将文档签入到我们的 SVN 服务器并使用它来提供文档。
如何实现?