构建自动化TFS ANT

时间:2016-02-08 20:50:06

标签: java ant tfs

我正在尝试创建TFS ANT构建脚本。当从ant获取TFS资源时:" com / teamprise / ant / antlib.xml"。它无法加载jar。我从搜索中了解到,不再支持这个antlib.xml。任何机构都可以建议我在我的ant脚本中查找哪个资源来访问命令行tfs命令。

以下是代码的片段:

<path id= "tfsant.classpath" >
                <fileset dir= "${env.ANT_HOME}/lib" >
                        <include name= "*teamprise-ant*.jar" />
                </fileset>
        </path>`enter code here`


        <typedef resource="com/teamprise/ant/antlib.xml" classpathref="tfsant.classpath" />

<exec executable="tf">
                    <arg value="checkout"/>
                    <arg value="${tfsroot}/temp/BUILD_${build.number}"/>
                    <arg value="${workdir}"/>
                </exec>

1 个答案:

答案 0 :(得分:0)

您可以在计算机上安装Team Explorer Everywhere。这将安装TF命令行实用程序。配置环境变量&#34; Path&#34;对于tf.exe,您可以直接从ANT脚本访问tf命令。