zoukankan      html  css  js  c++  java
  • Ant入门

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="myAnt" default="init" basedir=".">

    <target name="init">
    </target>

    <target name="preprocess">
    <mkdir dir="compileFile"/>
    </target>

    <!-- 自定义标签 -->
    <taskdef name="fileSorter" classname="com.kk.ant.FileSorter" classpath="."></taskdef>

    <target name="package" depends="preprocess,myCompile">
    <!--获取当前时间-->
    <tstamp></tstamp>
    <jar destfile="package-${DSTAMP}.jar" basedir="compileFile"></jar>
    <delete dir="compileFile"></delete>
    <move file="s.zx" tofile="vm.sz"></move>
    </target>


    <target name="myCompile">
    <javac srcdir="com" destdir="compileFile"></javac>
    </target>

    <target name="zip">
    <zip destfile="package.zip" basedir="com"></zip>
    <unzip dest="com2" src="package.zip"></unzip>
    </target>

    <target name="copy2">
    <copy todir="zx">
    <fileset dir="com">
    <!--递归复制文件夹下的所有.java文件-->
    <include name="**/*.java"/>
    </fileset>
    </copy>
    </target>

    <target name="sort">
    <fileSorter srcfile="1.txt" destfile="2.txt"/>
    </target>

    </project>



  • 相关阅读:
    互斥量
    读写锁
    死锁
    pthread
    线程
    守护进程
    信号捕捉
    信号集
    信号
    mmap
  • 原文地址:https://www.cnblogs.com/BigIdiot/p/2304822.html
Copyright © 2011-2022 走看看