cruisecontrol编译xml内存不足是什么原因
发布网友
发布时间:2022-04-21 20:07
我来回答
共1个回答
热心网友
时间:2023-06-26 19:50
一 配置文件config.xml
<cruisecontrol>
<property/>
<dashboard/>
<include.projects/>
<system>
<configuration>
<threads/>
</configuration>
</system>
<plugin/>
<project>
<property/>
<plugin/>
<cvslabelincrementer>
<emptylabelincrementer>
<formattedlabelincrementer>
<labelincrementer/>
<p4changelistlabelincrementer>
<propertyfilelabelincrementer>
<svnlabelincrementer>
<listeners>
<cmsynergysessionmonitor/>
<currentbuildstatusftplistener/>
<currentbuildstatuslistener/>
<currentbuildstatuspagelistener/>
<lockfilelistener/>
</listeners>
<bootstrappers>
<accurevbootstrapper/>
<alienbrainbootstrapper/>
<antbootstrapper/>
<clearcasebootstrapper/>
<clearcaseviewstrapper/>
<cmsynergybootstrapper/>
<cmsynergybaselinebootstrapper/>
<cvsbootstrapper/>
<darcsbootstrapper/>
<execbootstrapper/>
<gitbootstrapper/>
<harvestbootstrapper/>
<lockfilebootstrapper/>
<mercurialbootstrapper/>
<p4bootstrapper/>
<plasticscmbootstrapper/>
<snapshotcmbootstrapper/>
<starteambootstrapper/>
<surroundbootstrapper/>
<svnbootstrapper/>
<tfsbootstrapper/>
<vssbootstrapper/>
</bootstrappers>
<modificationset>
<accurev>
<alienbrain/>
<alwaysbuild/>
<buildstatus/>
<clearcase/>
<cmsynergy/>
<compound>
<targets/>
<triggers/>
</compound>
<cvs/>
<darcs/>
<filesystem/>
<forceonly/>
<git/>
<harvest/>
<httpfile/>
<mavensnapshotdependency/>
<maven2snapshotdependency/>
<mercurial/>
<mks/>
<p4/>
<plasticscm/>
<pvcs/>
<snapshotcm/>
<starteam/>
<store/>
<surround/>
<svn/>
<tfs/>
<timebuild>
<ucm>
<veto/>
<vss/>
<vssjournal/>
</modificationset>
<schele>
<ant/>
<maven/>
<maven2/>
<pause/>
<nant/>
<phing/>
<rake/>
<exec/>
<composite/>
<xcode/>
</schele>
<log>
<merge/>
<gzip/>
<delete/>
<deleteartifacts/>
</log>
<publishers>
<antpublisher/>
<artifactspublisher/>
<clearcasebaselinepublisher/>
<cmsynergybaselinepublisher/>
<cmsynergytaskpublisher/>
<compoundpublisher/>
<email/>
<execute/>
<ftppublisher/>
<htmlemail/>
<http>
<jabber/>
<onfailure/>
<onsuccess/>
<origo/>
<rss/>
<sametimeannouncement/>
<scp/>
<sfeedocman/>
<sfeefrs/>
<sfeetracker/>
<socket/>
<*>
<weblog>
<x10/>
<xsltlogpublisher/>
<yahoopublisher/>
</publishers>
</project>
</cruisecontrol>
二 config.xml的元素<CruiseControl/>和子元素
1)<CruiseControl/>
<CruiseControl/>是配置文件的根节点,可以看做其他的元素容器。
它可以包含子元素:<system>,<project>,<plugin>,<property>,<include.projects>,<dashboard>。
2) <threads> (<system>/<configuration>/<threads>)
<threads> 用来指定CruiseControl可同时build projects的最大数目。默认为1。如果某一时刻需要运行的projects大于threads的count属性指定的值,则多余count的projects将处于等待队列。
它包含属性count。count表示thread的最大数目。
3) <property>
<property> 用来在config.xml中设置一个属性。
它可以包含属性name,value,enviroment,file,toupper。name/value用来表示一个属性;enviroment用来指定可以使用的系统环境变量的前缀,例如当environment为myenv时,表示可以使用系统中的所有的以myenv开始的环境变量,例如myenv.path;file用来加载专门包含<property/>的文件,将所有的property导入到当前config.xml;toupper用来将属性的名字转化为大写。
如下示例:
1.Set a couple of global properties using name/value pairs:
<cruisecontrol>
<property name="cruisedir" value="/home/cruise"/>
<property name="logdir" value="${cruisedir}/logs"/>
...
<cruisecontrol>
2.Set a collection of global properties from the properties file "config.properties":
<cruisecontrol>
<property file="config.properties"/>
...
<cruisecontrol>
3.Load the system's environment into a collection of global properties. Uppercase all environment variable names:
<cruisecontrol>
<property environment="env" toupper="true"/>
<property name="logdir" value="${env.CCDIR}/logs"/>
...
<cruisecontrol>
4.Define a global property called "buildmanager". Override it's value only within the scope of the project called "project2".
<cruisecontrol>
<property name="buildmanager" value="buildmgr@here.com"/>
<project name="project1">
<!-- ${buildmanager} resolves to "buildmgr@here.com" -->
</project>
<project name="project2">
<property name="buildmanager" value="someoneelse@here.com"/>
<!-- ${buildmanager} resolves to "someoneelse@here.com" -->
</project>
<cruisecontrol>
5.As demonstrated here, properties and plugin pre-configuration can be an extremely powerful combination.
<cruisecontrol>
<!-- Load environment variables -->
<property environment="env" toupper="true"/>
<!-- Commonly used directories -->
<property name="reportdir" value="${env.CCDIR}/report"/>
<property name="projectdir" value="${env.CCDIR}/checkout/${project.name}"/>
<property name="testdir" value="${projectdir}/build/junit-reports"/>
<property name="logdir" value="${env.CCDIR}/logs/${project.name}"/>
<!-- Defaults for email -->
<property name="buildmaster.email" value="buildmaster@example.com"/>
<property name="buildmaster.name" value="Buildmaster"/>
<!-- Preconfigure our plugins -->
<plugin name="log"
dir="${logdir}"/>
<plugin name="currentbuildstatuslistener"
file="${logdir}/buildstatus.html"/>
<plugin name="cvs"
localworkingcopy="${projectdir}"/>
<plugin name="ant"
antscript="${env.ANT_HOME}/bin/ant"
antWorkingDir="${projectdir}"
target="cruise"/>
<plugin name="htmlemail"
buildresultsurl="http://servername/cruisecontrol/buildresults/${project.name}"
mailhost="smtp.example.com"
returnaddress="${buildmaster.email}"
returnname="${buildmaster.name}"
subjectprefix="[BUILD ${project.name}]"
xsldir="${reportdir}/jsp/webcontent/xsl"
css="${reportdir}/jsp/webcontent/css/cruisecontrol.css"/>
<project name="project1"/>
<listeners>
<currentbuildstatuslistener/>
</listeners>
<log>
<merge dir="${testdir}">
</log>
<modificationset>
<cvs/>
</modificationset>
<schele>
<ant/>
</schele>
<publishers>
<htmlemail>
<always address="${buildmaster.email}">
<failure address="proj1dev@example.com">
<ignore address="buildmaster">
</htmlemail>
</publishers>
</project>
<project name="project2"/>
<listeners>
<currentbuildstatuslistener/>
</listeners>
<log>
<merge dir="${testdir}">
</log>
<modificationset>
<cvs/>
</modificationset>
<schele>
<ant/>
</schele>
<publishers>
<htmlemail>
<always address="${buildmaster.email}">
<failure address="proj2dev@example.com">
</htmlemail>
</publishers>
</project>
</cruisecontrol>