0

我有一个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服务器并使用它来提供文档。

这是如何实现的?

回答

1

我们结束了使用Maven的site deploy plugin公布通过SCP的文件文物(使用Windows服务器上的Cygwin SSHD服务器设置),将我们的CruiseControl的服务器的“神器”的文件夹:

<distributionManagement> 
    <site> 
     <id>dev.website</id> 
     <url>scp://[email protected]/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