zoukankan      html  css  js  c++  java
  • Ant 学习(二)

    这是一个我自己写的Ant脚本,编绎7000多个源文件,大概就是一分钟吧。

    <?xml version="1.0" encoding="UTF-8"?>

    <project name="prpall" default="init" basedir=".">

    <property name="src" value="component" />

    <property name="dest" value="c://classes" />

    <path id="dependlib">

    <pathelement path="${ant.path}"/>

    <fileset dir="webapps/WEB-INF/lib">

    <include name="*.jar"/>

    </fileset>

    <pathelement path="${dest}"/>

    </path>

    <path id="jdk.path">

    <pathelement location="E:\JavaWebServer\jdk142_05\jre\lib\rt.jar" />

    <pathelement location="E:\JavaWebServer\jdk142_05\jre\libr" />

    <pathelement location="E:\JavaWebServer\jdk142_05\lib\tools.jar" />

    </path>

    <path id="ant.path">

        <path refid="jdk.path" />

        <fileset dir="D:\apache-ant-1.8.2-bin\apache-ant-1.8.2\lib">

        <include name="*.jar"/>

        </fileset>

    </path>

    <target name="init">

    <mkdir dir="${dest}" />

    <echo message="${java.version}" />

    </target>

    <target name="build" depends="init">

    <javac srcdir="${src}" destdir="${dest}" debug="true" source="1.4" target="1.4"

        fork="true" memoryMaximumSize="512M" includeantruntime="on" listfiles="true"

    executable="E:\JavaWebServer\jdk142_05\bin\javac" compiler="javac1.4">

     

     <compilerarg line="-encoding GBK" />

     <classpath refid="dependlib"></classpath>

     </javac>

    </target>

    <target name="clean">

     <delete dir="${dest}" />

    </target>

    <target name="rebuild">

     <ant target="clean" />

     <ant target="build" />

    </target>

    </project>


  • 相关阅读:
    tps,qps
    JS打包与代码分割
    css module
    垃圾回收算法、内存管理
    css flex布局
    angularJS transclude
    JS模块之AMD, CMD, CommonJS、UMD和ES6模块
    js event loop事件循环
    bootstrap3之栅格系统
    viewport理解
  • 原文地址:https://www.cnblogs.com/xinzhuangzi/p/4100439.html
Copyright © 2011-2022 走看看