CC.NET,NANT的相关配置
来源:互联网 发布:南宁伯才网络坑人 编辑:程序博客网 时间:2024/04/28 07:50
语法详见http://nant.sourceforge.net,
http://confluence.public.thoughtworks.org/display/CCNET
1.Copy Task(用来拷贝文件)
语法:
Parameters
todir
attribute. The default is false. FalseincludeemptydirsboolCopy any empty directories included in the <fileset>. The default is true. FalseinputencodingEncoding The encoding to use when reading files. The default is the system's current ANSI code page. FalseoutputencodingEncoding The encoding to use when writing the files. The default is the encoding of the input file. FalseoverwriteboolOverwrite existing files even if the destination files are newer. The default is false. FalsetodirdirectoryThe directory to copy to. FalsetofilefileThe file to copy to. FalsefailonerrorboolDetermines if task failure stops the build, or is just reported. The default is true. FalseifboolIf true then the task will be executed; otherwise, skipped. The default is true. FalseunlessboolOpposite of if
. If false then the task will be executed; otherwise, skipped. The default is false. FalseverboseboolDetermines whether the task should report detailed build log messages. The default is false. False经常用到的是目录(子目录拷贝),文件拷贝,重命名文件目录
1 ) 文件拷贝
<copy todir="config_backup" overwrite="true">
<fileset basedir=".">
<include name="*.*"/>
</fileset>
</copy>
2)目录拷贝(**表示用来递归拷贝哦。。。
What makes this process work is the **/*.* in the include section. the **/ tells nant to do a recursive copy.
)
<copy todir="bin_backup" includeemptydirs="true" overwrite="true" verbose="true">
<fileset basedir="./bin">
<include name="**/*.*"/>
</fileset>
</copy>
failonerror:Determines if task failure stops the build, or is just reported. The default is true.
针对Unit Test操作或者Clean文件等等,要设置为False,比较合理。
3)重命名,甚至可以用C#来做哦。。。。。C#和Nant结合起来,果然非常强大。
<target name="test-rendir" >
<property name="rendir.from" value="d:/temp/lala" />
<property name="rendir.to" value="d:/temp/lili" />
<script language="C#">
<code><![CDATA[
public static void ScriptMain(Project project) {
Directory.Move( project.Properties[ "rendir.from" ],
project.Properties[ "rendir.to" ] );
}
]]></code>
</script>
</target>
2. CC.NET triggers 用来建立Project之间依赖,如何触发Build的设置
语法:
Trigger blocks allow you to specify when CruiseControl.NET will start a new integration cycle.
Specifying an empty element (<triggers />) means integrations are only ever forced manually (for example using CCTray or the Web Dashboard.) Not including a <triggers> element at all means the project will behave like a <triggers /> element (before 1.4.3 the default when not including a <triggers> was a single Interval Trigger with default configuration).
http://confluence.public.thoughtworks.org/display/CCNET/Trigger+Blocks
Trigger blocks allow you to specify when CruiseControl.NET will start a new integration cycle.
For CI you'll want to use an Interval Trigger. Also useful is the Schedule Trigger for implementing daily builds.
Use the Filter Trigger to prevent builds from occurring at certain times (such as when your source control repository is undergoing backup).
If you want to set up a project that will only respond to force build requests, you should specify an empty trigger section like this: <triggers/>,
The Multiple Trigger is used to support the execution of multiple nested triggers.
Types of Integration Trigger Block are:
- Filter Trigger
- Interval Trigger
- Multiple Trigger
- Parameter Trigger
- Project Trigger
- Schedule Trigger
- Url Trigger
- CC.NET,NANT的相关配置
- 配置EditPlus与NAnt构建轻型的.NET开发环境
- 配置EditPlus与NAnt构建轻型的.NET开发环境
- NAnt - .Net的构造工具 [转载]
- cc.net配置初篇
- 十个必备的.NET开发小工具(8):NAnt
- 十个必备的.NET开发小工具(8):NAnt
- 十个必备的.NET开发小工具(8):NAnt
- EditPlus+NAnt构建轻巧的.NET开发环境
- 十个必备的.NET开发小工具(8):NAnt
- SVN + CruiseControl.NET + NANT 自动编译提交的项目
- nant的使用
- NAnt的安裝
- NET开发人员必备工具:NAnt
- NAnt
- Nant
- cc.net
- 自动化每日构建(三)用NAnt来完成.NET工程的每日构建
- GridView,空数据时显示表头最简单的方法!
- FLEX4 DropDownList 使用
- cout<<的一点看法
- Winsock 完成端口模型简介
- 动态添加删除单元格
- CC.NET,NANT的相关配置
- web策略类游戏开发(一) WebGame架构篇
- 让下拉列表select可编辑的简便方法
- 日期+1天
- 第一篇博客
- 打假母亲也陷“代言门”?
- 组通信之jgroups篇----Building Blocks
- Common JavaScript Functions
- CommandArgument 绑定多个变量