我有一个Ant构建,其中包含以下内容:
WORKSPACE.dir = ${basedir}/../
然后我有:
CORE_PROJECT.dir= ${WORKSPACE.dir}/UUI_Core
这意味着我最终会走上这样的路:
C:\dev\workspaces\RTC\UUI_Core_ANT/..//UUI_Core
这在几乎所有情况下都可以正常工作,但我正在尝试构建一个构建中要使用的类列表。现在我有了这个代码:
<pathconvert
property="coreClasses"
pathsep=" "
dirsep="."
refid="coreSources">
<map from="C:\dev\workspaces\RTC\UUI_Core\src\" to="" />
<mapper>
<chainedmapper>
<globmapper from="*.mxml" to="*"/>
</chainedmapper>
<chainedmapper>
<globmapper from="*.as" to="*"/>
</chainedmapper>
</mapper>
</pathconvert>
它完成删除文件位置和离开包结构的JSUT的工作。不过,它不是很灵活。我应该可以在这里使用core_project.dir。
那么,我怎样才能转换呢
C:\dev\workspaces\rtc\uui_core_ant/。//uui_core
到
C:\dev\workspaces\RTC\UUI_Core