PageRenderTime 50ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

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

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