/plugins/Navigator/tags/release-1-6/build.xml

# · XML · 150 lines · 79 code · 29 blank · 42 comment · 0 complexity · 2bd94930ed6cea8bdfcde63ef86ba3c4 MD5 · raw file

  1. <project name="Navigator Plugin" default="dist" basedir=".">
  2. <!-- $Id: build.xml 8310 2007-01-04 23:47:06Z shlomy $ -->
  3. <!-- read build.props to override the properties set below -->
  4. <property file="../build.properties" />
  5. <property file="./NavigatorPlugin.props" />
  6. <property file="build.props"/>
  7. <!-- jar name -->
  8. <property name="jar.name" value="Navigator.jar"/>
  9. <!-- version number -->
  10. <property name="build.num" value="${plugin.ise.plugin.nav.NavigatorPlugin.version}" />
  11. <!-- where to put the finished plugin -->
  12. <property name="install.dir" value=".." />
  13. <property name="jedit.install.dir" location="c:/program files/jedit"/>
  14. <property name="build.dir" location="build" />
  15. <!-- source code directory, this is where the .java files live -->
  16. <property name="src.dir" location="src" />
  17. <!-- where to put distribution files -->
  18. <property name="dist.dir" location="dist"/>
  19. <!-- ========================================================================
  20. Target: set classpath
  21. ========================================================================= -->
  22. <target name="setClasspath">
  23. <path id="classpathref">
  24. <!-- required locations/jars -->
  25. <pathelement location="${build.dir}" />
  26. <pathelement path="${java.class.path}"/>
  27. <!-- required for jEdit plugin -->
  28. <pathelement location="${jedit.install.dir}/jedit.jar" />
  29. </path>
  30. </target>
  31. <target name="clean" description="Clean">
  32. <delete dir="${build.dir}"/>
  33. <delete dir="${dist.dir}"/>
  34. </target>
  35. <!-- ========================================================================
  36. Target: compile
  37. ========================================================================= -->
  38. <target name="compile"
  39. description="Compile"
  40. depends="init,setClasspath">
  41. <echo>compiling</echo>
  42. <javac deprecation="on"
  43. debug="${compiler.debug}"
  44. nowarn="on"
  45. destdir="${build.dir}"
  46. srcdir="${src.dir}">
  47. <classpath refid="classpathref" />
  48. </javac>
  49. </target>
  50. <!-- ========================================================================
  51. Target: plugin
  52. creates jar file suitable for dropping into jEdit, and puts it in the
  53. jedit.jars.dir
  54. ========================================================================= -->
  55. <target name="dist" depends="plugin" description="build and install plugin" />
  56. <target name="plugin"
  57. description="Compiles, jars, puts the jar in the jEdit jars directory."
  58. depends="init,compile,prepare">
  59. <echo>creating plugin</echo>
  60. <!--
  61. <delete>
  62. <fileset dir="${install.dir}" includes="**/${jar.name}"/>
  63. </delete>
  64. -->
  65. <!-- make the plugin jar file -->
  66. <tstamp/>
  67. <jar jarfile="${dist.dir}/${jar.name}">
  68. <manifest>
  69. <attribute name="AppName" value="${app.name}" />
  70. <attribute name="AppVersion" value="${build.num}" />
  71. <attribute name="Author" value="Dale Anson"/>
  72. <attribute name="Created-By" value="${user.name}" />
  73. <attribute name="Created-On" value="${TODAY}"/>
  74. </manifest>
  75. <!-- include everything in the build directory -->
  76. <fileset dir="${build.dir}">
  77. <include name="**/*" />
  78. </fileset>
  79. </jar>
  80. <!-- copy the plugin jar to the jedit plugin directory -->
  81. <copy file="${dist.dir}/${jar.name}" todir="${install.dir}"/>
  82. </target>
  83. <!-- ========================================================================
  84. Target: prepare
  85. prepares certain files for distribution by doing string replacement.
  86. Assumes that the configuration files and documentation files are ready.
  87. ========================================================================= -->
  88. <target name="prepare">
  89. <echo>preparing files</echo>
  90. <!-- copy the config files to deployment directory -->
  91. <copy todir="${build.dir}">
  92. <fileset dir="${basedir}" >
  93. <include name="*.xml" />
  94. <include name="*.prop*" />
  95. <include name="*.html" />
  96. </fileset>
  97. </copy>
  98. <!-- insert the build number/date into the documentation -->
  99. <tstamp />
  100. <replace dir="${build.dir}" >
  101. <include name="*.html" />
  102. <replacefilter token="@@build.num@@"
  103. value="${build.num}" />
  104. <replacefilter token="@@tstamp@@"
  105. value="${TODAY}" />
  106. </replace>
  107. </target>
  108. <!-- ========================================================================
  109. Target: init
  110. this target creates the directories needed for this project and
  111. only needs to be done once.
  112. ========================================================================= -->
  113. <target name="init"
  114. description="Create directory structure.">
  115. <fail unless="jedit.install.dir" message="Please set jedit.install.dir property."/>
  116. <!-- all source code, including actions.xml, props, dockables, docs, and
  117. .java files are in src.dir -->
  118. <mkdir dir="${build.dir}" />
  119. <mkdir dir="${dist.dir}"/>
  120. </target>
  121. </project>