PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre5/jars/QuickNotepad/build.xml

#
XML | 110 lines | 62 code | 16 blank | 32 comment | 0 complexity | a2bd2fdc1fc1ac4bf83f626f15ed03e1 MD5 | raw file
  1<?xml version="1.0"?>
  2
  3<!--
  4     This is a build.xml file for building the QuickNotepad plugin.
  5
  6     The 'dist' target compiles the plugin and creates the JAR file.
  7     Before running the 'dist' target, you will need to generate the
  8     documentation using one of these two targets:
  9
 10     - 'docs-xalan': Creates documentation using the Xalan XSLT processor
 11     - 'docs-xsltproc': Creates documentation using the xsltproc tool
 12
 13     To use it for building your own plugin, make these changes:
 14
 15     - Change definition of 'jedit.install.dir' to point to the directory
 16       containing jedit.jar
 17     - Change definition of 'jar.name' to the name of your plugin's JAR file
 18     - If necessary, add any dependencies to the 'project.class.path'
 19       definition
 20     - If necessary, change the list of files in the 'dist' targtet
 21     - If your plugin has documentation generated using the DocBook XSL
 22       stylesheets, change the 'docs-xalan' and 'docs-xsltproc' targets
 23       accordingly.
 24-->
 25
 26<project name="QuickNotepad" default="dist" basedir=".">
 27
 28	<property name="jedit.install.dir"  value="G:\\Program Files\\jEdit 4.0pre1"/>
 29	<property name="jar.name"  value="QuickNotepad.jar"/>
 30
 31	<property name="src.dir" value="."/>
 32	<property name="build.dir" value="build"/>
 33	<property name="install.dir"  value=".."/>
 34
 35
 36	<path id="project.class.path">
 37		<pathelement location="${jedit.install.dir}/jedit.jar"/>
 38		<pathelement location="."/>
 39	</path>
 40
 41
 42	<target name="init">
 43		<mkdir dir="${build.dir}"/>
 44	</target>
 45
 46
 47	<target name="compile" depends="init">
 48		<javac
 49			srcdir="${src.dir}"
 50			destdir="${build.dir}"
 51			deprecation="on"
 52			includeJavaRuntime="yes"
 53		>
 54			<classpath refid="project.class.path"/>
 55		</javac>
 56	</target>
 57
 58
 59	<target name="dist" depends="compile">
 60		<mkdir dir="${install.dir}"/>
 61		<jar jarfile="${install.dir}/${jar.name}">
 62			<fileset dir="${build.dir}"/>
 63			<fileset dir="${src.dir}">
 64				<include name="actions.xml"/>
 65				<include name="dockables.xml"/>
 66				<include name="**/*.props"/>
 67				<include name="**/*.html"/>
 68				<include name="**/*.gif"/>
 69			</fileset>
 70		</jar>
 71	</target>
 72
 73	<!-- Generate docs with xsltproc tool from www.xmlsoft.org -->
 74	<!-- NOTE: the "o" or "output" options do not appear to be working.     -->
 75	<!-- To customize the title of an HTML output file, set the	     -->
 76	<!-- 'use.id.as.filename' variable in your XSL customization file       -->
 77	<!-- and provide the file name (without extension) as the 'id'	  -->
 78	<!-- attribute of the element that constitutes a 'chunk' of output. For -->
 79	<!-- a plugin help file, there should usually be only one chunk, so the -->
 80	<!-- top-level element (<article> or <book>) should have the 'id'       -->
 81	<!-- attribute.							 -->
 82	<target name="docs-xsltproc">
 83		<exec executable="xsltproc">
 84			<arg value="--catalogs"/>
 85			<arg value="--nonet"/>
 86			<arg value="--output"/>
 87			<arg value="QuickNotepad.html"/>
 88			<arg value="users-guide.xsl"/>
 89			<arg value="users-guide.xml"/>
 90		</exec>
 91	</target>
 92
 93	<!-- Generate docs with Xalan tool from xml.apache.org -->
 94	<target name="docs-xalan">
 95		<style
 96			style="users-guide.xsl"
 97			in="users-guide.xml"
 98			out="QuickNotepad.html"
 99			destdir="."/>
100	</target>
101
102	<target name="clean">
103		<delete dir="${build.dir}"/>
104		<delete>
105			<fileset dir="." includes="**/*~" defaultexcludes="no"/>
106			<fileset dir="." includes="**/*.html" defaultexcludes="no"/>
107		</delete>
108	</target>
109
110</project>