I2P

Invisible Internet Project


root/src/build.xml @ 2249b695ab5a49e77eda41dcf226af413e59cd48

Revision 2249b695ab5a49e77eda41dcf226af413e59cd48, 3.4 KB (checked in by dev@…, 2 years ago)

Cleanup and webapp testing.

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project basedir="." default="all" name="I2PControl">
3    <property name="i2pbase" value="../../i2p.i2p"/>
4    <property name="i2plib" value="${i2pbase}/build"/>
5    <property name="jettylib" value="${i2pbase}/apps/jetty/jettylib"/>
6
7    <path id="cp">
8        <pathelement path="${java.class.path}" />
9        <pathelement location="${i2plib}/i2p.jar" />
10        <pathelement location="${i2plib}/i2ptunnel.jar" />
11        <pathelement location="${jettylib}/ant.jar"/>
12        <pathelement location="${jettylib}/org.mortbay.jetty.jar"/>
13        <pathelement location="${jettylib}/jasper-compiler.jar" />
14        <pathelement location="${jettylib}/jasper-runtime.jar" />
15        <pathelement location="${jettylib}/javax.servlet.jar" />
16        <pathelement location="${jettylib}/commons-logging.jar" />
17        <pathelement location="${jettylib}/commons-el.jar" />
18    </path>
19
20    <target name="all" depends="clean, build" />
21    <target name="build" depends="jar, war" />
22    <target name="builddep">
23    </target>
24
25    <property name="javac.compilerargs" value="" />
26
27    <target name="compile">
28        <mkdir dir="./build" />
29        <mkdir dir="./build/obj" />
30        <javac 
31            srcdir="./java" 
32            debug="true" deprecation="on" source="1.5" target="1.5" 
33            destdir="./build/obj" 
34            classpath="${i2plib}/i2p.jar:${jettylib}/javax.servlet.jar" >
35            <compilerarg line="${javac.compilerargs}" />
36        </javac>
37    </target>
38
39    <target name="jar" depends="builddep, compile">
40        <jar destfile="build/I2PControl.jar" basedir="./build/obj" includes="**/*.class" >
41        </jar>
42    </target>   
43
44    <target name="precompilejsp" depends="compile" >
45        <mkdir dir="build" />
46        <mkdir dir="build/war/WEB-INF/classes" />
47        <path id="jspcp">
48            <path refid="cp" />
49            <pathelement location="build/obj" />
50        </path>
51        <java classname="org.apache.jasper.JspC" fork="true" classpathref="jspcp" failonerror="true">
52            <arg value="-d" />
53            <arg value="build/jspjava" />
54            <arg value="-v" />
55            <arg value="-p" />
56            <arg value="net.i2p.i2pcontrol" />
57            <arg value="-webinc" />
58            <arg value="build/web-fragment.xml" />
59            <arg value="-webapp" />
60            <arg value="jsp/" />
61        </java>
62
63        <javac
64            debug="true"
65            deprecation="on"
66            source="1.5" target="1.5" 
67            destdir="build/war/WEB-INF/classes"
68            srcdir="./build/jspjava"
69            includes="**/*.java"
70            classpathref="jspcp"
71            failonerror="true" />
72
73        <copy file="jsp/WEB-INF/web.xml" tofile="build/web.xml" />
74        <loadfile property="jspc.web.fragment" srcfile="build/web-fragment.xml" />
75        <replace file="build/web.xml">
76            <replacefilter token="&lt;!-- precompiled servlets --&gt;" value="${jspc.web.fragment}" />
77        </replace>
78
79    </target>
80
81    <target name="war" depends="precompilejsp"> 
82        <copy file="jsp/index.html" todir="build/war" />
83        <war destfile="build/I2PControl.war.jar" webxml="build/web.xml">
84            <fileset dir="build/war" />
85        </war>
86    </target>
87   
88    <target name="clean">
89        <delete dir="./build" />
90    </target>
91
92    <target name="cleandep" depends="clean">
93    </target>
94    <target name="distclean" depends="clean">
95    </target>
96</project>
Note: See TracBrowser for help on using the browser.