<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<project name="Flying Saucer Build File" default="help" basedir=".">
  <description>Checkout, build, test, and package the Flying Saucer project.</description>

    <!-- =====================================================
         init and prefab settings
         ===================================================== -->
  <import file="./etc/build/properties.xml" />
  <import file="./etc/build/preset-defs.xml" />
  <import file="./etc/build/clean.xml" />
  <import file="./etc/build/compile.xml" />
  <import file="./etc/build/docs.xml" />
  <import file="./etc/build/jars.xml" />
  <import file="./etc/build/tests.xml" />
  <import file="./etc/build/dist.xml" />
  <import file="./etc/build/upload.xml" />
  <import file="./etc/build/demo-apps.xml" />
  <import file="./etc/build/netbeans.xml" />
  <import file="./etc/build/convert.xml" />

  <target name="help">
    <echo message=" ant settings: show all Ant properties to be used"/>
    <echo message=" ant clean: clean up any compilation or distribution files made"/>
    <echo message=" ant compile: compile the source"/>
    <echo message=" ant browser: build run the browser"/>
    <echo message=" ant test -Dfile=dir/testfile.html: build run the test app"/>
	<echo message=" ant jar: build all jars"/>
	<echo message=" ant dist: build the distributions"/>
	<echo message=" ant docs: build the javadocs"/>
	<echo message=" ant settings : list the current environment settings"/>
	<!--
    <echo message=" ant about: build run the about box demo"/>
	-->
    <echo message="lib directory ${libraries.dir}" />
  </target>


    <!-- General initialization, including properties. -->
  <target name="init" depends="properties">
    <mkdir dir="${dest.dir}"/>
    <mkdir dir="${dest.java.dir}"/>
    <mkdir dir="${dest.resources.css.dir}"/>
    <mkdir dir="${dest.resources.conf.dir}"/>
    <mkdir dir="${dest.resources.schema.dir}"/>
  </target>

    <!-- =====================================================
         Compile, Jar, and Clean
         ===================================================== -->
    <!-- Deletes all files from destination directory tree. -->
  <target name="clean" description="Cleans all build files." depends="properties">
    <delete dir="${dest.dir}"/>
    <delete>
      <fileset dir="${basedir}">
        <include name="**/*~"/>
      </fileset>
    </delete>
  </target>

    <!-- Compiles application and copies resources to destination directory. -->
  <target name="compile" description="Compile core classes." depends="init,resources.core">
    <javac-full>
      <include name="org/xhtmlrenderer/**"/>
    </javac-full>
  </target>

    <!-- Builds core, browser and about box jars. -->
  <target name="jar" description="Builds all jars">
    <antcall target="jar.core" />
    <antcall target="jar.core-minimal" />
    <antcall target="jar.browser" />
    <antcall target="jar.about" />
    <antcall target="jar.svg" />
    <antcall target="jar.docbook" />
  </target>

    <!-- =====================================================
         Build the various distributions
         ===================================================== -->
  <target name="dist" depends="check.app.version, dist.all" description="Builds all distribution files."/>

    <!-- Builds a ZIP file of entire project from base directory. -->
  <target name="zip" description="Builds ZIP file of entire project." depends="jar">
    <zip basedir="${basedir}" zipfile="../flyingsaucer.zip"/>
  </target>

    
    <!-- =================================================
         Documentation
         ================================================= -->
  <target name="docs" description="Creates JavaDocs" depends="clean.java2html, clean.javadoc">
    <antcall target="_javadoc">
      <param name="antcall.dest.javadoc.dir" value="${dest.javadoc.full.dir}"/>
      <param name="antcall.javadoc.file" value=""/>
    </antcall>
	<echo message="writing to ${dest.javadoc.user.dir} "/>
    <antcall target="_javadoc">
      <param name="antcall.dest.javadoc.dir" value="${dest.javadoc.user.dir}"/>
	  
      <param name="antcall.javadoc.file" value=""/>
      <reference refid="user-java-files" torefid="org-java-files"/>
    </antcall>
    <copy todir="${dest.dir}/docs" file="${dest.javadoc.full.dir}/index.html"/>
  </target>

    <!-- =================================================
         Helpers
         ================================================= -->
    <!-- copies core resources to destination directory. -->
  <target name="resources.core"
      description="Copies core resource files (css/dtds) to build directory"
      depends="init">

    <copy todir="${dest.resources.css.dir}">
		<fileset dir="${src.resources.css.dir}">
			<include name="*.css"/>
		</fileset>
	</copy>
    <copy todir="${dest.resources.conf.dir}" file="${src.resources.conf.dir}/xhtmlrenderer.conf"/>
    <copy todir="${dest.resources.schema.dir}">
      <fileset dir="${src.resources.schema.dir}">
        <include name="**/*.*"/>
      </fileset>
    </copy>
  </target>

    <!-- Copies the resources needed to run the browser into the build tree -->
  <target name="resources.browser" depends="compile">
    <mkdir dir="build/classes/demos"/>
    <copy todir="build/classes/demos">
      <fileset dir="demos/browser/xhtml">
        <include name="*.xhtml"/>
        <include name="*.css"/>
        <include name="*.gif"/>
        <include name="*.png"/>
        <include name="splash/**"/>
        <include name="about/**"/>
        <include name="alice/**"/>
      </fileset>
    </copy>
    <copy todir="build/classes/images">
      <fileset dir="demos/browser/src/icons/images">
        <include name="*.gif"/>
      </fileset>
    </copy>
  </target>

  <!-- Copies the resources needed to run the svg demo -->
  <target name="resources.svg" depends="compile">
    <mkdir dir="build/classes/demos"/>
    <copy todir="build/classes/svg">
      <fileset dir="demos/svg/xhtml">
        <include name="*.xhtml"/>
        <include name="*.css"/>
        <include name="*.gif"/>
        <include name="*.png"/>
        <include name="dat/**"/>
      </fileset>
    </copy>
  </target>

    <!-- Copies the resources needed to run the docbook demo -->
    <target name="resources.docbook" depends="compile">
      <mkdir dir="build/classes/demos"/>
      <copy todir="build/classes/docbook/xml">
        <fileset dir="demos/docbook/xml" >
          <include name="*.xml"/>
        </fileset>
      </copy>
      <copy todir="build/classes/docbook/dtd">
        <fileset dir="demos/docbook/dtd">
          <include name="**/*"/>
        </fileset>
      </copy>
      <copy todir="build/classes/docbook/docbook-css-0.4">
        <fileset dir="demos/docbook/docbook-css-0.4">
          <include name="**/*"/>
        </fileset>
      </copy>
      <copy todir="build/classes/docbook/wysiwygdocbook1.01">
        <fileset dir="demos/docbook/wysiwygdocbook1.01">
          <include name="**/*"/>
        </fileset>
      </copy>
    </target>

    <!-- =======================================
         General
         ======================================= -->
  <target name="settings" depends="properties">
    <echo message="******************************************"/>
    <echo message="App Settings"/>
    <echo message="******************************************"/>
    <echo message=""/>
    <echo message="app.name ${app.name}"/>
    <echo message=""/>

    <echo message=""/>
    <echo message="******************************************"/>
    <echo message="Directory Settings"/>
    <echo message="******************************************"/>
    <echo message=""/>
    <echo message="basedir ${basedir}"/>
    <echo message="libraries.dir ${libraries.dir}"/>
    <echo message="src.dir ${src.dir}"/>
    <echo message="doc.dir ${doc.dir}"/>
    <echo message="dest.dir ${dest.dir}"/>
    <echo message="src.java.dir ${src.java.dir}"/>
    <echo message="dest.javadoc.full.dir ${dest.javadoc.full.dir}"/>
    <echo message="dest.javadoc.user.dir ${dest.javadoc.user.dir}"/>
    <echo message="dest.java2html.dir ${dest.java2html.dir}"/>
    <echo message="dest.java.dir ${dest.java.dir}"/>
    <echo message="src.about.java.dir ${src.about.java.dir}"/>
    <echo message="src.browser.java.dir ${src.browser.java.dir}"/>
    <echo message="src.resources.css.dir ${src.resources.css.dir}"/>
    <echo message="dest.resources.css.dir ${dest.resources.css.dir}"/>
    <echo message="src.resources.conf.dir ${src.resources.conf.dir}"/>
    <echo message="dest.resources.conf.dir ${dest.resources.conf.dir}"/>
    <echo message="src.resources.schema.dir ${src.resources.schema.dir}"/>
    <echo message="dest.resources.schema.dir ${dest.resources.schema.dir}"/>
    <echo message="src.packaging.dir ${src.packaging.dir}"/>
    <echo message="src.demo.xhtml.dir ${src.demo.xhtml.dir}"/>
    <echo message="src.demo.splash.dir ${src.demo.splash.dir}"/>
    <echo message="src.about.xhtml.dir ${src.about.xhtml.dir}"/>
    <echo message=""/>

    <echo message=""/>
    <echo message="******************************************"/>
    <echo message="Compiler Settings"/>
    <echo message="******************************************"/>
    <echo message=""/>
    <echo message="build.compiler ${build.compiler}"/>
    <echo message="compiler.debug ${compiler.debug}"/>
    <echo message="compiler.deprecation ${compiler.deprecation}"/>
    <echo message="compiler.failonerror ${compiler.failonerror}"/>
    <echo message="compiler.fork ${compiler.fork}"/>
    <echo message="compiler.listfiles ${compiler.listfiles}"/>
    <echo message="compiler.nowarn ${compiler.nowarn}"/>
    <echo message="compiler.optimize ${compiler.optimize}"/>
    <echo message="compiler.source ${compiler.source}"/>
    <echo message="compiler.target ${compiler.target}"/>
    <echo message="compiler.verbose ${compiler.verbose}"/>
    <echo message=""/>

    <echo message=""/>
    <echo message="******************************************"/>
    <echo message="Java Executable Settings"/>
    <echo message="******************************************"/>
    <echo message=""/>
    <echo message="java-exec.fork.tests ${java-exec.fork.tests}"/>
    <echo message=""/>

        <!--
        <echo message=""/>
        <echo message="******************************************"/>
        <echo message="Other Settings"/>
        <echo message="******************************************"/>
        <echo message=""/>
        -->
  </target>
