Using Ant Zip File 使用Ant打包zip文件

Categories: Flex; Tagged with: ; @ October 14th, 2010 20:05

    <!– =================================
          target:  buildATDZipFile – 指定参与打包的目录或具体文件 – 适用于打包指定的具体目录/文件.
         ================================= –>
    <target name="buildATDZipFile" description="Build Drive zip file.">
          <zip destfile="${DIR_ROOT}/Drive.zip">
            <zipfileset dir="${DIR_ROOT}/src" prefix="${ROOT_NAME}/src" excludes="**/.svn"/>
            <zipfileset dir="${DIR_ROOT}/libs" prefix="${ROOT_NAME}/libs" excludes="**/.svn"/>
            <zipfileset dir="${DIR_ROOT}" includes="OpenInBrowser.bat" fullpath="${ROOT_NAME}/OpenInBrowser.bat"/>
        </zip>
    </target>

Or:

    <!– =================================
          target: buildZipTest 指定排除列表, 直接打包 – 适用于排出部分打包全部.
         ================================= –>
    <target name="buildZipTest" description="description">
        <zip destfile="TestAnt.zip" basedir="${basedir}" excludes="
            *.zip,
            **/.svn/**,
            tomcat/logs/**,
              build/**"></zip>
    </target>

<->



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.