ant targets are outputting too many times -


i've got ant file looks this:

<?xml version="1.0" encoding="utf-8"?> <project name="p" default="compile" basedir="."> <path id="compile.cliclasspath">     <fileset dir="./webcontent/web-inf/lib">         <include name="*.jar" />     </fileset> </path>  <target name="init">     <!-- create time stamp -->     <tstamp /> </target>  <target name="compile" description="compile source" >     <javac srcdir="./src/" destdir="c:\temp\build">         <classpath refid="compile.cliclasspath" />     </javac> </target>  <target name="createwar" depends="compile" description="create web archive">     <war destfile="c:\temp\client.war"             webxml="./webcontent/web-inf/web.xml"             needxmlfile="true"             basedir="./webcontent"             excludesfile="./webcontent/web-inf/application.xml">         <lib dir="./webcontent/web-inf/lib" />         <classes dir="c:\temp\build" />     </war> </target>  <target name="createear" depends="compile, createwar" description="create enterprise archive">     <ear destfile="c:\temp\client.ear"             appxml="./webcontent/web-inf/application.xml"             includes="c:\temp\client.war" /> </target>  <target name="cleanup" depends="compile, createwar, createear" description="clean up">     <delete includeemptydirs="true">         <fileset dir="c:\temp\build" includes="**/*" />     </delete> </target> </project>  

the idea being create ear content of web app. when run (run order in file, galileo) this:

    buildfile: c:\client-was7.xml        <snip>init:  compile:        [javac] compiling 47 source files c:\temp\build  compile:        [javac] compiling 47 source files c:\temp\build  createwar:          [war] building war: c:\temp\client.war  compile:        [javac] compiling 47 source files c:\temp\build  createwar:          [war] building war: c:\temp\client.war  createear:  compile:        [javac] compiling 47 source files c:\temp\build  createwar:          [war] building war: c:\temp\client.war  createear:  cleanup: build successful total time: 15 seconds 

why isn't output:

 init:  compile:  createwar:  createear:  cleanup:     build successful     total time: 15 seconds 

?

thanks

i think may have depends targets. when run create ear, first run compile, , create war, depends on compile , on.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -