In the past two days, I have been pondering how to use NAnt to implement automatic Build. Now I have figured out how to compile the build File and wrote a Build file for the current project, currently, compilation, FxCop static analysis, and other operations are normal during testing. Only cvs-checkout is incorrectly executed and the problem is unknown.
The following is the build file for my test of the cvs-checkout task:
<? Xml version = "1.0"?>
<Project name = "RailwayStation" default = "go" basedir = "D: \ Railway">
<Target name = "go" depends = "cvscheckout"/>
<Target name = "cvscheckout">
<Cvs-checkout cvsroot = ": pserver: scmuser@192.168.0.1:/DotNet" module = "RailWayStation" destination = "D: \ "password =" scmuser "failonerror =" false "verbose =" true "usesharpcvslib =" true "/>
</Target>
</Project>
The purpose of this experimental Build file is to check out the RailWayStation module under cvs repository: pserver: scmuser@192.168.0.1:/DotNet to D.
The preceding build file has the following errors in different situations:
- When NAnt 0.84 Stable Release is used, the usesharpcvslib attribute of the cvs-checkout task is set to false. During execution, only the "Connection established" clause is displayed, and no check operation is performed. The files in the target directory remain unchanged;
- When NAnt 0.84 Stable Release is used, the usesharpcvslib attribute of the cvs-checkout task is set to true, and only one "Connection established" statement is displayed during execution. Sometimes a sharpcvs internal error is reported and no check-out operation is performed, the files in the target directory remain unchanged;
- The usesharpcvslib attribute of the cvs-checkout task is set to false when NAnt 0.85 is used. When executing the task, the system prompts that the password attribute of the cvs-checkot task has been deprecated, we recommend that you use the cvs-pass attribute instead. After the cvs-pass attribute is changed, the system prompts "Unexpected attribute" cvs-pass "on element <cvs-checkout> during execution. "; if you continue to use the password attribute, you cannot submit the specified cvs password during execution. Instead, you use a blank password, causing the authorization to fail. This is really amazing!
- Set the usesharpcvslib attribute of the cvs-checkout task to true using NAnt 0.85. The following information is displayed during execution, and no subsequent check-out operations are performed.
Cvscheckout:
[Cvs-checkout] D: \ My Documents ents \ My Sources \ DotNet \ RailWayStation \ CVSCheckout. buil
D (5, 10): Attribute 'Password' for <cvs-checkout/> is deprecated. Use <cvs-
Pass> task instead.
[Cvs-checkout] Working directory: D :\
[Cvs-checkout] Executable: D: \ Applications \ DevTools \ DotNet \ NAnt 0.85 \ bin \ scvs. ex
E
[Cvs-checkout] Arguments:-d: pserver: scmuser@192.168.0.1:/DotNet-verbose check
Out RailWayStation
[Cvs-checkout] Starting 'd: \ Applications \ DevTools \ DotNet \ NAnt 0.85 \ bin \ scvs.exe
(-D: pserver: scmuser@192.168.0.1:/DotNet-verbose checkout RailWayStation) 'in'
D :\'
[Cvs-checkout] Logging in to: pserver: scmuser@192.168.0.1:/DotNet
I don't seem to have found any fault in Google. Today I have been thinking about it all day, and I feel a little crazy.