source: apps/routerconsole/java/build.xml @ ef26acc

Last change on this file since ef26acc was ef26acc, checked in by zzz <zzz@…>, 9 years ago

jrobin 1.5.9.1
sha1sum 7d76f5cdec625fd1ce21acc0e46d286fbd6d307f
Released 2008-09-05
Downloaded from http://sourceforge.net/projects/jrobin/files/jrobin/1.5.9/
License: LGPL 2.1

It appears that the only difference from 1.5.9 is it was compiled with Java 5
instead of Java 6. The 1.5.9 jars out there also contain the large font .ttf files,
which are not in 1.5.9.1.

The only announcement I could find about 1.5.9.1 is here:
http://opennms.530661.n2.nabble.com/Am-I-missing-something-td841945.html

The following directories are dropped from the jar during the build process:
org/jrobin/cmd/
org/jrobin/convertor/
org/jrobin/inspector/

  • Property mode set to 100644
File size: 15.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project basedir="." default="all" name="routerconsole">
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    <target name="prepare">
9        <!-- run from top level build.xml to get dependencies built -->
10    </target>
11    <condition property="depend.available">
12        <typefound name="depend" />
13    </condition>
14    <target name="depend" if="depend.available">
15        <depend
16            cache="../../../build"
17            srcdir="./src" 
18            destdir="./build/obj" >
19            <!-- Depend on classes instead of jars where available -->
20            <classpath>
21                <pathelement location="../../../core/java/build/obj" />
22                <pathelement location="../../../router/java/build/obj" />
23                <pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
24                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
25                <pathelement location="../../systray/java/build/obj" />
26                <pathelement location="../../systray/java/lib/systray4j.jar" />
27                <pathelement location="../../desktopgui/build" />
28                <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <!-- we dont care if we're not on win32 -->
29                <pathelement location="../../jrobin/jrobin-1.5.9.1.jar" />
30            </classpath>
31        </depend>
32    </target>
33    <target name="dependVersion">
34        <!-- Force the dependency on the RouterVersion as depend doesn't recognize constant changes  -->
35        <dependset>
36             <srcfilelist dir="." files="../../../router/java/build/obj/net/i2p/router/RouterVersion.class" />
37             <targetfilelist dir="." files="build/obj/net/i2p/router/web/NewsFetcher.class" />
38             <targetfilelist dir="." files="build/obj/net/i2p/router/web/SummaryHelper.class" />
39             <targetfilelist dir="." files="build/obj/net/i2p/router/web/UpdateHandler.class" />
40        </dependset>
41    </target>
42    <property name="javac.compilerargs" value="" />
43    <target name="compile" depends="prepare, depend, dependVersion">
44        <mkdir dir="./build" />
45        <mkdir dir="./build/obj" />
46        <javac 
47            srcdir="./src" 
48            debug="true" deprecation="on" source="1.5" target="1.5" 
49            includeAntRuntime="false"
50            destdir="./build/obj">
51            <compilerarg line="${javac.compilerargs}" />
52            <classpath>
53                <pathelement location="../../../core/java/build/i2p.jar" />
54                <pathelement location="../../../router/java/build/router.jar" />
55                <pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
56                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
57                <pathelement location="../../systray/java/build/systray.jar" />
58                <pathelement location="../../systray/java/lib/systray4j.jar" />
59                <pathelement location="../../desktopgui/dist/desktopgui.jar" />
60                <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <!-- we dont care if we're not on win32 -->
61                <pathelement location="../../jrobin/jrobin-1.5.9.1.jar" />
62            </classpath>
63        </javac>
64    </target>
65
66    <!-- the jar with the latest message classes from the jsps, and the war too -->
67    <target name="jar" depends="jar1, war, bundle" />
68
69    <!-- the jar without the latest message classes from the jsps -->
70    <target name="jar1" depends="compile, jarUpToDate" unless="jar.uptodate" >
71        <exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" >
72            <arg value="list" />
73            <arg value="changed" />
74            <arg value="." />
75            <arg value="../locale" />
76        </exec>
77        <!-- \n in an attribute value generates an invalid manifest -->
78        <exec executable="tr" inputstring="${workspace.changes.j}" outputproperty="workspace.changes.j.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
79            <arg value="-s" />
80            <arg value="[:space:]" />
81            <arg value="," />
82        </exec>
83        <jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class">
84            <manifest>
85                <!-- top level installer will rename to jrobin.jar -->
86                <!-- DTG added in 0.8.4, not in the classpath for very old installs, before we changed wrapper.config to specify * -->
87                <attribute name="Class-Path" value="i2p.jar router.jar jrobin.jar desktopgui.jar" />
88                <attribute name="Build-Date" value="${build.timestamp}" />
89                <attribute name="Base-Revision" value="${workspace.version}" />
90                <attribute name="Workspace-Changes" value="${workspace.changes.j.tr}" />
91            </manifest>
92        </jar>
93    </target>
94
95    <!-- this is tricky because the message classes go in the jar, not in the war -->
96    <target name="bundle" depends="jar1, precompilejsp" >
97        <!-- Update the messages_*.po files.
98             We need to supply the bat file for windows, and then change the fail property to true -->
99        <exec executable="sh" osfamily="unix" failifexecutionfails="true" >
100            <arg value="./bundle-messages.sh" />
101        </exec>
102        <exec executable="sh" osfamily="mac" failifexecutionfails="true" >
103            <arg value="./bundle-messages.sh" />
104        </exec>
105                <!-- multi-lang is optional -->
106        <exec executable="sh" osfamily="windows" failifexecutionfails="false" >
107            <arg value="./bundle-messages.sh" />
108        </exec>
109        <!-- jar again to get the latest messages_*.class files -->
110        <jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class" update="true" />
111    </target>
112
113
114    <target name="jarUpToDate">
115        <uptodate property="jar.uptodate" targetfile="build/routerconsole.jar" >
116            <srcfiles dir= "build/obj" includes="**/*.class" />
117        </uptodate>
118    </target>
119
120    <target name="poupdate" depends="precompilejsp">
121        <!-- Update the messages_*.po files.
122             We need to supply the bat file for windows, and then change the fail property to true -->
123        <exec executable="sh" osfamily="unix" failifexecutionfails="true" >
124            <arg value="./bundle-messages.sh" />
125            <arg value="-p" />
126        </exec>
127        <exec executable="sh" osfamily="mac" failifexecutionfails="true" >
128            <arg value="./bundle-messages.sh" />
129            <arg value="-p" />
130        </exec>
131        <exec executable="sh" osfamily="windows" failifexecutionfails="true" >
132            <arg value="./bundle-messages.sh" />
133            <arg value="-p" />
134        </exec>
135    </target>
136
137    <!-- does NOT update the message classes, as those go in the jar -->
138    <target name="war" depends="precompilejsp, warUpToDate" unless="war.uptodate" >
139        <exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" >
140            <arg value="list" />
141            <arg value="changed" />
142            <arg value="../jsp" />
143        </exec>
144        <!-- \n in an attribute value generates an invalid manifest -->
145        <exec executable="tr" inputstring="${workspace.changes.w}" outputproperty="workspace.changes.w.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
146            <arg value="-s" />
147            <arg value="[:space:]" />
148            <arg value="," />
149        </exec>
150        <!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ -->
151        <war destfile="build/routerconsole.war" webxml="../jsp/web-out.xml"
152             basedir="../jsp/" excludes="web.xml, *.css, **/*.java, *.jsp, *.jsi, web-fragment.xml, web-out.xml">
153            <manifest>
154                <attribute name="Build-Date" value="${build.timestamp}" />
155                <attribute name="Base-Revision" value="${workspace.version}" />
156                <attribute name="Workspace-Changes" value="${workspace.changes.w.tr}" />
157            </manifest>
158        </war>
159    </target>
160
161    <target name="warUpToDate">
162        <uptodate property="war.uptodate" targetfile="build/routerconsole.war" >
163            <srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, *.css, **/*.java, *.jsp, *.jsi" />
164        </uptodate>
165    </target>
166
167    <target name="precompilejsp" depends="jar1" unless="precompilejsp.uptodate">
168        <delete dir="../jsp/WEB-INF/" />
169        <delete file="../jsp/web-fragment.xml" />
170        <delete file="../jsp/web-out.xml" />
171        <mkdir dir="../jsp/WEB-INF/" />
172        <mkdir dir="../jsp/WEB-INF/classes" />
173
174        <!-- there are various jspc ant tasks, but they all seem a bit flakey -->
175        <!--
176           **     Usage: jspc <options> <jsp files>
177           **     where jsp files is
178           **         -webapp <dir>      A directory containing a web-app, whose JSP pages
179           **                            will be processed recursively
180           **     or any number of
181           **         <file>             A file to be parsed as a JSP page
182           **     where options include:
183           **         -help              Print this help message
184           **         -v                 Verbose mode
185           **         -d <dir>           Output Directory (default -Djava.io.tmpdir)
186           **         -l                 Outputs the name of the JSP page upon failure
187           **         -s                 Outputs the name of the JSP page upon success
188           **         -p <name>          Name of target package (default org.apache.jsp)
189           **         -c <name>          Name of target class name (only applies to first JSP page)
190           **         -mapped            Generates separate write() calls for each HTML line in the JSP
191           **         -die[#]            Generates an error return code (#) on fatal errors (default 1)
192           **         -uribase <dir>     The uri directory compilations should be relative to
193           **                            (default "/")
194           **         -uriroot <dir>     Same as -webapp
195           **         -compile           Compiles generated servlets
196           **         -webinc <file>     Creates a partial servlet mappings in the file
197           **         -webxml <file>     Creates a complete web.xml in the file
198           **         -ieplugin <clsid>  Java Plugin classid for Internet Explorer
199           **         -classpath <path>  Overrides java.class.path system property
200           **         -xpoweredBy        Add X-Powered-By response header
201           **         -trimSpaces        Trim spaces in template text between actions, directives
202        -->
203        <java classname="org.apache.jasper.JspC" fork="true" failonerror="true">
204            <classpath>
205                <pathelement location="../../jetty/jettylib/jasper-compiler.jar" />
206                <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
207                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
208                <pathelement location="../../jetty/jettylib/commons-logging.jar" />
209                <pathelement location="../../jetty/jettylib/commons-el.jar" />
210                <pathelement location="../../jetty/jettylib/ant.jar" />
211                <pathelement location="../../systray/java/build/obj" />
212                <pathelement location="../../systray/java/lib/systray4j.jar" />
213                <pathelement location="../../desktopgui/dist/desktopgui.jar" />
214                <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" />
215                <pathelement location="build/routerconsole.jar" />
216                <pathelement location="build/" />
217                <pathelement location="../../../router/java/build/router.jar" />
218                <pathelement location="../../../core/java/build/i2p.jar" />
219            </classpath>
220            <arg value="-d" />
221            <arg value="../jsp/WEB-INF/classes" />
222            <arg value="-v" />
223            <arg value="-p" />
224            <arg value="net.i2p.router.web.jsp" />
225            <arg value="-webinc" />
226            <arg value="../jsp/web-fragment.xml" />
227            <arg value="-webapp" />
228            <arg value="../jsp/" />
229        </java>
230       
231        <javac debug="true" deprecation="on" source="1.5" target="1.5" 
232               encoding="UTF-8"
233               includeAntRuntime="false"
234               destdir="../jsp/WEB-INF/classes/" 
235               srcdir="../jsp/WEB-INF/classes" includes="**/*.java">
236            <compilerarg line="${javac.compilerargs}" />
237            <classpath>
238                <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
239                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
240                <pathelement location="../../jetty/jettylib/commons-logging.jar" />
241                <pathelement location="../../jetty/jettylib/commons-el.jar" />
242                <pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
243                <pathelement location="../../systray/java/build/obj" />
244                <pathelement location="../../systray/java/lib/systray4j.jar" />
245                <pathelement location="../../desktopgui/dist/desktopgui.jar" />
246                <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" />
247                <pathelement location="build/routerconsole.jar" />
248                <pathelement location="build" />
249                <pathelement location="../../../router/java/build/router.jar" />
250                <pathelement location="../../../core/java/build/i2p.jar" />
251            </classpath>
252        </javac>
253
254        <!-- save these so we can run gettext on the generated java files later
255        <delete>
256            <fileset dir="../jsp/WEB-INF/" includes="**/*.java" />
257            <fileset dir="../jsp/WEB-INF/" includes="**/*.jsp" />
258        </delete>
259        -->
260        <copy file="../jsp/web.xml" tofile="../jsp/web-out.xml" />
261        <loadfile property="jspc.web.fragment" srcfile="../jsp/web-fragment.xml" />
262        <replace file="../jsp/web-out.xml">
263            <replacefilter token="&lt;!-- precompiled servlets --&gt;" value="${jspc.web.fragment}" />
264        </replace>
265    </target>
266
267    <uptodate property="precompilejsp.uptodate" targetfile="../jsp/web-out.xml">
268        <srcfiles dir= "../jsp" includes="**/*.jsp, *.jsi, **/*.html, *.css, susimail/susimail, web.xml"/>
269    </uptodate>
270
271    <target name="javadoc">
272        <mkdir dir="./build" />
273        <mkdir dir="./build/javadoc" />
274        <javadoc 
275            sourcepath="./src:../../../core/java/src:../../../router/java/src:../../systray/java/src:../../desktopgui/src" destdir="./build/javadoc" 
276            packagenames="*" 
277            use="true" 
278            splitindex="true" 
279            windowtitle="Router Console" />
280    </target>
281    <target name="clean">
282        <delete dir="./build" />
283        <delete dir="../jsp/WEB-INF/" />
284        <delete file="../jsp/web-fragment.xml" />
285        <delete file="../jsp/web-out.xml" />
286    </target>
287    <target name="cleandep" depends="clean">
288    </target>
289    <target name="distclean" depends="clean">
290    </target>
291</project>
Note: See TracBrowser for help on using the repository browser.