I2P

Invisible Internet Project


root/src/build.xml @ bfbb576fa1187604ef373d574ac702849205dc2f

Revision adfe84d13d98a0a91dc989decffd61acdba72e4b, 3.5 KB (checked in by dev@…, 2 years ago)

Removed crud.

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