Using the nested element module in cvs task in ant build.xml

蓝咒 提交于 2019-12-12 17:43:19

问题


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"/>

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.

I tried using the following:

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

This again complains:

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

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

The Ant version is 1.7.x.


回答1:


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.



来源:https://stackoverflow.com/questions/8147174/using-the-nested-element-module-in-cvs-task-in-ant-build-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!