<cruisecontrol> <!-- xxx--> <project name="xxx"> <listeners> <currentbuildstatuslistener file="logs/${project.name}/status.txt" /> </listeners> <bootstrappers> <svnbootstrapper localWorkingCopy="projects/${project.name}" /> </bootstrappers> <modificationset quietperiod="60"> <svn localWorkingCopy="projects/${project.name}" /> </modificationset> <schedule interval="300"> <maven2 mvnhome="/usr/share/maven2" pomfile="projects/${project.name}/pom.xml" goal="clean package sonar:sonar" /> </schedule> <log> <merge dir="projects/${project.name}/target"/> <merge dir="projects/${project.name}/target/site"/> <merge dir="projects/${project.name}/target/test-results"/> <merge file="projects/${project.name}/target/checkstyle-result.xml"/> <merge file="projects/${project.name}/target/pmd.xml"/> <merge file="projects/${project.name}/target/findbugsXml.xml"/> <merge file="projects/${project.name}/target/jdepend-report.xml"/> <merge file="projects/${project.name}/target/javancss-raw-report.xml"/> </log> <publishers> <onsuccess> <artifactspublisher dir="projects/${project.name}/target" dest="artifacts/${project.name}" /> </onsuccess> </publishers> </project> <!-- xxx--> <project name="xxx"> <listeners> <currentbuildstatuslistener file="logs/${project.name}/status.txt" /> </listeners> <bootstrappers> <svnbootstrapper localWorkingCopy="projects/${project.name}" /> </bootstrappers> <modificationset quietperiod="60"> <svn localWorkingCopy="projects/${project.name}" /> </modificationset> <schedule interval="300"> <maven2 mvnhome="/usr/share/maven2" pomfile="projects/${project.name}/pom.xml" goal="clean package sonar:sonar" /> </schedule> <log> <merge dir="projects/${project.name}/target"/> <merge dir="projects/${project.name}/target/site"/> <merge dir="projects/${project.name}/target/test-results"/> <merge file="projects/${project.name}/target/checkstyle-result.xml"/> <merge file="projects/${project.name}/target/pmd.xml"/> <merge file="projects/${project.name}/target/findbugsXml.xml"/> <merge file="projects/${project.name}/target/jdepend-report.xml"/> <merge file="projects/${project.name}/target/javancss-raw-report.xml"/> </log> <publishers> <onsuccess> <artifactspublisher dir="projects/${project.name}/target" dest="artifacts/${project.name}" /> </onsuccess> </publishers> </project> <!--xxx--> <project name="xxx"> <listeners> <currentbuildstatuslistener file="logs/${project.name}/status.txt" /> </listeners> <bootstrappers> <svnbootstrapper localWorkingCopy="projects/${project.name}" /> </bootstrappers> <modificationset quietperiod="60"> <svn localWorkingCopy="projects/${project.name}" /> </modificationset> <schedule interval="300"> <maven2 mvnhome="/usr/share/maven2" pomfile="projects/${project.name}/pom.xml" goal="clean package sonar:sonar" /> </schedule> <log> <merge dir="projects/${project.name}/target"/> <merge dir="projects/${project.name}/target/site"/> <merge dir="projects/${project.name}/target/test-results"/> <merge file="projects/${project.name}/target/checkstyle-result.xml"/> <merge file="projects/${project.name}/target/pmd.xml"/> <merge file="projects/${project.name}/target/findbugsXml.xml"/> <merge file="projects/${project.name}/target/jdepend-report.xml"/> <merge file="projects/${project.name}/target/javancss-raw-report.xml"/> </log> <publishers> <onsuccess> <artifactspublisher dir="projects/${project.name}/target" dest="artifacts/${project.name}" /> </onsuccess> </publishers> </project> <!--xxx--> <!--<project name="xxx"> <listeners> <currentbuildstatuslistener file="logs/${project.name}/status.txt"/> </listeners> <bootstrappers> <antbootstrapper anthome="/usr/share/ant" buildfile="projects/${project.name}/build.xml" target="clean test" /> </bootstrappers> <modificationset quietperiod="30"> <filesystem folder="projects/${project.name}"/> </modificationset> <schedule interval="300"> <ant anthome="/usr/share/ant" buildfile="projects/${project.name}/build.xml"/> </schedule> <log> <merge dir="projects/${project.name}/target/test-results"/> </log> <publishers> <onsuccess> <artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/target/${project.name}.war"/> </onsuccess> </publishers> </project>--> </cruisecontrol>
build.xml
<?xml version="1.0" encoding="utf-8"?> <project name="xxx" default="war" basedir="."> <!-- properties --> <property name="classpath" value="" /> <property name="src.dir" value="${basedir}/src" /> <property name="lib.dir" value="${basedir}/lib" /> <property name="java-src.dir" value="${src.dir}/main/java" /> <property name="test-src.dir" value="${src.dir}/main/test" /> <property name="build.dir" value="${basedir}/target" /> <property name="build.classes.dir" value="${build.dir}/classes" /> <property name="build.test-classes.dir" value="${build.dir}/test-classes" /> <property name="report.dir" value="${build.dir}/report" /> <property name="doc.dir" value="${build.dir}/doc" /> <!--sonar--> <property name="sonar.host.url" value="http://xxx.xxx.xxx.xxx:9000/sonar" /> <property name="sonar.jdbc.url" value="jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8" /> <property name="sonar.jdbc.driverClassName" value="com.mysql.jdbc.Driver" /> <property name="sonar.jdbc.username" value="sonar" /> <property name="sonar.jdbc.password" value="sonar" /> <path id="master-classpath"> <fileset file="${lib.dir}/*.jar"> </fileset> </path> <path id="test-classpath"> <fileset file="${lib.dir}/*.jar"> </fileset> <fileset file="${build.classes.dir}"> <include name="**/*.class" /> </fileset> <fileset file="java-src.dir"> <include name="**/*.java"/> </fileset> </path> <!-- init --> <target name="init"> <delete dir="${build.dir}"> </delete> </target> <!-- compile --> <target name="compile" depends="init" description="compile the source files"> <mkdir dir="${build.classes.dir}" /> <javac srcdir="${java-src.dir}" destdir="${build.classes.dir}" target="1.6" includeantruntime="true"> <compilerarg line="-encoding utf-8" /> <classpath refid="master-classpath" /> </javac> </target> <!-- compiletest --> <target name="compiletest" depends="compile" description="compile the test files"> <mkdir dir="${build.test-classes.dir}" /> <javac srcdir="${test-src.dir}" destdir="${build.test-classes.dir}" target="1.6" includeantruntime="true"> <compilerarg line="-encoding utf-8" /> <classpath> <fileset file="${lib.dir}/*.jar" /> <pathelement path="${build.classes.dir}" /> <pathelement path="${build.test-classes.dir}" /> <pathelement path="${java.class.path}/" /> </classpath> </javac> </target> <target name="rmi-compile" depends="compiletest"> <rmic base="${build.classes.dir}" verify="true"> <classpath> <pathelement path="${build.classes.dir}" /> <pathelement path="${java.class.path}/" /> </classpath> <include name="**/*.class" /> <exclude name="**/test/*.class" /> </rmic> </target> <!-- test --> <target name="test" depends="rmi-compile" description="run junit test"> <mkdir dir="${report.dir}" /> <junit printsummary="true" haltonfailure="false" failureproperty="tests.failed" showoutput="true"> <classpath> <fileset file="${lib.dir}/*.jar" /> <pathelement location="lib/***.jar" /> <pathelement location="lib/***.jar" /> <pathelement path="${build.classes.dir}" /> <pathelement path="${build.test-classes.dir}" /> <pathelement path="${java.class.path}/" /> </classpath> <formatter type="plain" /> <batchtest fork="yes" todir="${report.dir}"> <fileset dir="${test-src.dir}"> <include name="**/*JUnitTest.java" /> </fileset> </batchtest> </junit> <fail if="tests.failed"> - **************************************************** *** One or more tests failed! Check the Output *** **************************************************** </fail> </target> <!-- pack --> <target name="pack" depends="test" description="make jar file"> <copy todir="${build.classes.dir}"> <fileset dir="${basedir}"> <exclude name="build.xml" /> <exclude name="复件**" /> <include name="*.xml" /> <include name="*.properties" /> <include name="*.dat" /> </fileset> </copy> <jar destfile="${build.dir}/${ant.project.name}.jar" basedir="${build.classes.dir}"> <exclude name="**/*Test.class" /> </jar> </target> <!-- doc --> <target name="doc" depends="pack" description="create api doc"> <mkdir dir="${doc.dir}" /> <javadoc destdir="${doc.dir}" author="true" version="true" use="true" windowtitle="GpsEDAgent_API"> <classpath refid="test-classpath"> </classpath> <packageset dir="${java-src.dir}" defaultexcludes="yes"> <include name="cn/eshore/cargps/**" /> </packageset> <doctitle> <![CDATA[<h1>Ant_Junit_xxx.com</h1>]]></doctitle> <bottom> <![CDATA[<i>All Rights Reserved.</i>]]></bottom> <tag name="todo" scope="all" description="To do:" /> </javadoc> </target> <!-- war --> <target name="war" depends="doc" description="make war file"> <mkdir dir="${lib.dir}" /> <war destfile="${build.dir}/${ant.project.name}.war" needxmlfile="false"> <fileset dir="${basedir}"> <exclude name="build.xml" /> <exclude name="复件**" /> <include name="*.xml" /> <include name="*.properties" /> <include name="*.dat" /> </fileset> <lib dir="${lib.dir}"></lib> <classes dir="${build.classes.dir}"> <exclude name="**/*Test.class" /> </classes> </war> </target> <!-- testreport --> <target name="gen-report-junit"> <mkdir dir="${report.dir}" /> <junitreport todir="${report.dir}"> <fileset dir="${report.dir}"> <include name="*" /> </fileset> <report format="frames" todir="${report.dir}" /> </junitreport> </target> <!-- testcoverage --> <target name="gen-report-coverage"> <emma> </emma> </target> <!-- all --> <target name="all" depends="war"> </target> <!-- sonar --> <target name="sonar"> <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml"> <classpath> <pathelement location="${lib.dir}/sonar-ant-task-1.3.jar"/> </classpath> </taskdef> <!-- list of mandatories Sonar properties --> <property name="sonar.sources" value="${java-src.dir}" /> <property name="sonar.projectKey" value="org.xxx:xxx" /> <!-- list of optional Sonar properties --> <!-- <property key="sonar.projectName" value="this value overrides the name defined in Ant root node" /> <property key="sonar.binaries" value="list of directories which contain for example the Java bytecode" /> <property key="sonar.tests" value="list of test source directories separated by a comma" /> <property key="sonar.libraries" value="list of paths to libraries separated by a comma (These libraries are for example used by the Sonar Findbugs plugin)" /> --> <sonar:sonar key="${sonar.projectKey}" version="1.0" xmlns:sonar="antlib:org.sonar.ant"/> </target> </project>
相关推荐
安装完成后,系统会包含一系列必要的文件和目录,比如`cruisecontrol.bat`用于启动服务,`config.xml`作为主要的配置文件,`apache-ant-1.6.5`是CruiseControl依赖的Ant环境,`docs`包含使用文档和示例,`lib`存放...
6. **检查配置文件**:通常情况下,`config.xml` 和 `dashboard-config.xml` 文件包含了 CruiseControl 的主要配置信息。这些文件位于安装目录下的 `etc` 目录内。 #### 四、关键配置说明 - **Ant 支持**:Cruise...
CruiseControl是一款持续集成工具,它能够自动化软件构建、测试和发布的过程,是开发者们进行持续集成实践的重要工具。开源的特性使得CruiseControl在软件开发团队中得到了广泛应用,因为它允许用户根据自身需求进行...
总结来说,"cruisecontrol配置文件.rar" 包含了CruiseControl运行所需的关键组件:`main.jsp` 提供用户友好的Web界面,`build.xml` 定义了构建流程,而`config.xml` 是整个系统的灵魂,控制着CruiseControl的行为。...
2. **配置文件**:CruiseControl.rb的配置文件通常是`config/cruise_control.rb`,它定义了项目的构建流程,包括源码管理、构建触发器、构建任务、测试和报告等。 3. **构建生命周期**:CruiseControl.rb的构建过程...
- **配置文件修改**:在`%CruiseControl_Home%/config.xml`中,定义了CruiseControl的核心配置,包括项目名称、监听器、启动程序、修改集、调度、日志记录和发布者等。例如: - `<property>`标签用于设置环境变量。...
CruiseControl系统的架构图中,我们可以看到,CruiseControl系统的主体是Build Loop机制,它采用了Source Code轮询机制,对持续集成环境的状态进行定时检测,并根据config.xml配置信息做出相应处理。 2.Cruise...
CruiseControl的主要配置文件是`config.xml`,其中定义了项目的构建流程。有两种主要的配置方式: - **普通方式**:直接在XML文件中编写构建步骤和触发器。 - **plugins方式**:使用插件机制,将复杂逻辑封装在插件...
CruiseControl.net的核心配置文件为`ccnet.config`。通过这个文件,用户可以定义项目、触发器、编译工具以及其他与持续集成相关的设置。为了更好地理解如何使用CruiseControl.net支持多个工程,我们通过两个具体的...
2. 配置:安装完成后,需要配置CruiseControl的XML配置文件(通常为cruisecontrol-config.xml)。配置项包括源码仓库地址、构建触发器类型、构建脚本路径等。 3. 启动服务:使用命令行工具启动CruiseControl服务。 4...
在配置 CruiseControl 时,需要编辑 config.xml 文件,以便指定构建项目的详细信息,例如项目名称、SVN 仓库的地址、构建脚本的地址等。同时,需要在 CruiseControl 中配置构建脚本,以便自动地构建和测试软件。 在...
`config.xml`是CruiseControl的核心配置文件,它定义了CruiseControl如何执行构建任务,主要包括以下几个方面: 1. **监听器(Listeners)**:用于监听项目的构建状态变化,并将这些变化通知给指定的目标,例如记录...
`config.xml`是CruiseControl的核心配置,它详细指定了项目如何进行构建、测试以及何时进行这些操作。 **配置文件** `config.xml` 是CruiseControl的基石,其中包含了项目的各种配置信息。例如,它可能包含以下部分...
配置CruiseControl的核心在于`config.xml`文件。以下是一个示例配置: ```xml <cruisecontrol> <!-- 项目名称需与projects目录下的项目一致 --> <!-- 监听器用于记录构建状态 --> ${project.name}/status....
总结来说,CruiseControl的电子邮件配置涉及`config.xml`文件中的`<notification>`和`<email>`标签,通过定制这些设置,我们可以实现构建状态的通知,确保团队成员始终保持对项目进度的了解。正确配置邮件通知是持续...
安装完成后,CruiseControl的配置文件通常是`config.xml`,位于服务器的根目录下。 2. **保持服务器运行**: 为了确保CruiseControl服务器持续运行,你需要配置服务管理工具(如Systemd或init.d脚本)来启动、停止和...
**CruiseControl.NET详解** CruiseControl.NET是一个专为.NET平台设计的自动化持续集成服务器,它的出现是为了满足.NET开发者在项目构建与测试自动化方面的需求。作为CruiseControl for Java的C#版本,Cruise...
1. **配置检查**:确保CruiseControl的配置文件(通常是cruisecontrol.config.xml)中关于SVN的部分正确无误。这通常涉及设置正确的SVN URL、用户名和密码,以及用于触发构建的修改集检查间隔。 2. **SVN提交信息**...