技术开发 频道

实战每晚构建之设计和实现

    3.3 类LogAdmin

 

    <project name="BuildAdminSystem" default="execute" basedir="." >

    
<!-- 定义方法 -->

    
<target name="init" >

    
<tstamp>

    
<format property="DSTAMP" pattern="yyyyMMdd_HHmmss" locale="cn"/>

    
</tstamp>

    
<!-- 继承BuildInfoLog -->

    
<property file="BuildInfoLog.properties"/>

    
</target>

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

    
<echo>

    ###########################

    LogAdmin.xml:target execute

    the BuildAdmin.xml′s output will put into file:

    ${webAppDir}${nightlyWebAppName}
/${logTopDir}/${logNamePrefix}-${DSTAMP}.txt

    ###########################

    
</echo>

    
<!-- 跨类的方法调用ant task -->

    
<ant antfile="BuildAdmin.xml"

    inheritAll
="false"

    output
="${webAppDir}${nightlyWebAppName}/${logTopDir}/${logNamePrefix}-${DSTAMP}.txt" >

    
<!-- 传递参数 -->

    
<property name="tagTime" value="${DSTAMP}"/>

    
</ant>

    
</target>

    
</project>
0
相关文章