我想在我的 build.xml ant 脚本中全局定义 svnSetting:
<project name="helloworld" basedir="." default="helloworld">
<svnSetting
javahl="false"
svnkit="true"
username="guest"
password=""
id="svn.settings"
/>
...
</project>
但 eclipse 当然说:
Problem: failed to create task or type svnSetting Cause: The name is undefined.
有没有可能我可以直接在项目下而不是在目标内定义 svnSetting?
最佳答案
您应该添加 typedef
到你的 Ant 脚本:
<project name="helloworld" basedir="." default="helloworld">
<path id="path.svnant">
<pathelement location="${basedir}/svnant.jar"/>
<pathelement location="${basedir}/svnClientAdapter.jar"/>
</path>
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml"
classpathref="path.svnant"/>
您可以阅读此 article更多细节。
关于svn - 全局定义 svnSetting,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7913561/