File: build.xml

package info (click to toggle)
castor 1.3.2-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 44,976 kB
  • sloc: java: 206,032; xml: 95,088; sql: 14,460; sh: 365; makefile: 10
file content (93 lines) | stat: -rw-r--r-- 4,494 bytes parent folder | download | duplicates (4)
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
<project name="Castor XML - CTF" default="compile.xmlctf" basedir=".">

    <!-- $Id: build.xml 0000 2007-01-19 21:12:08Z ekuns $ -->

    <property environment="env" />
    <property name="source"               value="${basedir}/src"/>
    <property name="main.java"            value="${source}/main/java"/>
    <property name="main.resources"       value="${source}/main/resources"/>
    <property name="main.generated"       value="${basedir}/target/generated-sources/castor" />
    <property name="test.resources"       value="${source}/test/resources"/>
    <property name="build"                value="${basedir}/build"/>
    <property name="classes"              value="${build}/classes"/>
    <property name="archive"              value="${project}-${version}${release}-xmlctf-framework"/>
    <property name="gen.src"              value="${build}/generated-sources"/>

    <path id="build.classpath">
        <pathelement location="${basedir}/build/classes"/>
        <pathelement location="${basedir}/../build/classes"/>
        <pathelement location="${basedir}/../CORE/build/classes"/>
        <pathelement location="${basedir}/../schema/build/classes"/>
        <pathelement location="${basedir}/../codegen/build/classes"/>
        <pathelement location="${basedir}/../anttask/build/classes"/>
        <pathelement location="${basedir}/../diff/build/classes"/>
        <pathelement location="${basedir}/../lib/commons-logging-1.1.jar"/>
        <pathelement location="${basedir}/../lib/junit_3.8.2.jar"/>
    </path>

    <target name="prepare.xmlctf" unless="prepare.xmlctf.executed">
        <mkdir dir="${build}"/>
        <mkdir dir="${classes}"/>
        <property name="prepare.xmlctf.executed" value="true"/>
    </target>

    <target name="clean.xmlctf" description="Removes XML CTF build directory">
        <delete dir="${build}"/>
    </target>

	<target name="compile.xmlctf" depends="prepare.xmlctf" description="Compile XML CTF">
        <javac srcdir="${main.generated}" destdir="${classes}" 
               debug="on" encoding="ISO-8859-1" deprecation="false"
               source="1.5" target="1.5">
            <classpath refid="build.classpath"/>
        </javac>
        <javac srcdir="${main.java}" destdir="${classes}"
               debug="on" encoding="ISO-8859-1" deprecation="false"
        	   source="1.5" target="1.5">
            <classpath refid="build.classpath"/>
        </javac>
        <copy todir="${classes}">
            <fileset dir="${main.generated}">
                <include name="**/*.cdr"/>
            </fileset>
            <fileset dir="${main.resources}">
                <include name="**"/>
            </fileset>
            <filterset begintoken="$$" endtoken="$$">
                <filter token="VERSION" value="${version}"/>
                <filter token="RELEASE" value="${release}"/>
            </filterset>
        </copy>
        <copy todir="${classes}">
            <fileset dir="${test.resources}">
                <include name="log4j.xml"/>
            </fileset>
        </copy>
    </target>

    <target name="jar.xmlctf" depends="compile.xmlctf" description="Build XML CTF JAR file">
        <jar jarfile="${build}/${archive}.jar" basedir="${classes}" includes="**"
             manifest="${classes}/META-INF/MANIFEST.MF"/>
        <copy file="${build}/${archive}.jar" tofile="${basedir}/../dist/${archive}.jar"/>
    </target>

    <target name="gen.testdescriptor" depends="compile.xmlctf"
            description="Use the Source Generator to create the Java classes for TestDescriptor.xsd">
        <delete dir="${gen.src}/testdescriptor"/>
        <mkdir dir="${gen.src}/testdescriptor"/>
        <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask"
                 classpathref="build.classpath"/>
        <castor-srcgen file="${main.resources}/org/exolab/castor/tests/framework/TestDescriptor.xsd"
                       todir="${gen.src}/testdescriptor"
                       package="org.exolab.castor.tests.framework.testDescriptor"
                       lineseparator="unix"
                       warnings="true"/>
        <javac destdir="${classes}" excludes="${excludes}"
               debug="${main.opt.debug}" encoding="ISO-8859-1" deprecation="off"
               optimize="on" source="1.5" target="1.5">
            <src path="${gen.src}" />
            <classpath refid="build.classpath"/>
        </javac>
    </target>

</project>