antscript for WAR/EAR/FLEX

 

Eclipse :Preference->Ant->Editor->Content Assist

auto activation triggers: <S{ 后面加一個空格,屬性提示

 

 

<target name="compile" depends="clean,mkdir">

        <javac srcdir="${javasrc.dir}" destdir="${build.dir}" debug="on" deprecation="on" optimize="off" target="1.5" includes="**">

            <classpath refid="build.classpath" />        

        </javac>

 </target>

 

 <target name="war"  depends="compile">

        <war destfile="${ear.dir}/DocumentWorkflow.war" webxml="${webcontent.dir}/WEB-INF/web.xml">
            <fileset dir="${webcontent.dir}">
             <exclude name="WEB-INF/web.xml" />
            </fileset>            
        </war>
    </target>
    <target name="ear" depends="war">
        <ear destfile="${ear.dir}/DocumentWorkflowEAR.ear" appxml="${ear.dir}/META-INF/application.xml">
            <fileset dir="${ear.dir}">
             <exclude name="META-INF/application.xml" />            
             <include name="DocumentWorkflow.war" />
             <include name="META-INF/*" />
            </fileset>            
        </ear>
    </target>
flex編譯 
<taskdef resource="flexTasks.tasks" classpath="${FLEX.TASK.LIB}"/>   
<target name="main.compile"
description="Compiles the main mxml/as source files">
<mxmlc file="${flex.src.dir}/${flex.source}" 
output="${flex.bin.dir}/${flex.output}"
fork="false"
keep-generated-actionscript="false" 
incremental="false"
debug="${debug}"
keep-all-type-selectors="true"
default-background-color="0xFFFFFF"
services="${app.dir}/services-config.xml"
context-root="${context.root}"
locale="${DEFAULT.LOCAL}"
>
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<source-path path-element="${FLEX_HOME}/frameworks"/>
<source-path path-element="${module.dir}"/>
<license product="fds" serial-number="${fds.license.num}"/>
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="locale/${DEFAULT.LOCAL}" />
 </compiler.library-path>
<compiler.include-libraries dir="${flex.project}/libs" includes="*.swc" append="true"/>
</mxmlc>
</target> 
細節問題:
<mkdir dir="${build.dir}"/> 已經存在不會創建,不會報錯
<move todir="${deldir.app}" failοnerrοr="false">...</move>
<delete dir="${deldir}" failοnerrοr="false"/>
<copy overwrite="true">...</copy>如果文件存在將不會覆蓋
如果在編譯的過程中報內錯溢出異常 OutOfMemoryError -Xms128m -Xmx512m
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值