I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 98038e92 authored by zzz's avatar zzz
Browse files

* Build files:

      - Use the depend task with caching for more accurate dependencies
      - Make sure the routerconsole gets the latest router version
      - Fix addressbook repeated builds
parent 6169904c
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0"?> <?xml version="1.0"?>
<project name="addressbook" default="war" basedir="."> <project name="addressbook" default="war" basedir=".">
<property name="src" value="java/src/addressbook"/> <property name="src" value="java/src"/>
<property name="build" value="build"/> <property name="build" value="build"/>
<property name="dist" location="dist"/> <property name="dist" location="dist"/>
<property name="jar" value="addressbook.jar"/> <property name="jar" value="addressbook.jar"/>
...@@ -19,7 +19,20 @@ ...@@ -19,7 +19,20 @@
<target name="distclean" depends="clean" /> <target name="distclean" depends="clean" />
<target name="compile" depends="init"> <target name="depend">
<depend
cache="../../build"
srcdir="${src}"
destdir="${build}" >
<!-- Depend on classes instead of jars where available -->
<classpath>
<pathelement location="../../core/java/build/obj" />
<pathelement location="../jetty/jettylib/javax.servlet.jar" />
</classpath>
</depend>
</target>
<target name="compile" depends="init, depend">
<javac debug="true" deprecation="on" source="1.5" target="1.5" <javac debug="true" deprecation="on" source="1.5" target="1.5"
srcdir="${src}" destdir="${build}"> srcdir="${src}" destdir="${build}">
<classpath> <classpath>
...@@ -37,7 +50,7 @@ ...@@ -37,7 +50,7 @@
</jar> </jar>
</target> </target>
<target name="war" depends="compile"> <target name="war" depends="compile" unless="war.uptodate">
<mkdir dir="${dist}/tmp"/> <mkdir dir="${dist}/tmp"/>
<mkdir dir="${dist}/tmp/WEB-INF"/> <mkdir dir="${dist}/tmp/WEB-INF"/>
<mkdir dir="${dist}/tmp/WEB-INF/classes"/> <mkdir dir="${dist}/tmp/WEB-INF/classes"/>
...@@ -48,4 +61,8 @@ ...@@ -48,4 +61,8 @@
<delete dir="${dist}/tmp"/> <delete dir="${dist}/tmp"/>
</target> </target>
<uptodate property="war.uptodate" targetfile="${dist}/${war}">
<srcfiles dir= "." includes="${build}/**/*.class, web.xml"/>
</uptodate>
</project> </project>
...@@ -7,7 +7,22 @@ ...@@ -7,7 +7,22 @@
<ant dir="../../streaming/java/" target="build" /> <ant dir="../../streaming/java/" target="build" />
<!-- streaming will build ministreaming and core --> <!-- streaming will build ministreaming and core -->
</target> </target>
<target name="compile"> <target name="depend">
<depend
cache="../../../build"
srcdir="./src"
destdir="./build/obj" >
<!-- Depend on classes instead of jars where available -->
<classpath>
<pathelement location="../../../core/java/build/obj" />
<pathelement location="../../../router/java/build/obj" />
<pathelement location="../../ministreaming/java/build/obj" />
<pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
<pathelement location="../../jetty/jettylib/javax.servlet.jar" />
</classpath>
</depend>
</target>
<target name="compile" depends="depend">
<mkdir dir="./build" /> <mkdir dir="./build" />
<mkdir dir="./build/obj" /> <mkdir dir="./build/obj" />
<javac <javac
......
...@@ -7,7 +7,19 @@ ...@@ -7,7 +7,19 @@
<ant dir="../../jetty/" target="build" /> <ant dir="../../jetty/" target="build" />
<!-- ministreaming will build core --> <!-- ministreaming will build core -->
</target> </target>
<target name="compile"> <target name="depend">
<depend
cache="../../../build"
srcdir="./src"
destdir="./build/obj" >
<!-- Depend on classes instead of jars where available -->
<classpath>
<pathelement location="../../../core/java/build/obj" />
<pathelement location="../../ministreaming/java/build/obj" />
</classpath>
</depend>
</target>
<target name="compile" depends="depend">
<mkdir dir="./build" /> <mkdir dir="./build" />
<mkdir dir="./build/obj" /> <mkdir dir="./build/obj" />
<javac <javac
......
...@@ -5,7 +5,18 @@ ...@@ -5,7 +5,18 @@
<target name="builddep"> <target name="builddep">
<ant dir="../../../core/java/" target="build" /> <ant dir="../../../core/java/" target="build" />
</target> </target>
<target name="compile"> <target name="depend">
<depend
cache="../../../build"
srcdir="./src"
destdir="./build/obj" >
<!-- Depend on classes instead of jars where available -->
<classpath>
<pathelement location="../../../core/java/build/obj" />
</classpath>
</depend>
</target>
<target name="compile" depends="depend">
<mkdir dir="./build" /> <mkdir dir="./build" />
<mkdir dir="./build/obj" /> <mkdir dir="./build/obj" />
<javac srcdir="./src" debug="true" deprecation="on" source="1.5" target="1.5" destdir="./build/obj" classpath="../../../core/java/build/i2p.jar" /> <javac srcdir="./src" debug="true" deprecation="on" source="1.5" target="1.5" destdir="./build/obj" classpath="../../../core/java/build/i2p.jar" />
......
...@@ -10,7 +10,32 @@ ...@@ -10,7 +10,32 @@
<target name="prepare"> <target name="prepare">
<ant dir="../../jetty/" target="build" /> <ant dir="../../jetty/" target="build" />
</target> </target>
<target name="compile" depends="prepare"> <target name="depend">
<depend
cache="../../../build"
srcdir="./src"
destdir="./build/obj" >
<!-- Depend on classes instead of jars where available -->
<classpath>
<pathelement location="../../../core/java/build/obj" />
<pathelement location="../../../router/java/build/obj" />
<pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
<pathelement location="../../jetty/jettylib/javax.servlet.jar" />
<pathelement location="../../systray/java/build/obj" />
<pathelement location="../../systray/java/lib/systray4j.jar" />
<pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <!-- we dont care if we're not on win32 -->
<pathelement location="../../jrobin/jrobin-1.4.0.jar" />
</classpath>
</depend>
<!-- Force the dependency on the RouterVersion as depend doesn't recognize constant changes -->
<dependset>
<srcfilelist dir="." files="../../../router/java/build/obj/net/i2p/router/RouterVersion.class" />
<targetfilelist dir="." files="build/obj/net/i2p/router/web/NewsFetcher.class" />
<targetfilelist dir="." files="build/obj/net/i2p/router/web/SummaryHelper.class" />
<targetfilelist dir="." files="build/obj/net/i2p/router/web/UpdateHandler.class" />
</dependset>
</target>
<target name="compile" depends="prepare, depend">
<mkdir dir="./build" /> <mkdir dir="./build" />
<mkdir dir="./build/obj" /> <mkdir dir="./build/obj" />
<javac <javac
......
...@@ -6,7 +6,19 @@ ...@@ -6,7 +6,19 @@
<ant dir="../../ministreaming/java/" target="build" /> <ant dir="../../ministreaming/java/" target="build" />
<!-- ministreaming will build core --> <!-- ministreaming will build core -->
</target> </target>
<target name="compile"> <target name="depend">
<depend
cache="../../../build"
srcdir="./src"
destdir="./build/obj" >
<!-- Depend on classes instead of jars where available -->
<classpath>
<pathelement location="../../../core/java/build/obj" />
<pathelement location="../../ministreaming/java/build/obj" />
</classpath>
</depend>
</target>
<target name="compile" depends="depend">
<mkdir dir="./build" /> <mkdir dir="./build" />
<mkdir dir="./build/obj" /> <mkdir dir="./build/obj" />
<javac <javac
......
...@@ -6,7 +6,19 @@ ...@@ -6,7 +6,19 @@
<ant dir="../../ministreaming/java/" target="build" /> <ant dir="../../ministreaming/java/" target="build" />
<!-- ministreaming will build core --> <!-- ministreaming will build core -->
</target> </target>
<target name="compile"> <target name="depend">
<depend
cache="../../../build"
srcdir="./src"
destdir="./build/obj" >
<!-- Depend on classes instead of jars where available -->
<classpath>
<pathelement location="../../../core/java/build/obj" />
<pathelement location="../../ministreaming/java/build/obj" />
</classpath>
</depend>
</target>
<target name="compile" depends="depend">
<mkdir dir="./build" /> <mkdir dir="./build" />
<mkdir dir="./build/obj" /> <mkdir dir="./build/obj" />
<javac <javac
......
...@@ -5,7 +5,14 @@ ...@@ -5,7 +5,14 @@
<target name="builddep"> <target name="builddep">
<!-- noop, since the core doesnt depend on anything --> <!-- noop, since the core doesnt depend on anything -->
</target> </target>
<target name="compile"> <target name="depend">
<depend
cache="../../build"
srcdir="./src"
destdir="./build/obj" >
</depend>
</target>
<target name="compile" depends="depend">
<mkdir dir="./build" /> <mkdir dir="./build" />
<mkdir dir="./build/obj" /> <mkdir dir="./build/obj" />
<javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" /> <javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" />
......
...@@ -8,7 +8,18 @@ ...@@ -8,7 +8,18 @@
<target name="builddeptest"> <target name="builddeptest">
<ant dir="../../core/java/" target="jarTest" /> <ant dir="../../core/java/" target="jarTest" />
</target> </target>
<target name="compile"> <target name="depend">
<depend
cache="../../build"
srcdir="./src"
destdir="./build/obj" >
<!-- Depend on classes instead of jars where available -->
<classpath>
<pathelement location="../../core/java/build/obj" />
</classpath>
</depend>
</target>
<target name="compile" depends="depend">
<mkdir dir="./build" /> <mkdir dir="./build" />
<mkdir dir="./build/obj" /> <mkdir dir="./build/obj" />
<javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" classpath="../../core/java/build/i2p.jar" /> <javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" classpath="../../core/java/build/i2p.jar" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment