我有一个Java多模块Maven项目,我想构建一个MVN站点和javadocs,并让CruiseControl将最新的每日构建发布到配置的静态位置。
问题是CruiseControl artifactPublisher允许您指定dest目录,但它的时间戳记为最后一次构建的最新时间。我希望能够发布到在每个构建上被覆盖的位置,例如:
http://cc-buildserver/cruisecontrol/artifacts/gameplatform-documentation/
artifactPublisher documentation
dir - 将从中复制所有文件 目录
dest - 实际的父目录 目的地目录;实际 目标目录名称将是 构建时间戳。
子目录 - 子目录下的唯一 (timestamp)要包含的目录 工件
例如,如果我有一个名为gameplatform-documentation
的CruiseControl项目,并且我将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并创建另一个Web服务器来托管已发布的文档。我还可以使用CC源代码控制工具并将文档签入我们的SVN服务器并使用它来提供文档。
如何实现这一目标?
答案 0 :(得分:1)
我们最终使用Maven的site deploy plugin通过SCP(在Windows服务器上使用cygwin SSHD服务器设置)将文档工件发布到我们的CruiseControl服务器的“artifact”文件夹中:
<distributionManagement>
<site>
<id>dev.website</id>
<url>scp://user@buildserver/cygdrive/c/Users/user/servers/cruisecontrol-project-2.8.3/artifacts/documentation/project/gameplatform</url>
</site>
</distributionManagement>
然后我们可以访问:
来访问每晚构建的文档http://buildserver:8081/cruisecontrol/artifacts/documentation/project/gameplatform