CC.NET 文件合并任务和动态值
如何在文件合并任务中使用 CCNetLabel?根据我的发现,我必须使用dynamicValues。我有类似的东西,但没有任何帮助?
<publishers>
<merge>
<dynamicValues>
<replacementValue property="files">
<format>D:\Testoutput\{0}\*.xml</format>
<parameters>
<namedValue name="$CCNetLabel" value="Default" />
</parameters>
</replacementValue>
</dynamicValues>
</merge>
<xmllogger />
<modificationHistory onlyLogWhenChangesFound="true" />
<statistics />
</publishers>
How can I use CCNetLabel in the file merge task? From what I have found I have to use dynamicValues. I have something like this and it is not working any help?
<publishers>
<merge>
<dynamicValues>
<replacementValue property="files">
<format>D:\Testoutput\{0}\*.xml</format>
<parameters>
<namedValue name="$CCNetLabel" value="Default" />
</parameters>
</replacementValue>
</dynamicValues>
</merge>
<xmllogger />
<modificationHistory onlyLogWhenChangesFound="true" />
<statistics />
</publishers>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的脚本中,您尝试生成以下配置(我故意使用更易于阅读的速记符号):
这将不起作用,因为
是一个数组,因此您需要类似的东西:不幸的是,这也不起作用,因为
仅支持
而不是< ;文件>
标签。我认为目前(版本 1.6)根本不可能在这里使用集成属性。我将使用以下解决方法来实现相同的结果:
In your script you're trying to generate the following configuration (intentionally I'm using the shorthand notation which is easier to read):
This won't work because
<files>
is an array, therefore you'd need something like:Unfortunately this doesn't work either because
<dynamicValues>
are supported only for the<merge>
but not for the<files>
tag. I don't think it's currently (version 1.6) possible to use integration properties here at all.I'd use the following workaround to achieve the same result: