Changeset 0a8ab441 for apps


Ignore:
Timestamp:
Jan 28, 2019 2:14:29 PM (16 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8c9ce56
Parents:
24fd4881
Message:

I2PControl: Add manifest for jar build
Stub out socketJar build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/i2pcontrol/build.xml

    r24fd4881 r0a8ab441  
    33    <property name="i2pbase" value="../.."/>
    44    <property name="i2plib" value="${i2pbase}/build"/>
     5    <property name="jettylib" value="${i2pbase}/apps/jetty/jettylib"/>
    56    <property name="wrapperlib" value="${i2pbase}/installer/lib/wrapper/all"/>
     7
     8    <!--
     9         Supports four build options:
     10         1) war (jsonrpc.war) for running under the console
     11         2) jar (i2pcontrol.jar) for starting and running on its own Jetty instance,
     12            no console dependency
     13         3) socketJar (i2pcontrol.jar) for running on a ServerSocket (JSON splitting),
     14            no Jetty dependency (Work in progress)
     15         4) TODO xxxjar with bundled, small non-Jetty server, similar to I2PTunnelHTTPClient?
     16     -->
    617
    718    <path id="cp">
    819        <pathelement location="${i2plib}/i2p.jar" />
    920        <pathelement location="${i2plib}/router.jar" />
    10         <pathelement location="${i2plib}/org.mortbay.jetty.jar" />
    11         <pathelement location="${i2plib}/javax.servlet.jar" />
    12         <pathelement location="${i2plib}/jetty-servlet.jar" />
     21        <pathelement location="${jettylib}/org.mortbay.jetty.jar" />
     22        <pathelement location="${jettylib}/javax.servlet.jar" />
     23        <pathelement location="${jettylib}/jetty-servlet.jar" />
     24        <pathelement location="${wrapperlib}/wrapper.jar" />
     25    </path>
     26
     27    <path id="cpSocket">
     28        <pathelement location="${i2plib}/i2p.jar" />
     29        <pathelement location="${i2plib}/router.jar" />
     30        <!-- TODO get rid of wraper dependency also -->
    1331        <pathelement location="${wrapperlib}/wrapper.jar" />
    1432    </path>
     
    4563    </target>
    4664
     65    <!--
     66      More TODO here. jsonrpc2 lib uses MessageContext which depends on servlet
     67     -->
     68    <target name="compileSocketJar" depends="builddep" >
     69        <mkdir dir="./build" />
     70        <mkdir dir="./build/obj" />
     71        <javac
     72            sourcepath=""
     73            srcdir="./java"
     74            debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
     75            includeAntRuntime="false"
     76            destdir="./build/obj"
     77            classpath="${cpSocket}">
     78            <compilerarg line="${javac.compilerargs}" />
     79            <classpath refid="cpSocket" />
     80            <exclude name="**/I2PControlController.java" />
     81            <exclude name="**/HostCheckHandler.java" />
     82            <exclude name="**/JSONRPC2Servlet.java" />
     83        </javac>
     84    </target>
     85
    4786    <target name="jar" depends="compile">
    48         <jar destfile="build/I2PControl.jar" basedir="./build/obj" includes="**/*.class" >
     87        <jar destfile="build/i2pcontrol.jar" basedir="./build/obj" includes="**/*.class" >
     88            <manifest>
     89                <attribute name="Implementation-Version" value="${full.version}" />
     90                <attribute name="Built-By" value="${build.built-by}" />
     91                <attribute name="Build-Date" value="${build.timestamp}" />
     92                <attribute name="Base-Revision" value="${workspace.version}" />
     93                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     94                <attribute name="X-Compile-Source-JDK" value="${javac.version}" />
     95                <attribute name="X-Compile-Target-JDK" value="${javac.version}" />
     96            </manifest>
     97        </jar>
     98    </target>   
     99
     100    <target name="socketJar" depends="compileSocketJar">
     101        <jar destfile="build/i2pcontrol.jar" basedir="./build/obj" includes="**/*.class" >
     102            <manifest>
     103                <attribute name="Implementation-Version" value="${full.version}" />
     104                <attribute name="Built-By" value="${build.built-by}" />
     105                <attribute name="Build-Date" value="${build.timestamp}" />
     106                <attribute name="Base-Revision" value="${workspace.version}" />
     107                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     108                <attribute name="X-Compile-Source-JDK" value="${javac.version}" />
     109                <attribute name="X-Compile-Target-JDK" value="${javac.version}" />
     110            </manifest>
    49111        </jar>
    50112    </target>   
Note: See TracChangeset for help on using the changeset viewer.