PageRenderTime 118ms CodeModel.GetById 115ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/XML/build.xml

#
XML | 133 lines | 94 code | 16 blank | 23 comment | 0 complexity | 63145e46a87aa3e2a437964b4b19f558 MD5 | raw file
  1<project name="XML" default="build" basedir=".">
  2<!--
  3     This is a build.xml file for building the XML plugin.
  4
  5     The 'dist' target compiles the plugin and creates the JAR file.
  6     Before running the 'dist' target, you will need to generate the
  7          documentation using xsltproc from xmllib
  8     To use this template for building your own plugin, make these changes:
  9
 10     - Change 'name' property for the <project> to the name of your plugin
 11     - If necessary, add any dependencies to the 'project.class.path' definition
 12     - If necessary, change the list of files in the 'packageFiles' selector
 13-->
 14    <property file="build.properties"/>
 15    <property file="../build.properties"/>
 16
 17	<!-- You should set this property below in your ../build.properties to
 18	     the location of the jedit's "build-support/trunk" project
 19	     checked out from jEdit's SVN repository -->
 20    <property name="build.support" value="../build-support" />
 21    <property name="docs-proc.target"       value="xsltproc" />
 22    <property name="javadoc.packagenames"	value="xml.*, sidekick.*" />
 23    <property name="build.dir" value="build"/>
 24    <property name="install.dir"  value="../"/>
 25    <property name="jedit.plugins.dir" value="${install.dir}" />
 26    <property name="lib.dir" value="lib" />
 27
 28    <!-- set this property if we wanted to chunk the user manual :
 29    <property name="docbook.xsl.sheet" value="html/chunk.xsl" />
 30    -->
 31
 32    <import file="${build.support}/plugin-build.xml" />
 33
 34
 35    <target name="build.prepare">
 36        <copy todir="${install.dir}">
 37          <fileset dir="lib" includes="*.jar" />
 38        </copy>
 39    </target>
 40
 41    <!-- exclude the test directory -->
 42    <selector id="compileFiles">
 43    	<or>
 44        	<filename name="sidekick/**/*.java" />
 45        	<filename name="xml/**/*.java" />
 46        </or>
 47    </selector>
 48
 49    <selector id="packageFiles">
 50            <or>
 51                <filename name="docs/*.html" />
 52                <filename name="docs/*.txt" />
 53                <filename name="icons/*.gif" />
 54                <filename name="icons/*.png" />
 55                <filename name="xml/**/*.xml" />
 56                <filename name="xml/**/catalog" />
 57                <filename name="xml/**/*.xsd" />
 58                <filename name="xml/**/*.ent" />
 59                <filename name="xml/**/*.mod" />
 60                <filename name="xml/**/*.png" />
 61                <filename name="xml/**/*.dtd" />
 62                <filename name="xml/**/*.rng" />
 63                <filename name="xml/**/*.rnc" />
 64                <filename name="templates/**/*.vm" />
 65            </or>
 66    </selector>
 67
 68    <path id="project.class.path">
 69        <pathelement location="${ant.home}/lib/ant.jar" />
 70        <pathelement location="${lib.dir}/jing.jar"/>
 71        <pathelement location="${lib.dir}/trang.jar"/>
 72        <pathelement location="${lib.dir}/relaxngDatatype.jar"/>
 73        <pathelement location="${jedit.install.dir}/jedit.jar"/>
 74        <pathelement location="${jedit.plugins.dir}/Beauty.jar"/>
 75        <pathelement location="${jedit.plugins.dir}/ErrorList.jar"/>
 76        <pathelement location="${jedit.plugins.dir}/SideKick.jar"/>
 77        <pathelement location="${jedit.plugins.dir}/resolver.jar"/>
 78        <pathelement location="${jedit.plugins.dir}/xercesImpl.jar"/>
 79        <pathelement location="${jedit.plugins.dir}/CommonControls.jar"/>
 80        <pathelement location="${jedit.plugins.dir}/kappalayout.jar"/>
 81        <pathelement location="${jedit.plugins.dir}/EclipseIcons.jar"/>
 82        <pathelement location="${jedit.plugins.dir}/Hyperlinks.jar"/>
 83        <pathelement location="${jedit.plugins.dir}/Templates.jar"/>
 84        <pathelement location="."/>
 85    </path>
 86
 87    <echo>project.class.path = ${toString:project.class.path}</echo>
 88
 89    <!-- Generate ant-complete.xml file with AntComplete task 
 90         you may need commons-net-1.4.jar in your ~/.ant/lib dir for this to
 91         work -->
 92    <target name="ant-complete" depends="compile"
 93         description="generate completion info for ant build files based on current version of ant">
 94        <taskdef name="antcomplete" classname="xml.completion.AntCompleteTask" classpath="${build.classes}"/>
 95        <antcomplete output="${src.dir}/xml/completion/ant-complete.xml"/>
 96    </target>
 97
 98    <target name="jar" depends="ant-complete, build"
 99       description="builds jar + ant-completion info" />
100
101    <target name="dist" depends="docs, jar"
102       description="The whole shebang" />
103
104    <target name="javacc" description="Runs javacc compiler on *.jj files.">
105        <condition property="javacchome.set">
106            <isset property="javacchome"/>
107        </condition>
108        <fail unless="javacchome.set" message="Property 'javacchome' needs to be set."/>
109        <javacc javacchome="${javacchome}" target="./sidekick/html/parser/html/HtmlParser.jj"/>
110        <jjtree javacchome="${javacchome}"
111            target="./sidekick/ecmascript/parser/EcmaScript.jjt"
112        outputdirectory="./sidekick/ecmascript/parser"/>
113        <javacc javacchome="${javacchome}" target="./sidekick/ecmascript/parser/EcmaScript.jj"/>
114        <javacc javacchome="${javacchome}" target="./sidekick/css/parser/CSS3Parser.jj"/>
115        <javacc javacchome="${javacchome}" target="./xml/parser/javacc/XmlParser.jj"/>
116        
117    </target>
118
119    <!-- Generate tags using 'ctags' program from ctags.sourceforge.net -->
120    <target name="tags">
121        <exec executable="ctags">
122            <arg value="-R" />
123            <arg path="." />
124        </exec>
125    </target>
126
127    <target name="test" description="run current unit tests" depends="build">
128 	    <ant dir="test" inheritAll="false" target="test" useNativeBasedir="true"/>
129 	</target>
130    <target name="test-all" description="run all unit tests" depends="build">
131    	<ant dir="test" inheritAll="false" target="test-all"/>
132    </target>
133</project>