source: apps/jrobin/java/build.xml @ 78acf70

Last change on this file since 78acf70 was 78acf70, checked in by zzz <zzz@…>, 4 years ago

JRobin: 1.6.0-1, 2014-10-28, checked in as source
from https://github.com/OpenNMS/jrobin/releases
Replaces 1.5.9.1 from 2008-09-05
Needed for Java 9 to remove dependency on Sun private classes.
No modifications, but includes only core, data, and graph;
cmd, convertor, inspector, and tests are not included.
Using source instead of jar because:

  • Property mode set to 100644
File size: 3.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project basedir="." default="all" name="jrobin">
3    <target name="all" depends="clean, build" />
4    <target name="build" depends="builddep, jar" />
5    <target name="builddep">
6        <!-- run from top level build.xml to get dependencies built -->
7    </target>
8    <condition property="depend.available">
9        <typefound name="depend" />
10    </condition>
11    <target name="depend" if="depend.available">
12        <depend
13            cache="../../../build"
14            srcdir="./src"
15            destdir="./build/obj" >
16        </depend>
17    </target>
18
19    <property name="javac.compilerargs" value="" />
20    <property name="javac.version" value="1.7" />
21
22    <target name="compile" depends="depend">
23        <mkdir dir="./build" />
24        <mkdir dir="./build/obj" />
25        <javac
26            srcdir="./src"
27            debug="true"
28            deprecation="on"
29            source="${javac.version}"
30            target="${javac.version}"
31            destdir="./build/obj"
32            includeAntRuntime="false"
33            includes="**/*.java" >
34            <compilerarg line="${javac.compilerargs}" />
35        </javac>
36    </target>
37
38    <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
39        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
40            <arg value="list" />
41            <arg value="changed" />
42            <arg value="." />
43        </exec>
44        <!-- \n in an attribute value generates an invalid manifest -->
45        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
46            <arg value="-s" />
47            <arg value="[:space:]" />
48            <arg value="," />
49        </exec>
50    </target>
51
52    <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate">
53        <!-- set if unset -->
54        <property name="workspace.changes.tr" value="" />
55        <jar destfile="./build/jrobin.jar" basedir="./build/obj" includes="**/*.class">
56            <manifest>
57                <attribute name="Implementation-Version" value="1.6.0-1" />
58                <attribute name="Built-By" value="${build.built-by}" />
59                <attribute name="Build-Date" value="${build.timestamp}" />
60                <attribute name="Base-Revision" value="${workspace.version}" />
61                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
62            </manifest>
63        </jar>
64    </target>
65
66    <target name="jarUpToDate">
67        <uptodate property="jar.uptodate" targetfile="./build/jrobin.jar">
68            <srcfiles dir= "build/obj" includes="**/*.class" />
69        </uptodate>
70        <condition property="shouldListChanges" >
71            <and>
72                <not>
73                    <isset property="jar.uptodate" />
74                </not>
75                <isset property="mtn.available" />
76            </and>
77        </condition>
78    </target>
79
80    <target name="javadoc">
81        <mkdir dir="./build" />
82        <mkdir dir="./build/javadoc" />
83        <javadoc
84            sourcepath="./src"
85            classpath="./src"
86            destdir="./build/javadoc"
87            packagenames="*"
88            use="true"
89            access="package"
90            splitindex="true" />
91    </target>
92    <target name="clean">
93        <delete dir="./build" />
94    </target>
95    <target name="cleandep" depends="clean">
96    </target>
97    <target name="distclean" depends="clean">
98    </target>
99</project>
Note: See TracBrowser for help on using the repository browser.