ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@apache.org>
Subject Re: Skip building jar file
Date Fri, 04 Feb 2005 01:09:55 GMT
Remove the line where you delete it. Ant should then not bother 
rebuilding it if none of the files has changed.

Douglas Kramer wrote:
> Novice question.
> 
> My ant script works great, skipping compile if source files have not 
> changes,
> and skipping copying of resources if they have not changed.
> 
> How would I prevent building the jar file if nothing has changed?
> 
>   <target name="jar" depends="compile"
>       description="Builds the jar file that contains the class files">
> 
>       <delete file="${build.jardir}/${mifdoclet.jar}" />
>       <mkdir  dir="${build.jardir}" />
> 
>       <jar jarfile="${build.jardir}/${mifdoclet.jar}" >
>           <fileset dir="${build.classes}">
>          </fileset>
>       </jar>
> 
>   </target>
> 
> -Doug
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message