</project>

<!-- ========== this is the CVS log. Don't delete! ========== -->

<!-- 
$Id: build.xml,v 1.100 2009/04/14 12:53:46 pdoubleya Exp $

$Log: build.xml,v $
Revision 1.100  2009/04/14 12:53:46  pdoubleya
main dist target doesn't need subtargets, can use dist.all; remove iText.jar from demos dist as it's not used in the browser demo

Revision 1.99  2009/04/13 14:00:17  pdoubleya
Update Ant build to handle Xilize conversion of WWW and UG files, distribution build, and distro upload

Revision 1.98  2009/02/08 15:25:23  pdoubleya
Remove references to photogallery and filebrowser demo apps, as these are no longer maintained

Revision 1.97  2007/07/14 13:05:47  pdoubleya
Updates for R7

Revision 1.96  2007/04/12 13:20:31  pdoubleya
Remove reference to source images directory

Revision 1.95  2007/04/07 15:22:08  pdoubleya
Copy image resources (for "missing img" image) to main jar

Revision 1.94  2006/07/28 10:17:32  pdoubleya
Added support for docbook demo.

Revision 1.93  2006/07/26 18:19:16  pdoubleya
Added SVG build stuff.

Revision 1.92  2005/08/02 01:43:37  joshy
fixed doc generation for simple docs

