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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to