onionoo/build.xml
2020-04-03 08:34:39 +02:00

125 lines
4.4 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE project [
<!ENTITY base SYSTEM "src/build/java/base.xml">
]>
<project default="usage" name="Onionoo" basedir="."
xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="javadoc-title" value="Onionoo API Documentation"/>
<property name="implementation-title" value="Onionoo" />
<property name="onionoo.protocol.version" value="8.0"/>
<property name="release.version"
value="${onionoo.protocol.version}-1.25.0-dev"/>
<property name="metricslibversion" value="2.10.0"/>
<property name="jetty.version" value="-9.2.21.v20170120" />
<property name="warfile"
value="onionoo-${release.version}.war"/>
<!-- Name to appear in jar names etc. -->
<property name="name" value="onionoo"/>
<!-- If 'project-main-class' is not provided, a library jar is created. -->
<property name="project-main-class"
value="org.torproject.metrics.onionoo.cron.Main" />
<property name="jarincludes" value="logback.xml" />
<property name="jarpatternprop" value="library" />
<property name="additional2sign" value="${warfile}" />
<property name="tardepends" value="war" />
<target name="coverage-check">
<cobertura-check branchrate="0" linerate="0"
totallinerate="34" totalbranchrate="30" >
<regex pattern="org.torproject.metrics.onionoo.server"
branchrate="67" linerate="77"/>
<regex pattern="org.torproject.metrics.onionoo.docs"
branchrate="19" linerate="29"/>
<regex pattern="org.torproject.metrics.onionoo.updater"
branchrate="17" linerate="18"/>
<regex pattern="org.torproject.metrics.onionoo.writer"
branchrate="22" linerate="20"/>
</cobertura-check>
</target>
<patternset id="library" >
<include name="metrics-lib-${metricslibversion}-thin.jar"/>
<include name="commons-codec-1.10.jar"/>
<include name="commons-compress-1.13.jar"/>
<include name="commons-lang3-3.5.jar"/>
<include name="jackson-annotations-2.8.6.jar"/>
<include name="jackson-core-2.8.6.jar"/>
<include name="jackson-databind-2.8.6.jar"/>
<include name="logback-classic-1.1.9.jar"/>
<include name="logback-core-1.1.9.jar"/>
<include name="slf4j-api-1.7.22.jar"/>
<include name="xz-1.6.jar"/>
</patternset>
<patternset id="web" >
<include name="javax.servlet-api-3.1.0.jar"/>
<include name="jetty-server${jetty.version}.jar"/>
<include name="jetty-servlets${jetty.version}.jar"/>
<include name="jetty-servlet${jetty.version}.jar"/>
<include name="jetty-util${jetty.version}.jar"/>
<include name="jetty-http${jetty.version}.jar"/>
<include name="jetty-io${jetty.version}.jar"/>
<include name="jetty-xml${jetty.version}.jar"/>
<include name="jetty-webapp${jetty.version}.jar"/>
<include name="jetty-continuation${jetty.version}.jar"/>
<include name="jetty-security${jetty.version}.jar"/>
</patternset>
<patternset id="runtime" >
<patternset refid="library" />
<patternset refid="web" />
</patternset>
<target name="war"
depends="jar">
<war destfile="${dist}/${warfile}"
webxml="${resources}/web.xml"
basedir="${classes}">
<fileset dir="${resources}/web"/>
<restrict>
<not>
<name name="META-INF/*" />
</not>
<archives>
<zips>
<fileset dir="${libs}">
<patternset refid="runtime" />
</fileset>
</zips>
</archives>
</restrict>
<fileset dir="${resources}" includes="jetty.xml" />
<exclude name="**/Test*.class"/>
<zipfileset dir="${buildresources}"
prefix=""
includes="logback.xml"/>
<zipfileset dir="${resources}"
prefix="WEB-INF/classes"
includes="logback.xml"/>
<metainf dir="${resources}"
includes="context.xml"/>
<manifest>
<attribute name="Implemented-By" value="The Tor Project" />
<attribute name="Implementation-Title" value="Onionoo Server"/>
<attribute name="Implementation-Version"
value="${release.version}-${git.revision}"/>
<attribute name="Main-Class"
value="org.torproject.metrics.onionoo.server.ServerMain" />
</manifest>
</war>
</target>
<!-- The following line adds the common targets and properties
for Metrics' Java Projects.
-->
&base;
</project>