CC.net&Nant配置文件
2013-01-18 17:56 Zhuang miao 阅读(689) 评论(0) 编辑 收藏 举报<cruisecontrol xmlns:cb="urn:ccnet.config.builder"> <!-- This is your CruiseControl.NET Server Configuration file. Add your projects below! --> <project name="StarWood" description="StarWood asp.net cruise control"> <triggers> <!-- check the source control every X time for changes, and run the tasks if changes are found <intervalTrigger name="continuous" seconds="30" buildCondition="IfModificationExists" initialSeconds="5"/>--> </triggers> <sourcecontrol type="svn" autoGetSource="true"> <trunkUrl>svn url</trunkUrl> <workingDirectory>e:\ccnet</workingDirectory> <!-- <username>luyifeng</username> <password>luyifeng1</password> --> </sourcecontrol> <tasks> <!-- <exec> <executable>ping.exe</executable> <buildArgs>localhost</buildArgs> <buildTimeoutSeconds>15</buildTimeoutSeconds> <description>Pinging a server</description> </exec> --> <nant> <executable>D:\nant-0.92\bin\nant.exe</executable> <baseDirectory>E:\ccnet</baseDirectory> <nologo>false</nologo> <buildFile>default.build</buildFile> <!-- <targetList> <target>run</target> </targetList> --> <buildTimeoutSeconds>1200</buildTimeoutSeconds> </nant> </tasks> <!-- <publishers> <buildpublisher> <sourceDir>C:\StarWood.WebSite\_PublishedWebsites</sourceDir> <publishDir>e:\ccpublish</publishDir> <useLabelSubDirectory>true</useLabelSubDirectory> </buildpublisher> </publishers> --> </project> </cruisecontrol>
CC.net配置文件,放在cc.net,server目录中。
<?xml version="1.0"?> <project name="NAnt Examples" default="rebuild"> <target name="*"> <nant target="${target::get-current-target()}"> <buildfiles> <include name="startwood.build" /> <exclude name="default.build" /> </buildfiles> </nant> </target> </project>
default.build文件,放在项目中。
<project name="Solution Build Example" default="rebuild"> <property name="configuration" value="release"/> <property name="Project.Output" value="c:\StarWood.WebSite"/> <property name="Project.Publish" value="c:\Publish"/> <target name="clean" description="Delete all previously compiled binaries."> <delete> <fileset> <include name="**/bin/**" /> <include name="**/obj/**" /> <include name="**/*.suo" /> <include name="**/*.user" /> </fileset> </delete> </target> <target name="build" description="Build StarWood Startring."> <call target="build.StarWood"/> </target> <target name="rebuild" depends="clean, build" /> <target name="build.StarWood"> <solution configuration="${configuration}" solutionfile="Cendyn.StarWood.sln" outputdir="${Project.Output}"> <excludeprojects> <include name="Cendyn.StarWood.Test\Cendyn.StarWood.Test.csproj" /> </excludeprojects> </solution> <move todir="${Project.Publish}"> <fileset basedir="${Project.Output}/_PublishedWebsites/Cendyn.StarWood.WebSite"> <exclude name="Web.config" /> <excludes name="_config/**" />
</fileset> </move> <!-- <property name="expected.output" value="bin/${configuration}/WinForms.exe"/> <fail unless="${file::exists(expected.output)}">Output file doesn't exist in ${expected.output}</fail>--> </target> </project>
具体项目的配置文件,与default.build同级目录存放