ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry V. Streepy, Jr." <stre...@healthlanguage.com>
Subject Re: Conditional javadocs build
Date Wed, 18 Jul 2001 14:01:55 GMT
Mark Hewitt wrote:
> 
> Is it possible to tell the javadoc task to execute only if there
> have been any changes to the packages over which it is running?
> 
> For some of our projects, the resources required to generate the
> javadocs are rate limiting, and while I can conditionalise the
> compilation, there does not seem to be a well defined means of
> doing the same for javadoc.

It's not exactly perfect, but the fragment below works well enough
for us.  You can probably tweak it so it works for you.


  <!-- ==================================================================== -->
  <!-- INTERNAL: Check to see if any source files are newer than the doc    -->
  <!-- ==================================================================== -->
  <target name="customer-javadoc-check" depends="prepare-build">
    <uptodate property="customer.javadoc.notrequired" targetfile="${build.customer.doc}/packages.html"
>
        <srcfiles dir= "${src.dir}" includes="**/*.java"/>
    </uptodate>
  </target>

  <!-- ==================================================================== -->
  <!-- Generate the javadoc for the deployed (customer visible) API's       -->
  <!-- ==================================================================== -->
  <target name="customer-javadoc"
          depends="prepare-build,customer-javadoc-check"
          unless="customer.javadoc.notrequired"
          description="Generate the Customer (deployed) javadoc">

    <javadoc destdir="${build.customer.doc}"
             sourcepath="${src.dir}"
             classpath="${base.path}"
             header="${name}"
             maxmemory="96m"
             bottom="${copyright}"
             packagenames="com.cyberplus.le.ejb,
                           com.cyberplus.le.ejb.error,
                           com.cyberplus.util,
                           com.cyberplus.le.client.tools,
                           com.cyberplus.le.server.web.servlet"/>
  </target>

-- 
Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office)           mailto:streepy@healthlanguage.com
970/626-4425 (fax)              http://www.healthlanguage.com

Mime
View raw message