我有一個Java多模塊Maven項目,我想構建一個MVN站點和javadocs並讓CruiseControl將最新的每日構建發佈到配置的靜態位置。如何將CruiseControl最新構建工件發佈到靜態URL
麻煩的是CruiseControl artifactPublisher允許您指定一個dest目錄,但它是用最後一次構建的最新時間標記的。我希望能夠發佈到大幹快上每個構建覆蓋的位置,如:
http://cc-buildserver/cruisecontrol/artifacts/gameplatform-documentation/
artifactPublisher 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,並創建另一個Web服務器來託管發佈的文檔。我也可以使用CC源代碼控制工具,並將文檔簽入我們的SVN服務器並使用它來提供文檔。
這是如何實現的?