????1. ??????svnant????SVN?л?????
??????????????????svnant-1.3.1.zip?????е?jar
????????????http://subclipse.tigris.org/files/documents/906/49042/svnant-1.3.1.zip
????build.xml?е?д??

 

<!--????SVN???-->
<property name="svnurl" value="http://xx/svn/projectName"/>
<!-- -->
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" />
<!--???????SVN??????????-->
<svnSetting id="svn.setting" svnkit="true" username="username" password="password"  javahl="false" />
<!--???????${project.dir}?????????????-->
<target name="export">
<delete dir="${project.dir}" />
<mkdir dir="${project.dir}" />
<svn refid="svn.setting">
<export srcUrl="${svnurl}" destPath="${project.dir}" force="true"/>
</svn>
</target>

????2.foreach?????????ant-contrib-1.0b3.jar
??????????????
????build.xml?е?д??
????<target name="loop" >
????<foreach list="src" target="all" param="src_loop" delimiter="??"></foreach>
????</target>
????3. yguard???????
???????????μ???http://blog.csdn.net/vrix/article/details/7604636
????????????????http://www.yworks.com/en/downloads.html
????build.xml?е?д??

 

<taskdef name="yguard" classname="com.yworks.yguard.YGuardTask"/>
<yguard>
<inoutpair in="${????.jar}" out="${???.jar}"/>
<shrink logfile="${build.dir}/shrink.xml">
<keep>
<class classes="friendly" methods="private" fields="friendly"/>
<field name="serialVersionUID"/>
</keep>
</shrink>
</yguard>

????4.??н??????
???????tomcat??build.xml?е?д??

 

linux
<target name="start" >
<echo>start tomcat</echo>
<exec executable = "${tomcat.dir}/bin/startup.sh" />
</target>
windows
<target name="stop" >
<echo>stop tomcat</echo>
<exec executable="cmd" dir="${tomcat.dir}/bin" failonerror="false"  append="true">
<env key="CATALINA_HOME" path="${tomcat.dir}"/>
<arg value="/c startup.bat" />
</exec>
</target>