在 ant build.xml 中的 cvs 任务中使用嵌套元素模块 [英] Using the nested element module in cvs task in ant build.xml

查看:15
本文介绍了在 ant build.xml 中的 cvs 任务中使用嵌套元素模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 ant build.xml 连接到 CVS 时遇到问题.我发现原因是 CVS 任务的包属性中的空格为:

I have problems connecting to CVS using ant build.xml. I figured out the reason was whitespaces in package attribute of CVS task as:

<cvs cvsRoot=":pserver:user@xx.xxx.xxx.xx:/CVSREPO_CCP_MIG" dest="${basedir}" package="My Test Project"/>

我从蚂蚁网站(http://ant.apache.org/manual/Tasks/cvs.html ),我们可以使用嵌套的 element 如果要指定名称中带有空格的模块.这指定了要处理的包/模块,与包属性不同,使用此属性指定的模块可以在其名称中包含空格.

I learned from the ant website( http://ant.apache.org/manual/Tasks/cvs.html ) that we may Use a nested <module> element if you want to specify a module with spaces in its name. This specifies a package/module to work on, unlike the package attribute, modules specified using this attribute can contain spaces in their name.

我尝试使用以下方法:

<cvs cvsRoot=":pserver:user@xx.xxx.xxx.xx:/CVSREPO_CCP_MIG" dest="${basedir}">
<module name="My Test Project"/>
</cvs>

这再次抱怨:

build.xml:39: cvs doesn't support the nested "module" element.

如何使用带有 CVS 标签的模块元素?

How can I use the module element with the CVS tag?

Ant 版本是 1.7.x.

The Ant version is 1.7.x.

推荐答案

正如上面的评论所建议的,嵌套的module"元素可用于 Ant ver 1.8 +.
但是,如果您使用的是较早版本之一,则可以在 CVS 任务的包属性下通过添加"来指定包/模块名称在属性值的两端.
例如我们可以在此处将 package="My Test Project" 替换为 package="My Test Project"".

As suggested by the comments above, the nested "module" element is available for Ant ver 1.8 +.
However, if you are on one of the earlier versions, you may specify your package/module name under package attribute of CVS task by adding '"' on the either end of the attribute value.
e.g. We can replace package="My Test Project" with package=""My Test Project"" in here.

这篇关于在 ant build.xml 中的 cvs 任务中使用嵌套元素模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