Revision 1.91  2005/07/04 02:23:36  joshy
made build script copy over the new default css file
Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.90  2005/06/25 23:20:49  joshy
added help

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.89  2005/03/29 09:01:48  pdoubleya
Changed to new build file structure. Added image resources for browser.

Revision 1.1  2005/03/26 12:04:14  pdoubleya
Added to CVS.

Revision 1.88  2005/03/24 23:11:09  pdoubleya
Removed nbprofile call in simple test (used for profiling in NB).

Revision 1.87  2005/03/23 17:24:56  pdoubleya
Added elements/entities for XHTML resources.

Revision 1.86  2005/02/05 17:22:24  pdoubleya
added resources for entities and dtds to copys commands.

Revision 1.85  2005/01/29 12:20:06  pdoubleya
Exclude /prototype src directory from build.

Revision 1.84  2005/01/29 10:07:27  pdoubleya
Added task to sync nb_profile directory, and for running the SimplePageTest class.

Revision 1.83  2005/01/24 14:58:05  pdoubleya
Modified public-api test settings.

Revision 1.82  2005/01/13 00:47:48  tobega
Added preparation of values for a form submission

Revision 1.81  2004/12/14 01:50:13  tobega
Why is there always one more bug ;-) Now line-breaking should be cast-iron (I hope)

Revision 1.80  2004/12/12 16:11:04  tobega
Fixed bug concerning order of inline content. Added a demo for pseudo-elements.

Revision 1.79  2004/12/09 18:03:10  joshy
added game screen to browser
Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.78  2004/12/01 13:59:40  joshy
added new demos
Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.77  2004/11/30 21:24:39  joshy
turned off diffs again
Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.76  2004/11/30 21:23:18  joshy
updated the unit tests

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.75  2004/11/30 00:37:20  joshy
modified docs
Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.74  2004/11/27 15:46:37  joshy
lots of cleanup to make the code clearer

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.73  2004/11/16 15:19:29  pdoubleya
Exclude abstract FSCssTestCase from junit test suite.

