/plugins/JUnitPlugin/tags/release_0_5/JUnitPlugin/build.xml
XML | 206 lines | 107 code | 22 blank | 77 comment | 0 complexity | 8488660a12bb8a2807fd29e87c8821ec MD5 | raw file
- <?xml version="1.0"?>
- <!-- :tabSize=2:indentSize=2:noTabs=false: -->
- <!-- :folding=explicit:collapseFolds=1: -->
- <!--
- This is the standard build.xml file for building a jEdit plugin.
- The 'dist' target compiles the plugin, generates documentation, and creates
- the JAR file. Before running the 'dist' target, you will need to choose
- whether to generate the documentation using one of these two targets:
- - 'docs-xsltproc': Creates documentation using the xsltproc tool from
- libxslt, available at http://xmlsoft.org/XSLT
- - 'docs-xalan': Creates documentation using the Xalan XSLT processor,
- available at http://xml.apache.org/
- The default processor is xsltproc. You can change the processor to Xalan by
- setting the 'docs-proc.target' property to xalan. This can be done on the
- command line by adding '-Ddocs-proc.target=xalan' or in any of the
- build.properties files that are imported. If you do not have any
- documentation, set the 'build-docs.not-required' property to any value and
- the 'docs' target will be skipped.
- To use this template for building your own plugin, make these changes:
- - Change 'name' property for the <project> to the name of your plugin
- - Change definition of 'jedit.install.dir' to point to the directory
- containing jedit.jar
- - If necessary, add any dependencies to the 'project.class.path' definition
- - If necessary, change the list of files in the 'dist' target
- All properties specified in this build.xml can be overridden by properties
- file in the following locations:
- - ${base.dir}/build.properties : Specify properties that are to affect this
- project only.
- - ../build.properties : If building from CVS, this file comes in handy
- because it allows you to specify properties that affect all plugins.
- - ${user.home}/.build.properties : Allows you to specify global properties
- that are to be shared across all Ant projects. This file is hidden by
- unix file standard.
- - ${user.home}/.build.properties : Allows you to specify global properties
- that are to be shared across all Ant projects.
- When the same property is specified across the different properties file,
- the following precendence order applies - ${base.dir}/bulid.properties ->
- ../build.properties -> ${user.home}/.build.properties ->
- ${user.home}/build.properties.
- -->
- <project name="JUnitPlugin" default="dist" basedir=".">
- <!-- {{{ Properties -->
- <property file="build.properties"/>
- <property file="../build.properties"/>
- <property file="${user.home}/.build.properties"/>
- <property file="${user.home}/build.properties"/>
- <property name="jar.name" value="${ant.project.name}.jar"/>
- <property name="docs-proc.target" value="xsltproc"/>
- <property name="docbook.xsl" value="${docbook.xsl}"/>
- <property name="src.dir" value="."/>
- <property name="install.dir" value="${jedit.install.dir}/jars"/>
- <property name="build.dir" value="build"/>
- <property name="compiler.deprecation" value="true"/>
- <property name="compiler.optimize" value="false"/>
- <property name="compiler.verbose" value="false"/>
- <property name="compiler.debug" value="true"/>
- <property name="junit.jar" value="${install.dir}/junit.jar"/>
- <property name="ProjectViewer.jar" value="${install.dir}/ProjectViewer.jar"/>
- <!-- }}} -->
- <!-- {{{ Patterns -->
- <!--
- Put patterns here that should be included in the plugin jar from
- the source directory.
- -->
- <patternset id="include-from-source">
- <include name="dockables.xml"/>
- <include name="actions.xml"/>
- <include name="docs/**/*.*"/>
- <include name="**/*.properties"/>
- <include name="**/*.props"/>
- <include name="**/*.gif"/>
- <include name="**/*.png"/>
- </patternset>
- <!-- }}} -->
- <!-- {{{ Paths -->
- <path id="project.class.path">
- <pathelement location="${jedit.install.dir}/jedit.jar"/>
- <pathelement location="${CommonControls.jar}"/>
- <pathelement location="${ProjectViewer.jar}"/>
- <pathelement location="${junit.jar}"/>
- <pathelement location="${src.dir}"/>
- </path>
- <!-- }}} -->
- <!-- {{{ Targets -->
- <!-- {{{ 'init' target -->
- <target name="init" description="Initializes this project">
- <mkdir dir="${build.dir}"/>
- <delete file="docbook-wrapper.xsl" />
- <echo file="docbook-wrapper.xsl"
- message="<xsl:stylesheet"/>
- <echo file="docbook-wrapper.xsl" append="true"
- message=" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'"/>
- <echo file="docbook-wrapper.xsl" append="true"
- message=" version='1.0'>"/>
- <echo file="docbook-wrapper.xsl" append="true"
- message="<xsl:import href='${docbook.xsl}/html/chunk.xsl'/>"/>
- <echo file="docbook-wrapper.xsl" append="true"
- message="</xsl:stylesheet>"/>
- <available file="users-guide.xsl" property="users-guide.xsl" value="users-guide.xsl"/>
- <antcall target="init-users-guide"/>
- <property name="users-guide.xsl" value="default-users-guide.xsl"/>
- <available file="users-guide.xml" property="call.docs"/>
- <uptodate property="build-docs.not-required"
- targetfile="${build.dir}/users-guide.html">
- <srcfiles dir="." includes="users-guide.xml"/>
- </uptodate>
- </target>
- <!-- }}} -->
- <!-- {{{ 'init-users-guide' target -->
- <target name="init-users-guide" unless="users-guide.xsl"
- description="Create a users-guide.xsl if one doesn't exist">
- <copy tofile="default-users-guide.xsl" file="../users-guide.xsl"/>
- </target>
- <!-- }}} -->
- <!-- {{{ 'compile' target -->
- <target name="compile" depends="init" description="Compile project files">
- <javac srcdir="${src.dir}" destdir="${build.dir}"
- includeJavaRuntime="yes" verbose="${compiler.verbose}"
- optimize="${compiler.optimize}" debug="${compiler.debug}"
- deprecation="${compiler.deprecation}">
- <classpath refid="project.class.path"/>
- </javac>
- </target>
- <!-- }}} -->
- <!-- {{{ 'dist' target -->
- <target name="dist" depends="compile, docs" description="Builds the plugin jar">
- <mkdir dir="${install.dir}"/>
- <jar jarfile="${install.dir}/${jar.name}">
- <fileset dir="${build.dir}"/>
- <fileset dir="${src.dir}">
- <patternset refid="include-from-source"/>
- </fileset>
- </jar>
- </target>
- <!-- }}} -->
- <!-- {{{ 'docs' target -->
- <target name="docs" depends="init" if="call.docs" unless="build-docs.not-required"
- description="Builds users guide documentation">
- <antcall target="docs-${docs-proc.target}"/>
- </target>
- <!-- }}} -->
- <!-- {{{ 'docs-xsltproc' target -->
- <target name="docs-xsltproc"
- description="Generate docs with xsltproc tool from www.xmlsoft.org">
- <exec executable="${xsltproc}">
- <arg value="--output"/><arg value="${build.dir}/index.html"/>
- <arg value="--catalogs"/>
- <arg value="${users-guide.xsl}"/>
- <arg value="users-guide.xml"/>
- </exec>
- </target>
- <!-- }}} -->
- <!-- {{{ 'docs-xalan' target -->
- <target name="docs-xalan"
- description="Generate docs with Xalan tool from xml.apache.org">
- <style style="${users-guide.xsl}" in="users-guide.xml"
- out="${build.dir}/index.html"/>
- </target>
- <!-- }}} -->
- <!-- {{{ 'clean' target -->
- <target name="clean" description="Clean project directory">
- <delete dir="${build.dir}"/>
- <delete>
- <fileset dir="." defaultexcludes="no">
- <include name="**/*~"/>
- <include name="**/*.html"/>
- <include name="docbook-wrapper.xsl"/>
- <include name="default-users-guide.xsl"/>
- </fileset>
- </delete>
- </target>
- <!-- }}} -->
- <!-- }}} -->
- </project>