File: build.xml

package info (click to toggle)
jswat2 2.37-1
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k
  • size: 7,092 kB
  • ctags: 5,592
  • sloc: java: 43,576; xml: 1,086; sh: 66; makefile: 57
file content (160 lines) | stat: -rw-r--r-- 5,702 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?xml version="1.0"?>

<!--
        Copyright (C) 2003-2005 Nathan Fiedler

  Use Aapche Ant (version 1.6 or better) to process this build file and
  create a build of the jEdit JSwat plugin. Personalized build
  properties should be placed in the build.properties file in this
  directory.

  $Id: build.xml 1501 2005-02-12 07:56:17Z nfiedler $
-->

<project name="jEdit Plugin" default="release" basedir=".">

  <property file="build.properties"/>
  <property name="jar.plugin" value="JSwatPlugin.jar"/>
  <property name="jar.jswat" value="jswat.jar"/>
  <property name="lib.dir" value="lib"/>
  <property name="source" value="classes"/>
  <property name="build.dir" value="build"/>
  <property name="classes" value="${build.dir}/classes"/>
  <property name="bindist" value="${build.dir}/dist"/>
  <property name="srcdist" value="${build.dir}/src"/>
  <property name="pkgpath" value="com/bluemarsh/jswat/plugins/jedit"/>
  <property name="compile.dbg" value="on"/>
  <property name="compile.source" value="1.4"/>
  <property name="compile.target" value="1.4"/>
  <property name="install.dir" value=".."/>
  <property name="jedit.install.dir" value="../.."/>
  <property name="install.dir" value=".."/>

  <target name="prepare">
    <available property="haveLib" file="${lib.dir}/${jar.jswat}"/>
    <mkdir dir="${classes}"/>
    <mkdir dir="${bindist}"/>
    <mkdir dir="${srcdist}"/>
  </target>

  <target name="init" depends="prepare" unless="haveLib"
    description="Copies external jars to lib directory.">
    <!-- This assumes we are in the JSwat source tree. -->
    <mkdir dir="${lib.dir}"/>
    <copy todir="${lib.dir}" flatten="true">
      <fileset dir="../../classes/ext">
        <include name="*.jar"/>
      </fileset>
      <fileset file="../../build/dist/${jar.jswat}"/>
    </copy>
    <!-- Rename this file to be as unique as possible. -->
    <move file="${lib.dir}/parser.jar" tofile="${lib.dir}/jswat-parser.jar"/>
  </target>

  <target name="clean" description="Removes the generated files.">
    <delete dir="${build.dir}"/>
    <delete>
      <fileset dir="." defaultexcludes="no">
        <include name="**/*~"/>
      </fileset>
    </delete>
  </target>

  <target name="cleaner" depends="clean" description="Removes everything.">
    <delete dir="${lib.dir}"/>
  </target>

  <target name="compile" depends="prepare, init"
    description="Compiles the plugin.">
    <!--<available property="haveJEdit" classname="org.gjt.sp.jedit.jEdit"/>-->
    <!--
    <fail unless="haveJEdit">
      Class org.gjt.sp.jedit.jEdit not available.
      Add jedit.jar to CLASSPATH environment variable.
    </fail>
    -->
    <javac srcdir="${source}" destdir="${classes}" deprecation="on"
           debug="${compile.dbg}" source="${compile.source}"
           target="${compile.target}">
      <classpath>
        <!-- Java Debug Interface -->
        <pathelement location="${java.home}/../lib/tools.jar"/>
        <!-- External jars -->
        <fileset dir="${lib.dir}">
          <include name="*.jar"/>
        </fileset>
        <!-- The plugin -->
        <pathelement location="${classes}"/>
        <pathelement location="${jedit.install.dir}/jedit.jar"/>
        <!-- for building from ~/.jars -->
        <pathelement location="${install.dir}/jswat.jar"/>
        <pathelement location="${install.dir}/jswat-parser.jar"/>
        <pathelement location="${install.dir}/jclasslib.jar"/>
      </classpath>
    </javac>
  </target>

  <target name="binjar" depends="compile"
    description="Makes the plugin jar file.">
    <jar jarfile="${bindist}/${jar.plugin}">
      <fileset dir="${classes}"/>
      <fileset dir=".">
        <include name="actions.xml"/>
        <include name="dockables.xml"/>
        <include name="README.html"/>
      </fileset>
      <fileset dir="${source}">
        <include name="**/*.properties"/>
        <include name="**/*.gif"/>
        <include name="**/*.props"/>
      </fileset>
    </jar>
  </target>

  <!-- Target for the jEdit plugin central packager to run. -->
  <target name="release" depends="binjar"
    description="Copies all the jar files to 'install.dir'">
    <mkdir dir="${install.dir}"/>
    <copy todir="${install.dir}">
      <fileset file="${bindist}/${jar.plugin}"/>
      <fileset dir="${lib.dir}">
        <include name="*.jar"/>
      </fileset>
    </copy>
  </target>

  <target name="dist" depends="binjar"
    description="Produces the binary and source packages.">
    <!-- Get the release version number from the JSwat.props file. -->
    <loadproperties srcFile="${source}/${pkgpath}/JSwat.props">
      <filterchain>
        <linecontains>
          <contains value="plugin.com.bluemarsh.jswat.plugins.jedit.JSwatPlugin.version"/>
        </linecontains>
      </filterchain>
    </loadproperties>
    <property name="version" value="${plugin.com.bluemarsh.jswat.plugins.jedit.JSwatPlugin.version}"/>
    <echo message="Plugin version number is: ${version}"/>

    <!-- Make the binary distributable. -->
    <copy todir="${bindist}" flatten="true">
      <fileset dir="${lib.dir}">
        <include name="*.jar"/>
      </fileset>
    </copy>
    <zip destfile="JSwatPlugin-${version}.zip" basedir="${bindist}"/>

    <!-- Make the source distributable. -->
    <!-- Do not include version in the directory name. -->
    <mkdir dir="${srcdist}/JSwatPlugin"/>
    <copy todir="${srcdist}/JSwatPlugin">
      <fileset dir=".">
        <exclude name="*.gz"/>
        <exclude name="*.zip"/>
        <exclude name="${build.dir}/**"/>
        <exclude name="build.properties"/>
      </fileset>
    </copy>
    <zip destfile="JSwatPlugin-src-${version}.zip" basedir="${srcdist}"/>
  </target>
</project>