-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathbuild.xml
118 lines (106 loc) · 4.61 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
<project name="Genbank genome uploader" default="compile" basedir=".">
<description>
Build jar-file for genome uploader in genbank format
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="dst" location="lib/jars"/>
<property name="classes" location="classes"/>
<property name="jar.file" value="kbase_transform_deps.jar"/>
<property name="jarsdir" value="../jars/lib/jars"/>
<property name="doc" location="docs/javadoc"/>
<property name="dst.jar.dir" value="lib/jars/kbase/transform/"/>
<property name="tempunpack" location="unpackedjars"/>
<property name="war.file" value="KBaseDataImport.war"/>
<property name="war.dir" value="war"/>
<fileset dir="${jarsdir}" id="lib">
<include name="apache_commons/commons-codec-1.8.jar"/>
<include name="apache_commons/commons-io-2.4.jar"/>
<include name="apache_commons/commons-fileupload-1.2.2.jar"/>
<include name="apache_commons/commons-cli-1.2.jar"/>
<include name="apache_commons/commons-lang3-3.1.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="google/guava-14.0.1.jar"/>
<include name="kbase/genomes/kbase-genomes-20140411.jar"/>
<include name="kbase/auth/kbase-auth-1398468950-3552bb2.jar"/>
<include name="kbase/genomes/kbase-genomes-20140411.jar"/>
<include name="kbase/common/kbase-common-0.0.7.jar"/>
<include name="kbase/workspace/WorkspaceClient-0.2.0.jar"/>
<include name="kbase/workspace/WorkspaceService-0.2.0.jar"/>
<include name="ini4j/ini4j-0.5.2.jar"/>
<include name="junit/junit-4.9.jar"/>
<include name="strbio/strbio-1.3.jar"/>
<!-- Might not need the following jars (may need refactoring code) -->
<include name="kbase/kidl/kbase-kidl-parser2.jar"/>
<include name="servlet/servlet-api-2.5.jar"/>
<include name="jetty/jetty-all-7.0.0.jar"/>
</fileset>
<path id="compile.classpath">
<fileset refid="lib"/>
</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="${dst}"/>
<mkdir dir="${dst.jar.dir}"/>
</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="${src}">
</fileset>
</copy>
<unzip dest="${classes}">
<fileset refid="lib"/>
</unzip>
<jar destfile="${dst.jar.dir}/${jar.file}" basedir="${classes}"/>
</target>
<target name="javadoc" description="build javadocs">
<unzip dest="${tempunpack}">
<fileset refid="lib"/>
</unzip>
<javadoc access="protected" author="false" classpathref="compile.classpath"
destdir="${doc}" nodeprecated="false" nodeprecatedlist="false"
noindex="false" nonavbar="false" notree="false"
source="1.7" splitindex="true" use="true" version="true">
<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/"/>
<fileset refid="client-jdoc-files"/>
<fileset refid="sources-jdoc-files"/>
</javadoc>
<delete dir="${tempunpack}"/>
</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 genbank uploader">
<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="${dst}"/>
</target>
</project>