Show build.xml syntax highlighted
<!-- DrJava Documentation Build Script -->
<!-- This build script is based on the template located at "trunk/misc/build-template.xml"
in the DrJava Subversion repository. In general, changes made to the script should be
reflected in the template as well. -->
<project name="docs" default="help">
<property name="readable-project-name" value="DrJava Documentation" />
<property name="svn-repository" value="https://svn.sourceforge.net/svnroot/drjava" />
<property environment="env" />
<!-- By default, clean can fail -->
<property name="clean-can-fail" value="yes" />
<!-- By default, don't append anything extra to the tag -->
<property name="tag-append" value="" />
<!-- Don't use or inherit the CLASSPATH environment variable for anything -->
<property name="build.sysclasspath" value="ignore" />
<fileset id="libs" dir="lib" includes="*.jar" /> <!-- Only include jars that are at the top level (not in buildlib) -->
<!-- ***********
Help Target
*********** -->
<target name="help" description="Print general build script information">
<echo message="--------------------------------------------------------------------" />
<echo message="${readable-project-name} Build Scripts" />
<echo message="--------------------------------------------------------------------" />
<echo message="Type 'ant -projecthelp' or 'ant -p' to see the list of targets." />
<echo message="" />
<echo message="For this build file to function properly, the following environment " />
<echo message="variables should be defined:" />
<echo message="PATH: 'svn' needs to refer to the Subversion client executable;" />
<echo message=" 'docbook2html' and 'docbook2pdf' should also be available." />
<echo message="" />
<echo message="Ant may also require ANT_HOME to be set. Note that the value of " />
<echo message="CLASSPATH will be ignored -- classes on the system classpath will " />
<echo message="not be visible during the build process." />
</target>
<!-- ************
Build Target
************ -->
<target name="build" depends="doc-html, jar"
description="Shortcut for 'doc-html' and 'jar'">
</target>
<!-- ***********
Jar Targets
*********** -->
<target name="jar" depends="doc-html, resolve-version-tag"
description="Create the jar file with distributed docs (generating html docs first)">
<jar jarfile="${ant.project.name}.jar">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Build-Version" value="${version-tag}" />
</manifest>
<zipfileset dir="docs" prefix="edu/rice/cs/drjava/docs" includes="user/**" />
<zipfileset dir="docs" prefix="edu/rice/cs/drjava/docs" includes="quickstart/**" />
</jar>
</target>
<!-- *********************
Documentation Targets
********************* -->
<target name="doc" depends="doc-html, doc-pdf" description="Shortcut for 'doc-html' and 'doc-pdf'">
</target>
<target name="doc-html" description="Generate all html documentation">
<echo message="Creating html documentation" />
<antcall target="run-docbook2html">
<param name="docbook-dir" value="user" />
<param name="docbook-srcfile" value="userdoc.docbook" />
</antcall>
<antcall target="run-docbook2html">
<param name="docbook-dir" value="quickstart" />
<param name="docbook-srcfile" value="quickstart.docbook" />
</antcall>
<antcall target="run-docbook2html">
<param name="docbook-dir" value="developer" />
<param name="docbook-srcfile" value="devdoc.docbook" />
</antcall>
<antcall target="copy-resources" />
</target>
<target name="doc-pdf" description="Generate all pdf documentation">
<echo message="Creating pdf documentation" />
<antcall target="run-docbook2pdf" inheritall="false">
<param name="docbook-dir" value="user" />
<param name="docbook-srcfile" value="userdoc.docbook" />
</antcall>
<antcall target="run-docbook2pdf" inheritall="false">
<param name="docbook-dir" value="quickstart" />
<param name="docbook-srcfile" value="quickstart.docbook" />
</antcall>
<antcall target="run-docbook2pdf" inheritall="false">
<param name="docbook-dir" value="developer" />
<param name="docbook-srcfile" value="devdoc.docbook" />
</antcall>
</target>
<target name="run-docbook2html" depends="assert-docbook2html-present">
<mkdir dir="docs/${docbook-dir}" />
<apply executable="docbook2html" failonerror="yes" type="file">
<arg value="-o" />
<arg value="docs/${docbook-dir}" />
<arg value="-V" />
<arg value="%use-id-as-filename%" />
<fileset dir="src/${docbook-dir}">
<include name="${docbook-srcfile}" />
</fileset>
</apply>
</target>
<target name="run-docbook2pdf" depends="assert-docbook2pdf-present">
<mkdir dir="docs/${docbook-dir}" />
<apply executable="docbook2pdf" failonerror="yes" type="file">
<arg value="-o" />
<arg value="docs" />
<fileset dir="src/${docbook-dir}">
<include name="${docbook-srcfile}" />
</fileset>
</apply>
</target>
<target name="copy-resources">
<copy todir="docs">
<fileset dir="src">
<include name="**/LICENSE" />
<include name="**/README" />
<include name="**/*.gif" />
<include name="**/*.png" />
<include name="**/*.jpg" />
<include name="**/*.jpeg" />
<include name="**/*.properties" />
<!-- Additional resource files should be listed here -->
</fileset>
</copy>
</target>
<!-- *************
Clean Targets
************* -->
<target name="clean" depends="clean-intermediate, clean-products"
description="Remove all build products; the result should match the intended Subversion contents">
</target>
<target name="clean-intermediate" unless="skip-clean">
<echo message="Deleting all intermediate build products" />
<delete includeemptydirs="true" failonerror="${clean-can-fail}">
<fileset dir="${basedir}" defaultexcludes="no">
<!-- We could get rid of backups, but "update" ignores them, so they're okay.
(doesn't work if defaultexcludes is "yes") -->
<!-- <include name="**/*~" /> -->
<!-- Get rid of pesky OS helper files (doesn't work if defaultexcludes is "yes") -->
<include name="**/.DS_Store" />
<include name="**/Thumbs.db" />
<!-- Additional files to delete may be listed here -->
</fileset>
</delete>
</target>
<target name="clean-products" unless="skip-clean">
<echo message="Deleting all final build products" />
<delete dir="docs" failonerror="${clean-can-fail}" />
<delete includeemptydirs="true" failonerror="${clean-can-fail}">
<fileset dir="${basedir}" defaultexcludes="no">
<include name="*.jar" />
<include name="*.zip" />
<include name="*.tar.gz" />
<include name="${ant.project.name}-*" />
</fileset>
</delete>
</target>
<!-- ******************
Subversion Targets
****************** -->
<target name="update" depends="clean" description="Reconcile source with the Subversion archive">
<echo message="Running Subversion update" />
<exec executable="svn" failonerror="yes">
<arg value="update" />
</exec>
<exec executable="svn" failonerror="yes">
<arg value="status" />
</exec>
</target>
<target name="commit" depends="update, build"
description="Commit source to the Subversion archive (after building)">
<antcall target="clean-intermediate"> <!-- Clean up after the latest build -->
<param name="clean-can-fail" value="no" />
</antcall>
<exec executable="svn" failonerror="yes">
<arg value="status" />
</exec>
<input message="Please enter a log message for the commit: "
addproperty="svn-commit-message" />
<echo message="Running Subversion commit" />
<exec executable="svn" failonerror="yes">
<arg value="commit" />
<arg value="-m" />
<arg value="${svn-commit-message}" />
</exec>
</target>
<target name="tag" depends="update, resolve-version-tag"
description="Copy the working copy to a new Subversion tag (after updating)">
<echo message="Creating a new Subversion tag with name ${version-tag}"/>
<exec executable="svn" failonerror="yes">
<arg value="copy" />
<arg value="${basedir}" />
<arg value="${svn-repository}/tags/${version-tag}" />
<arg value="-m" />
<arg value="Created tag ${version-tag}" />
</exec>
</target>
<target name="branch" depends="update"
description="Copy the working copy to a new Subversion branch (after updating)">
<echo message="This will create a new branch from your working copy. If there are changes " />
<echo message="in your copy that have not been committed, you may want to do so first, " />
<echo message="so that there's a clear branch point for merging later." />
<input message="Enter a name for the new branch: "
addproperty="svn-branch-name" />
<echo message="Creating a new Subversion branch ${svn-branch-name}" />
<exec executable="svn" failonerror="yes">
<arg value="copy" />
<arg value="${basedir}" />
<arg value="${svn-repository}/branches/${svn-branch-name}" />
<arg value="-m" />
<arg value="Created branch ${svn-branch-name}" />
</exec>
</target>
<!-- ***************
Release Targets
*************** -->
<target name="release-stable" description="Generate all release files tagged with 'stable'">
<antcall target="release">
<param name="tag-append" value="-stable" />
</antcall>
</target>
<target name="release-beta" description="Generate all release files tagged with 'beta'">
<antcall target="release">
<param name="tag-append" value="-beta" />
</antcall>
</target>
<target name="release"
depends="update, build, tag, jar-app, src-zip"
description="Generate all release files (after building)">
<delete dir="${version-tag}" />
</target>
<target name="jar-app" depends="assert-jar-exists, resolve-version-tag">
<echo message="Creating ${version-tag}.jar" />
<copy file="${ant.project.name}.jar" tofile="${version-tag}.jar" />
</target>
<target name="src-zip" depends="resolve-version-tag">
<echo message="Creating ${version-tag}-src.zip" />
<exec executable="svn" failonerror="yes">
<arg value="export" />
<arg value="${svn-repository}/tags/${version-tag}" />
<arg value="${version-tag}/src" />
</exec>
<zip destfile="${version-tag}-src.zip">
<zipfileset dir="${version-tag}/src" prefix="${version-tag}/src" />
</zip>
</target>
<!-- ********************************
Misc Occasionally-Useful Targets
******************************** -->
<patternset id="exclude-binaries">
<exclude name="**/*.jar" />
<exclude name="**/*.class" />
<exclude name="**/DrJava" />
<exclude name="**/*.png" />
<exclude name="**/*.icns" />
<exclude name="**/*.gif" />
<exclude name="**/*.jpg" />
<exclude name="**/*.jpeg" />
<!-- Additional binary types may be added here -->
</patternset>
<!-- Run a batch find-and-replace on all text files in the project.
Assumes the properties "find" and "replace" have been defined
(e.g. "ant -Dfind=foo -Dreplace=bar find-and-replace"). -->
<target name="find-and-replace">
<replace dir="${basedir}" token="${find}" value="${replace}" summary="yes">
<patternset refid="exclude-binaries" />
</replace>
</target>
<!-- Standardize all newline character sequences. Subversion takes care of this
automatically, but sometimes files crop up with the wrong sequence.
Use "svn status" after running this to see which files were fixed. -->
<target name="fix-newlines" description="Standardize newline character sequences in all text files">
<!-- If we're in Windows, use \r\n -->
<condition property="newline-code" value="crlf">
<os family="windows" />
</condition>
<!-- Otherwise, use \n -->
<property name="newline-code" value="lf" />
<fixcrlf srcdir="${basedir}" eol="${newline-code}" fixlast="no">
<patternset refid="exclude-binaries" />
</fixcrlf>
</target>
<!-- ***************************
Property-resolution Targets
*************************** -->
<target name="assert-docbook2html-present">
<available file="docbook2html" property="docbook2html-present" filepath="${env.PATH}" />
<fail message="The specified target requires docbook2html to be present on the path" unless="docbook2html-present" />
</target>
<target name="assert-docbook2pdf-present">
<available file="docbook2pdf" property="docbook2pdf-present" filepath="${env.PATH}" />
<fail message="The specified target requires docbook2pdf to be present on the path" unless="docbook2pdf-present" />
</target>
<target name="assert-jar-exists">
<available property="jar-exists" file="${ant.project.name}.jar" />
<fail message="Can't find ${ant.project.name}.jar" unless="jar-exists" />
</target>
<target name="resolve-version-tag">
<!-- Get a timestamp based on GMT, rather than local time -->
<tstamp>
<format property="DSTAMP" pattern="yyyyMMdd" timezone="GMT" />
<format property="TSTAMP" pattern="HHmm" timezone="GMT" />
<format property="TODAY" pattern="MMMM dd yyyy" timezone="GMT" />
</tstamp>
<property name="version-tag"
value="${ant.project.name}${tag-append}-${DSTAMP}-${TSTAMP}" />
</target>
<!-- Sets "already-generated" if "generate-file" is more recent than "generate-sourcefile";
otherwise, the out-of-date target file is deleted (if it exists). Note that, since
properties can only be set once, this should happen underneath an "antcall". -->
<target name="check-generate-file-from-file">
<dependset>
<srcfilelist dir="${basedir}" files="${generate-sourcefile}" />
<targetfilelist dir="${basedir}" files="${generate-file}" />
</dependset>
<available file="${generate-file}" property="already-generated" />
</target>
<!-- Sets "already-generated" if "generate-file" is more recent than everything in
"generate-sourcedir"; otherwise, the out-of-date target file is deleted (if it exists).
Note that, since properties can only be set once, this should happen underneath an "antcall". -->
<target name="check-generate-file-from-dir">
<dependset>
<srcfileset dir="${generate-sourcedir}" />
<targetfilelist dir="${basedir}" files="${generate-file}" />
</dependset>
<available file="${generate-file}" property="already-generated" />
</target>
<!-- Sets "already-generated" if "generate-dir" was created (or modified) more recently
than "generate-sourcefile". Note that, since properties can only be set once, this
should happen underneath an "antcall". -->
<target name="check-generate-dir-from-file">
<uptodate property="already-generated" targetfile="${generate-dir}" srcfile="${generate-sourcefile}" />
</target>
<!-- Sets "already-generated" if "generate-dir" was created (or modified) more recently
than everything in "generate-sourcedir". Note that, since properties can only be
set once, this should happen underneath an "antcall". -->
<target name="check-generate-dir-from-dir">
<!-- Unfortunately, a bug in uptodate prevents this from working properly,
so we just have to equate *existence* with being up to date.
<uptodate property="already-generated" targetfile="${generate-dir}" >
<srcfiles dir="${generate-sourcedir}" />
</uptodate>
-->
<available file="${generate-dir}" property="already-generated" />
</target>
</project>
See more files for this project here
DrJava is a lightweight programming environment for Java designed to foster test-driven software development. It includes an intelligent program editor, an interactions pane for evaluating program text, a source level debugger, and a unit testing tool.
Project homepage:
http://sourceforge.net/projects/drjava
Programming language(s): Java
License: other
src/
developer/
bestPractices.docbook
devdoc.docbook
gettingStarted.docbook
introduction.docbook
projectAdministration.docbook
supportingTechnology.docbook
systemArchitecture.docbook
quickstart/
BreakpointSet.jpg
BreakpointWatch.jpg
BreakpointsPanel.jpg
CompileOpenProjectFiles.jpg
CompileProject.jpg
CompilerErrors.jpg
CompilerOptions.jpg
CurrentStableRelease.jpg
DebuggerPreferences.jpg
DisplayOptions.jpg
DisplayOptionsColors.jpg
DisplayOptionsFonts.jpg
DownloadServer.jpg
EnableDebugMode.jpg
EnableDebugger.jpg
FindAll.jpg
FindReplace.jpg
FindReplaceTwoLines.jpg
FullTreeView.jpg
HitBreakpoint.jpg
InteractionsPane1Plus1.jpg
InteractionsPaneFull.jpg
InteractionsPanePackageImport.jpg
InteractionsPaneTom.jpg
InteractionsPaneTryMe.jpg
JDKDownload.jpg
JavaDocMenu.jpg
Javadoc.jpg
JavadocPreferences.jpg
KeyBindings.jpg
LanguageLevelFeatures.jpg
Miscellaneous.jpg
ModifyingFieldAtBreakpoint.jpg
NewProjectSaveDialog.jpg
Notifications.jpg
OpenDialog.jpg
PlainOldDrJava.jpg
PlainOldDrJavaDefault.jpg
ProjectCleanBuildDirectory.jpg
ProjectCompileFromSideMenu.jpg
ProjectCompileFromTopMenu.jpg
ProjectFolderOptions.jpg
ProjectMoveToAuxilliary.jpg
ProjectMoveToExternal.jpg
ProjectOpen.jpg
ProjectProperties.jpg
ProjectRunMainDocument.jpg
ProjectSaveDialogFromFiles.jpg
ProjectTest.jpg
ResourceLocation.jpg
SDKDownload.jpg
SaveDialog.jpg
StackStuff.jpg
SystemInInput.jpg
SystemInInputInteractionsPane.jpg
TestFails.jpg
TestOpenProjectFiles.jpg
TestProject.jpg
TestsPassed.jpg
Threads.jpg
ToggleBreakpoint.jpg
TreeView.jpg
VariableWatch.jpg
VariableWatch2.jpg
copyright.jpg
quickstart.docbook
user/
BraceMatching.jpg
LanguageLevelAugmentation.jpg
LanguageLevelFeatures.jpg
userdoc.docbook
build.xml