File: build.xml

package info (click to toggle)
libbsf-java 1%3A2.3.0%2Bcvs20050308a-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,460 kB
  • ctags: 1,264
  • sloc: java: 7,643; cpp: 2,514; xml: 1,773; jsp: 463; ansic: 182; makefile: 61; python: 45; sh: 29
file content (208 lines) | stat: -rw-r--r-- 8,050 bytes parent folder | download | duplicates (2)
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!-- ANT Build Script for the "bsf" Custom Tag Library -->
<project name="bsf" default="main" basedir=".">

    <!-- ******************** Adjustable Properties *********************** -->

    <!--

        The following property values should be examined and customized
        for each custom tag library subproject.

        ant.home                    Home directory for the ANT build tool
                                    This is normally defaulted from the
                                    ANT_HOME environment variable in the
                                    build script.

        servlet.jar                 Pathname of the servlet API classes
                                    you are using to compile, such as the
                                    one that comes with Tomcat.  This is
                                    normally defaulted from the SERVLET_JAR
                                    environment variable in the build script.

        taglib.name                 Base name of this tag library subproject.

    -->

    <property name="taglib.name"    value="bsf"/>
    <property name="ant.home"       value="../../jakarta-ant"/>
    <property name="servlet.jar"    value="../../jakarta-servletapi/lib/servlet.jar"/>


    <!-- ****************** Project Standard Properties ******************* -->

    <!--

        The following property values reflect the standard directory
        organization for the jakarta-taglibs project, and should not
        be changed or overridden.

        build.dir                   Base directory for build targets
        dist.dir                    Base directory for distribution targets
        taglibs.xsl                 Taglibs stylesheet

    -->

    <property name="build.dir"      value="../build"/>
    <property name="dist.dir"       value="../dist"/>
    <property name="taglibs.xsl"    value="src/doc/stylesheets/taglibs.xsl"/>

    <!-- *********************** Default Properties ********************** -->

    <!--

        The following property values reflect the recommended directory
        structure for each custom tag library subproject.  You should only
        need to adjust or override them if you use a different organization.

        conf.src                    Library configuration source directory
        doc.src                     Documentation app source directory
        examples.src                Examples app source directory
        library.src                 Library Java source directory

    -->

    <property name="conf.src"       value="conf"/>
    <property name="doc.src"        value="doc"/>
    <property name="examples.src"   value="examples"/>
    <property name="library.src"    value="src"/>
    <property name="lib.src"        value="lib"/>


    <!-- ********************* Derived Properties ************************* -->

    <!--

        These property values are derived from the previously defined values,
        and should not normally be overridden from the command line.

        build.doc                   Target directory for documentation app
        build.examples              Target directory for examples app
        build.library               Target directory for tag library
        dist.doc                    Destination WAR for documentation app
        dist.examples               Destination WAR for examples app
        dist.library                Destination JAR for tag library
        dist.tld                    Destination TLD file for tag library

    -->

    <property name="build.doc"      value="${build.dir}/${taglib.name}-doc"/>
    <property name="build.examples" value="${build.dir}/${taglib.name}-examples"/>
    <property name="build.library"  value="${build.dir}/classes"/>
    <property name="dist.doc"       value="${dist.dir}/${taglib.name}-doc.war"/>
    <property name="dist.examples"  value="${dist.dir}/${taglib.name}-examples.war"/>
    <property name="dist.library"   value="${dist.dir}/${lib.src}/${taglib.name}.jar"/>
    <property name="dist.tld"       value="${dist.dir}/${taglib.name}.tld"/>
    <property name="taglibs.doc"    value="${dist.dir}/${taglib.name}-doc"/>


  <!-- ********************** Destination Preparation ********************* -->

  <target name="prepare">
    <!-- Set up build directories -->
    <mkdir dir="${build.dir}"/>
    <mkdir dir="${build.doc}"/>
    <mkdir dir="${build.doc}/WEB-INF"/>
    <mkdir dir="${build.doc}/WEB-INF/classes"/>
    <mkdir dir="${build.doc}/WEB-INF/lib"/>
    <mkdir dir="${build.examples}"/>
    <mkdir dir="${build.examples}/WEB-INF"/>
    <mkdir dir="${build.examples}/WEB-INF/classes"/>
    <mkdir dir="${build.examples}/WEB-INF/lib"/>
    <mkdir dir="${build.library}"/>
    <mkdir dir="${build.library}/META-INF"/>
    <!-- Set up distribution directory -->
    <mkdir dir="${dist.dir}"/>
    <mkdir dir="${dist.dir}/${taglib.name}"/>
  </target>


  <!-- **************** Compile Tag Library Components ******************** -->

  <!-- Compile the documentation application -->
  <target name="documentation" depends="prepare">
    <copy todir="${build.doc}/WEB-INF">
      <fileset dir="${doc.src}/conf"/>
    </copy>
    <!-- intro.xml isn't part of the documentation application,
         this is just a handy place to build it for the web site. -->
    <style in="xml/intro.xml"
           destdir="${build.doc}"
           out="${build.doc}/intro.html"
           style="${taglibs.xsl}">
      <param name="prefix" expression="../../"/>
    </style>
    <copy todir="${build.doc}">
      <fileset dir="${doc.src}/web">
        <include name="**/*.html"/>
      </fileset>
    </copy>
  </target>

  <!-- Compile the examples application -->
  <target name="examples" depends="library-dist">
    <copy todir="${build.examples}/WEB-INF">
      <fileset dir="${examples.src}/conf"/>
    </copy>
    <copy todir="${build.examples}">
      <fileset dir="${examples.src}/web"/>
    </copy>
    <copy file="${dist.tld}"
              tofile="${build.examples}/WEB-INF/${taglib.name}.tld"/>
    <copy file="${dist.library}"
              tofile="${build.examples}/WEB-INF/lib/${taglib.name}.jar"/>
  </target>

  <!-- Compile the tag library itself -->
  <target name="compile" depends="prepare">
    <copy file="${conf.src}/taglib.tld"
              tofile="${build.library}/META-INF/taglib.tld"/>
    <javac srcdir="${library.src}" destdir="${build.library}" debug="on">
      <classpath> 
      <pathelement location="${servlet.jar}"/>
      <pathelement location="${taglib.extraclasspath}"/>
      </classpath>
    </javac>
  </target>

  <!-- Compile the library as well as the associated applications -->
  <target name="main" depends="compile,documentation,examples"/>


  <!-- ******************* Create Distribution Files ********************** -->

  <!-- Create the documentation application WAR file -->
  <target name="documentation-dist" depends="documentation">
    <jar jarfile="${dist.doc}" basedir="${build.doc}" excludes="intro.html"/>
    <mkdir dir="${taglibs.doc}"/>
    <copy todir="${taglibs.doc}">
      <fileset dir="${build.doc}">
        <exclude name="WEB-INF"/>     
      </fileset>
    </copy>
  </target>

  <!-- Create the examples application WAR file -->
  <target name="examples-dist" depends="examples">
    <jar jarfile="${dist.examples}" basedir="${build.examples}"/>
  </target>

  <!-- Create the library distribution files -->
  <target name="library-dist" depends="compile">
    <jar jarfile="${dist.library}" basedir="${build.library}"/>
    <copy file="${conf.src}/taglib.tld" tofile="${dist.tld}"/>
  </target>

  <!-- Create the entire set of distribution files -->
  <target name="dist" depends="library-dist,examples-dist,documentation-dist"/>



  <!-- ************************ Utility Commands ************************** -->

  <!-- Delete output directories and files so we can build from scratch -->
  <target name="clean">
    <delete dir="${build.dir}/${taglib.name}"/>
    <delete dir="${dist.dir}/${taglib.name}"/>
  </target>

</project>