Files
i2p.i2p/apps/sam/java/build.xml

136 lines
5.8 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="sam">
<target name="all" depends="clean, build" />
<target name="build" depends="builddep, jar" />
<target name="builddep">
<!-- run from top level build.xml to get dependencies built -->
</target>
<condition property="depend.available">
<typefound name="depend" />
</condition>
<target name="depend" if="depend.available">
<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>
2012-01-27 13:33:41 +00:00
<!-- ignored for now, we require java 7 here -->
<property name="javac.compilerargs7" value="" />
<!-- ignored for now, we require java 7 here -->
2014-02-21 13:59:27 +00:00
<property name="javac.version" value="1.6" />
2012-01-27 13:33:41 +00:00
<!-- compile everything including client classes -->
<target name="compile" depends="depend">
<mkdir dir="./build" />
<mkdir dir="./build/obj" />
<javac
2009-01-13 19:54:07 +00:00
srcdir="./src"
debug="true" deprecation="on" source="1.7" target="1.7"
includeAntRuntime="false"
2009-01-13 19:54:07 +00:00
destdir="./build/obj"
2014-03-13 13:58:50 +00:00
classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar" >
<compilerarg line="${javac.compilerargs7}" />
</javac>
2009-01-13 19:54:07 +00:00
</target>
2012-01-27 13:33:41 +00:00
2009-01-13 19:54:07 +00:00
<target name="compileTest" depends="compile">
<javac
srcdir="./test"
debug="true" deprecation="on" source="1.7" target="1.7"
includeAntRuntime="false"
destdir="./build/obj"
2014-03-13 13:58:50 +00:00
classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar" >
<compilerarg line="${javac.compilerargs7}" />
</javac>
</target>
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
<arg value="." />
</exec>
<!-- \n in an attribute value generates an invalid manifest -->
<exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="-s" />
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
2012-01-27 13:33:41 +00:00
<!-- does not include client classes, moved to samclient.jar -->
<target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
2012-01-27 13:33:41 +00:00
<jar destfile="./build/sam.jar" basedir="./build/obj" includes="**/*.class" excludes="net/i2p/sam/client/*">
<manifest>
<attribute name="Main-Class" value="net.i2p.sam.SAMBridge" />
<attribute name="Class-Path" value="i2p.jar mstreaming.jar streaming.jar" />
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
2012-01-27 13:33:41 +00:00
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
<attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
</manifest>
</jar>
</target>
<target name="clientjar" depends="compile, listChangedFiles" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="./build/samclient.jar" basedir="./build/obj" includes="net/i2p/sam/client/*.class">
<manifest>
<attribute name="Main-Class" value="net.i2p.sam.SAMBridge" />
<attribute name="Class-Path" value="i2p.jar mstreaming.jar streaming.jar" />
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
<attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
</manifest>
</jar>
</target>
<target name="jarUpToDate">
<uptodate property="jar.uptodate" targetfile="build/sam.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
2009-01-13 19:54:07 +00:00
<target name="jarTest" depends="jar, compileTest">
<jar destfile="./build/sam.jar" basedir="./build/obj" includes="**/*Test*.class" update="true" />
</target>
<target name="javadoc">
<mkdir dir="./build" />
<mkdir dir="./build/javadoc" />
<javadoc
sourcepath="./src:../../../core/java/src:../../ministreaming/java/src:../../streaming/java/src" destdir="./build/javadoc"
packagenames="*"
use="true"
splitindex="true"
windowtitle="SAMBridge" />
</target>
<target name="clean">
<delete dir="./build" />
</target>
<target name="cleandep" depends="clean">
</target>
<target name="distclean" depends="clean">
</target>
</project>