Changeset fda6730 for apps/addressbook


Ignore:
Timestamp:
Mar 18, 2017 2:34:59 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
05aef9b
Parents:
2480155
Message:

Addressbook build changes (ticket #1966):

  • Build as jar, not war
  • Put empty war in updater
  • Move Servlet starter to SusiDNS
  • Skip war in RouterConsoleRunner?
Location:
apps/addressbook
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • apps/addressbook/build.xml

    r2480155 rfda6730  
    99        <property name="javac.compilerargs" value="" />
    1010        <property name="javac.version" value="1.7" />
     11
     12        <target name="all" depends="jar, emptyWar"/>
    1113       
    1214        <target name="init">
     
    3739        </target>
    3840
    39         <target name="dependServlet" if="depend.available">
    40             <depend
    41                 cache="../../build"
    42                 srcdir="${src}"
    43                 destdir="${build}" >
    44                 <!-- Depend on classes instead of jars where available -->
    45                 <classpath>
    46                     <pathelement location="../../core/java/build/obj" />
    47                     <pathelement location="../jetty/jettylib/javax.servlet.jar" />
    48                 </classpath>
    49             </depend>
    50         </target>
    51 
    52         <target name="compile" depends="init, depend">
     41        <target name="compile" depends="init, depend, warUpToDate">
    5342            <javac debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
    5443                       includeAntRuntime="false"
    55                        srcdir="${src}" destdir="${build}"
    56                        excludes="net/i2p/addressbook/Servlet.java">
     44                       srcdir="${src}" destdir="${build}">
    5745            <compilerarg line="${javac.compilerargs}" />
    5846            <classpath>
     
    6250        </target>
    6351
    64         <target name="compileServlet" depends="init, dependServlet, compile">
    65             <javac debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
    66                        includeAntRuntime="false"
    67                        srcdir="${src}" destdir="${build}"
    68                        includes="net/i2p/addressbook/Servlet.java">
    69             <compilerarg line="${javac.compilerargs}" />
    70             <classpath>
    71                 <pathelement location="../../core/java/build/i2p.jar" />
    72                 <pathelement location="../jetty/jettylib/javax.servlet.jar" />
    73             </classpath>
    74                 </javac>
    75         </target>
    76 
    77         <!-- unused for now (except for Android), as we oddly ship addressbook as a .war -->
    7852        <target name="jar" depends="compile, changes">
    7953                <!-- set if unset -->
     
    9266                </jar>
    9367        </target>
    94        
    95         <target name="war" depends="compileServlet, changes, warUpToDate" unless="war.uptodate">
    96                 <mkdir dir="${dist}/tmp"/>
    97                 <mkdir dir="${dist}/tmp/WEB-INF"/>
    98                 <mkdir dir="${dist}/tmp/WEB-INF/classes"/>
    99                 <copy todir="${dist}/tmp/WEB-INF/classes">
    100                         <fileset dir="${build}"/>
    101                 </copy>
    102                 <!-- set if unset -->
    103                 <property name="workspace.changes.tr" value="" />
    104                 <war basedir="${dist}/tmp" webxml="web.xml" destfile="${dist}/${war}">
    105                         <manifest>
    106                                 <attribute name="Implementation-Version" value="${full.version}" />
    107                                 <attribute name="Built-By" value="${build.built-by}" />
    108                                 <attribute name="Build-Date" value="${build.timestamp}" />
    109                                 <attribute name="Base-Revision" value="${workspace.version}" />
    110                                 <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
    111                                 <attribute name="X-Compile-Source-JDK" value="${javac.version}" />
    112                                 <attribute name="X-Compile-Target-JDK" value="${javac.version}" />
    113                         </manifest>
    114                 </war>
    115                 <delete dir="${dist}/tmp"/>
    116         </target>
     68
     69        <target name="emptyWar" depends="init">
     70            <jar destfile="${dist}/${war}" >
     71                <manifest>
     72                    <attribute name="Note" value="Intentionally empty" />
     73                </manifest>
     74            </jar>
     75        </target>
    11776       
    11877        <target name="warUpToDate">
Note: See TracChangeset for help on using the changeset viewer.