在 ant build.xml 中的 cvs 任务中使用嵌套元素模块

编程入门 行业动态 更新时间:2024-10-13 02:19:13
本文介绍了在 ant build.xml 中的 cvs 任务中使用嵌套元素模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我在使用 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/manual/Tasks/cvs.html ),我们可以使用嵌套的 element 如果要指定名称中带有空格的模块.这指定了要处理的包/模块,与包属性不同,使用此属性指定的模块可以在其名称中包含空格.

I learned from the ant website( http://ant.apache/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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-20 09:54:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/980031.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:嵌套   模块   元素   build   ant

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!