Ant????Java??????2?
???????????? ???????[ 2014/5/21 10:44:09 ] ??????????????? java
??????????????????????
????build.xml?????????£?
<?xml version="1.0"?>
<project name="tasks" default="main">
<property name="build.dir" location="build" />
<target name="init">
<mkdir dir="${build.dir}" />
</target>
<target name="compile" depends="init">
<javac srcdir="src" destdir="${build.dir}" />
</target>
<target name="simpletask" depends="compile">
<taskdef name="simpletask" classname="com.ant.test02.FileSorter" classpath="${build.dir}" />
<simpletask srcFile="input.txt" destFile="output.txt"/>
</target>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="main" depends="simpletask" />
</project>
|
????input.txt???????????????????????build.xml????output.txt???????????????????
???????2???????
??????????????????????磬??src*/*.java??????src?????κ????е?????Java?????
???????????????????**????????????????????????磬??**/*.java???????????μ?????Java???
<copy todir=”archive”>
<fileset dir=”src”>
<include name=”*.java”/>
</fileset>
</copy>
|
????fileset???????°??????src???μ????????????????????Java??????????????????include???????????????????????????????exclude??????????????include???????????????????????include??exclude????????????????????????????????include??????????????????????????exclude????????????
<?xml version="1.0"?>
<project name="tasks" default="main">
<property name="build.dir" location="build" />
<target name="main" >
<copy todir="${build.dir}/dest_dir">
<!-- ?????build???μ?????????????μ???????????? -->
<fileset dir="${build.dir}">
<include name="*.class"/>
<exclude name="*.war"/>
</fileset>
</copy>
</target>
</project>
|
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11