Revision 1.72  2004/11/16 14:37:48  pdoubleya
Added support for JUnit tests.
Renamed test- targets to test. to be like other names.

Revision 1.71  2004/11/15 13:41:02  pdoubleya
Renamed javadoc target to _javadoc, as it is meant for internal use; use 'docs' target to generate javadocs for the project.

Revision 1.70  2004/11/12 20:43:29  joshy
added demo of custom font

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.69  2004/11/12 18:51:00  joshy
fixed repainting issue for background-attachment: fixed
added static util methods and get minimum size to graphics 2d renderer
added test for graphics 2d renderer

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.68  2004/11/11 15:27:12  joshy
added encoding
Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.67  2004/11/11 15:25:32  joshy
changed the encoding

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.66  2004/11/07 23:24:18  joshy
added menu item to generate diffs
added diffs for multi-colored borders and inline borders

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.65  2004/11/07 16:23:16  joshy
added support for lighten and darken to bordercolor
added support for different colored sides

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.64  2004/11/07 13:39:16  joshy
fixed missing borders on the table
changed td and th to display:table-cell
updated isBlockLayout() code to fix double border problem with tables

-j


Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.63  2004/11/06 22:49:51  joshy
cleaned up alice
initial support for inline borders and backgrounds
moved all of inlinepainter back into inlinerenderer, where it belongs.



Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.62  2004/11/06 01:50:40  joshy
support for line-height
cleaned up the alice demo
added unit tests for font family selection and line-height

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.61  2004/11/05 18:48:41  joshy
added alice demo to the browser
Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.60  2004/11/05 18:45:14  joshy
support for floated blocks (not just inline blocks)

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.59  2004/11/05 16:39:34  joshy
more float support
added border bug test
-j

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.58  2004/11/04 15:35:44  joshy
initial float support
includes right and left float
cannot have more than one float per line per side
floats do not extend beyond enclosing block

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.57  2004/11/03 23:54:32  joshy
added hamlet and tables to the browser
more support for absolute layout
added absolute layout unit tests
removed more dead code and moved code into layout factory


Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.56  2004/11/03 15:17:03  joshy
added intial support for absolute positioning

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.55  2004/11/02 20:44:54  joshy
put in some prep work for float support
removed some dead debugging code
moved isBlock code to LayoutFactory

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.54  2004/10/31 21:30:43  tobega
is now sane without building jars

Revision 1.53  2004/10/28 02:13:38  joshy
finished moving the painting code into the renderers

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.52  2004/10/28 01:34:22  joshy
moved more painting code into the renderers

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.51  2004/10/26 00:13:13  joshy
added threaded layout support to the HTMLPanel


Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.50  2004/10/22 14:07:10  joshy
added homepage link
Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.49  2004/10/22 13:48:05  joshy
added missing files and a quick change to fix upload support for docs

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.48  2004/10/19 18:11:07  pdoubleya
Synchronized with test build file. CLASSPATH and other paths are now externalized in set references (fileset, patternset). Docs now uses build file javadoc target to run javadoc routine.

Revision 1.47  2004/10/19 15:00:51  joshy
updated the build file
removed some extraneous files
update the home page to point to the new jnlp files
updated the resource loader to use the marker class
updated the text of the about box

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.46  2004/10/19 14:17:30  joshy
merged the build2.xml into the build.xml
added docs and docs upload targets
updated the classpath for the jnlps
added jar files

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.45  2004/10/18 23:43:02  joshy
final updates today

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.44  2004/10/18 22:54:50  joshy
added r4 distribution
Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.43  2004/10/18 15:29:29  joshy
split the layout into two classes
made layout be an interface instead of a class.
moved the layout code into default layout.


Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.42  2004/10/18 15:00:42  joshy
added comments and correct logging to the layout factory
made layout factory use a hashtable instead of conditionals.
made layout factory reuse layout object instances

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.41  2004/10/18 14:19:34  joshy
removed build file reference to the logging properties file

Issue number:
Obtained from:
Submitted by:
Reviewed by:

Revision 1.40  2004/10/18 10:08:19  pdoubleya
Moved default property settings into build file itself. Now looks for build.properties as override, and a local properties file in userhome/.flyingsaucer/flyingsaucer.build.properties.

Revision 1.39  2004/10/13 22:55:36  pdoubleya
Added system property to auto-load configuration for logging system.

-->
