forked from kbaseattic/gene_families
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
145 lines (132 loc) · 5.44 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<project name="Gene Family Service" default="compile" basedir=".">
<description>
Build war-file for the Gene Families (Domain) Service
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="dist" location="dist"/>
<property name="classes" location="classes"/>
<property name="jar.file" value="KBaseGeneFamilies.jar"/>
<property name="service" value="service"/>
<property name="war.file" value="KBaseGeneFamilies.war"/>
<property name="war" value="war"/>
<property name="war.lib" value="${war}/lib"/>
<property name="docs" value="docs/javadoc"/>
<property name="jarsdir" value="../jars/lib/jars"/>
<property name="bindir" value="data/bin/"/>
<property name="deploycfg" value="./"/>
<fileset dir="${jarsdir}" id="serverlib">
<include name="ini4j/ini4j-0.5.2.jar"/>
<include name="jetty/jetty-all-7.0.0.jar"/>
<include name="jna/jna-3.4.0.jar"/>
<include name="servlet/servlet-api-2.5.jar"/>
<include name="syslog4j/syslog4j-0.9.46.jar"/>
<include name="junit/junit-4.9.jar"/>
<include name="strbio/strbio-1.3.jar"/>
<include name="kbase/auth/kbase-auth-1398468950-3552bb2.jar"/>
<include name="jackson/jackson-annotations-2.2.3.jar"/>
<include name="jackson/jackson-core-2.2.3.jar"/>
<include name="jackson/jackson-databind-2.2.3.jar"/>
<include name="kbase/kbase-common-temp.jar" />
<include name="kbase/shock/shock-client-0.0.8.jar" />
<include name="kbase/workspace/WorkspaceClient-0.2.0.jar"/>
<include name="kbase/genomes/kbase-genomes-20140411.jar"/>
<include name="apache_commons/commons-logging-1.1.1.jar"/>
<include name="apache_commons/http/httpclient-4.3.1.jar"/>
<include name="apache_commons/http/httpcore-4.3.jar"/>
<include name="apache_commons/http/httpmime-4.3.1.jar"/>
<include name="apache_commons/commons-codec-1.8.jar"/>
<include name="apache_commons/commons-io-2.4.jar"/>
<include name="apache_commons/commons-lang3-3.1.jar"/>
</fileset>
<path id="compile.classpath">
<fileset refid="serverlib"/>
</path>
<path id="test.classpath">
<path refid="compile.classpath"/>
<pathelement path="${classes}"/>
</path>
<target name="init" description="make directories">
<!-- Create the output directory structure-->
<mkdir dir="${classes}"/>
<mkdir dir="${dist}"/>
</target>
<target name="compile" depends="init" description="compile the source">
<!-- Compile class files-->
<javac destdir="${classes}" includeantruntime="false" target="1.7" source="1.7" debug="true" classpathref="compile.classpath">
<src path="${src}"/>
</javac>
<!-- Copy resource files-->
<copy todir="${classes}">
<fileset dir="${deploycfg}">
<include name="*.properties"/>
</fileset>
<fileset dir="${bindir}">
<include name="*"/>
</fileset>
</copy>
<unzip dest="${classes}">
<fileset refid="serverlib"/>
</unzip>
<jar destfile="${dist}/${jar.file}" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="us.kbase.kbasegenefamilies.prepare.DomainModelLibPreparation"/>
</manifest>
</jar>
</target>
<target name="war" depends="compile" description="build the WAR file. Assumes compile has been run">
<!-- make the war file for the server-->
<mkdir dir="${war}"/>
<copy todir="${war}/" flatten="true">
<resources>
<file file="${service}/web.xml"/>
</resources>
</copy>
<mkdir dir="${war.lib}"/>
<copy todir="${war.lib}/" flatten="true">
<fileset refid="serverlib"/>
<resources>
<file file="${dist}/${jar.file}"/>
</resources>
</copy>
<war destfile="${dist}/${war.file}" webxml="${war}/web.xml">
<lib dir="${war.lib}"/>
</war>
<delete dir="${war.lib}"/>
<delete dir="${war}"/>
</target>
<target name="javadoc" description="build javadocs">
<javadoc access="protected" author="false" classpathref="compile.classpath"
destdir="${docs}" nodeprecated="false" nodeprecatedlist="false"
noindex="false" nonavbar="false" notree="false"
source="1.7" splitindex="true" use="true" version="true"
packagenames="us.kbase.kbasegenefamilies.*" sourcepath="${src}">
<link href="http://download.oracle.com/javase/7/docs/api/"/>
<link href="http://fasterxml.github.io/jackson-core/javadoc/2.2.0/"/>
<link href="http://fasterxml.github.io/jackson-databind/javadoc/2.2.0/"/>
</javadoc>
</target>
<target name="preparejunitreportdir" if="env.JENKINS_REPORT_DIR">
<delete dir="${env.JENKINS_REPORT_DIR}"/>
<mkdir dir="${env.JENKINS_REPORT_DIR}"/>
</target>
<target name="test" depends="compile, preparejunitreportdir" description="Testing gene families service">
<junit fork="yes" maxmemory="3G" haltonfailure="yes">
<classpath refid="test.classpath"/>
<formatter type="plain" usefile="false" />
<formatter type="xml" usefile="true" if="env.JENKINS_REPORT_DIR"/>
<batchtest todir="${env.JENKINS_REPORT_DIR}">
<fileset dir="${src}">
<include name="**/test/**/**Test.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Test failure detected, check test results." if="test.failed" />
</target>
<target name="clean" description="clean up" >
<!-- Clean up internal temporary files and folders-->
<delete dir="${classes}"/>
<delete dir="${dist}"/>
<!--<delete dir="${test}"/>-->
</target>
</project>