楼主,可否讲一下,CVSNT是用来干什么的?
解决方案 »
- 紧急,,谢谢
- 求助表单元素File控件的使用!!!在线等~
- spring如何动态获取bean,如何动态调用getBean方法。
- 请教hibernate保持连接的高效方法
- 关于applet急!!!!!!!!!!11在线等!!!!
- tomcat 源码应在哪里下载啊
- help me!初学JAVA,请各位大侠帮忙编个小程序
- 为什么不能加密解密?(紧急)解决了奉献多分
- 在weblogic中建立连接池出现的问题,请相助
- 在P4,windows2000 pro上安裝jb7+weblogic7的問題!
- 帮忙看看是什么问题
- 用熟悉IREPORT的高手请近来。急~~多谢各位指点!! 我刚开始用IREPORT做报表,有很问题,请高手指教。
我只见过windows下的客户端版本。至于ant操作cvs,没有用过,应该不难吧,不就是用命令行嘛。
我们都是手动操作cvs,不可能动不动就连接cvs吧?一天一次应该就差不多了,有必要用ant吗?又不是编译部署那么频繁!
Ant支持cvs操作,在Ant的文档里有详细说明:Cvs
Description
Handles packages/modules retrieved from a CVS repository.When doing automated builds, the get task should be preferred over the checkout command, because of speed.Important: This task needs "cvs" on the path. If it isn't, you will get an error (such as error 2 on windows). If <cvs> doesn't work, try to execute cvs.exe from the command line in the target directory in which you are working. Parameters
Attribute Description Required
command the CVS command to execute. No, default "checkout".
compression true or false - if set to true, this is the same as compressionlevel="3" No. Defaults to false.
compressionlevel A number between 1 and 9 (corresponding to possible values for CVS' -z# argument). Any other value is treated as compression="false" No. Defaults to no compression.
cvsRoot the CVSROOT variable. No
cvsRsh the CVS_RSH variable. No
dest the directory where the checked out files should be placed. Note that this is different from CVS's -d command line switch as Ant will never shorten pathnames to avoid empty directories. No, default is project's basedir.
package the package/module to check out. No
tag the tag of the package/module to check out. No
date Use the most recent revision no later than the given date No
quiet suppress informational messages. This is the same as -q on the command line. No, default "false"
reallyquiet suppress all messages. This is the same as -Q on the command line. since Ant 1.6. No, default "false"
noexec report only, don't change any files. No, default to "false"
output the file to direct standard output from the command. No, default output to ANT Log as MSG_INFO.
error the file to direct standard error from the command. No, default error to ANT Log as MSG_WARN.
append whether to append output/error when redirecting to a file. No, default to "false".
port Port used by CVS to communicate with the server. No, default port 2401.
passfile Password file to read passwords from. No, default file ~/.cvspass.
failonerror Stop the build process if the command exits with a return code other than 0. Defaults to false No Examples
<cvs cvsRoot=":pserver:[email protected]:/home/cvspublic"
package="ant"
dest="${ws.dir}"
/>
checks out the package/module "ant" from the CVS repository pointed to by the cvsRoot attribute, and stores the files in "${ws.dir}". <cvs dest="${ws.dir}" command="update"/>
updates the package/module that has previously been checked out into "${ws.dir}". <cvs command="-q diff -u -N" output="patch.txt"/>
silently (-q) creates a file called patch.txt which contains a unified (-u) diff which includes new files added via "cvs add" (-N) and can be used as input to patch. The equivalent, using <commandline> elements, is: <cvs output="patch">
<commandline>
<argument value="-q"/>
<argument value="diff"/>
<argument value="-u"/>
<argument value="-N"/>
</commandline>
</cvs>or:
<cvs output="patch">
<commandline>
<argument line="-q diff -u -N"/>
</commandline>
</cvs>You may include as many <commandline> elements as you like. Each will inherit the failonerror, compression, and other "global" parameters from the <cvs> element. <cvs command="update -A -d"/>
Updates from the head of repository ignoring sticky bits (-A) and creating any new directories as necessary (-d).Note: the text of the command is passed to cvs "as-is" so any cvs options should appear before the command, and any command options should appear after the command as in the diff example above. See the cvs manual for details, specifically the Guide to CVS commands
========================================================================
Check out all source from cvs.
========================================================================
-->
<target name="cvs.checkout" if="cvs.host">
<delete dir="${java.src.dir}" includeEmptyDirs="true"/>
<delete dir="${c.src.dir}" includeEmptyDirs="true"/>
<delete dir="${setup.src.dir}" includeEmptyDirs="true"/>
<delete dir="${java.lib.dir}" includeEmptyDirs="true"/>
<property name="cvs.root" value=":pserver:${cvs.user}:${cvs.password}@${cvs.host}:${cvs.port}:/${cvs.path}"/>
<cvs command="export -D 2030-01-01 -d ." cvsRoot="${cvs.root}" package="JavaSource/" dest="${java.src.dir}"/>
<cvs command="export -D 2030-01-01 -d ." cvsRoot="${cvs.root}" package="CSource/" dest="${c.src.dir}"/>
<cvs command="export -D 2030-01-01 -d ." cvsRoot="${cvs.root}" package="BuildSource/" dest="${setup.src.dir}"/>
<cvs command="export -D 2030-01-01 -d ." cvsRoot="${cvs.root}" package="JavaLib/" dest="${java.lib.dir}"/> </target>