File: build.xml

package info (click to toggle)
geronimo-j2ee-connector-1.5-spec 2.0.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 340 kB
  • ctags: 441
  • sloc: java: 897; xml: 101; makefile: 24; sh: 11
file content (70 lines) | stat: -rw-r--r-- 2,641 bytes parent folder | download | duplicates (3)
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
<?xml version="1.0"?>

<project name="pkg-java" default="package" basedir="..">

    <property name="build.sourceDirectory" value="src/main/java"/>
    <property name="build.resourcesDirectory" value="src/main/resources"/>
    <property name="build.testDirectory" value="src/test/java"/>
    <property name="build.directory" value="build"/>
    <property name="build.outputDirectory" value="${build.directory}/classes"/>

    <target name="init">
        <available property="available.resources" file="${build.resourcesDirectory}"/>
    </target>

    <target name="clean">
        <delete dir="${build.directory}"/>
        <delete>
            <fileset dir="${build.testDirectory}" includes="**/*.class"/>
        </delete>
    </target>

    <target name="process-resources" depends="init" if="available.resources">
        <mkdir dir="${build.outputDirectory}"/>
        <copy todir="${build.outputDirectory}">
            <fileset dir="${build.resourcesDirectory}"/>
        </copy>
    </target>

    <target name="compile" depends="process-resources">
        <mkdir dir="${build.outputDirectory}"/>
        <javac
            destdir="${build.outputDirectory}"
            nowarn="true"
            source="${sourceVersion}" target="${targetVersion}"
            debug="on">
            <src path="${build.sourceDirectory}"/>
        </javac>
    </target>

    <target name="package" depends="compile">
        <jar jarfile="${build.directory}/${artifactId}-${artifactVersion}.jar"
            basedir="${build.outputDirectory}"/>
    </target>

    <target name="compile_test">
        <javac destdir="${build.testDirectory}" debug="true"
               source="${sourceVersion}" target="${targetVersion}">
            <src path="${build.testDirectory}"/>
            <classpath>
                <pathelement location="${build.directory}/${artifactId}-${artifactVersion}.jar"/>
                <pathelement location="${build.testDirectory}"/>
            </classpath>
        </javac>
    </target>
    <target name="test" depends="compile_test">
        <junit haltonfailure="yes">
            <classpath>
                <pathelement location="${build.directory}/${artifactId}-${artifactVersion}.jar"/>
                <pathelement location="${build.testDirectory}"/>
            </classpath>
            <formatter type="plain" usefile="false"/>
            <batchtest>
                <fileset dir="${build.testDirectory}">
                    <include name="**/*Test.java"/>
                    <include name="**/*TestCase.java"/>
                </fileset>
            </batchtest>
        </junit>
    </target>
</project>