-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
181 lines (151 loc) · 8.32 KB
/
Copy pathbuild.xml
File metadata and controls
181 lines (151 loc) · 8.32 KB
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<project name="dgdweb" default="build" basedir=".">
<property name="src.dir" value="src/java"/>
<property name="build.dir" value="classes"/>
<property name="lib.dir" value="lib"/>
<property name="doc.dir" value="doc"/>
<property name="logs.dir" value="logs"/>
<property name="name" value="dgdweb"/>
<property name="war.src" value="webapp" />
<property name="web.lib.dir" value="${war.src}/WEB-INF/lib" />
<property name="dist.dir" value="dist" />
<property name="primer.dir" value="/data/" />
<property name="testFile.dir" value="${dist.dir}/antholigo_test" />
<path id="master-classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<!-- Remove old build files -->
<target name="clean" description="Clean output directories">
<delete dir="${build.dir}"/>
<delete file="${lib.dir}/${name}.jar" failonerror="false"/>
<delete file="${web.lib.dir}/${name}.jar" failonerror="false"/>
<delete file="dist/${name}.war" failonerror="false"/>
</target>
<!--Prepare for build -->
<target name="prepare" description="Prepare for build">
<mkdir dir="${build.dir}"/>
<mkdir dir="${doc.dir}"/>
<mkdir dir="${lib.dir}"/>
<mkdir dir="${logs.dir}"/>
<mkdir dir="${web.lib.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${testFile.dir}" />
<!--<delete file="${war.src}/WEB-INF/applicationContext.xml" failonerror="false"/>-->
<delete file="${war.src}/WEB-INF/mvc-dispatcher-servlet.xml" failonerror="false"/>
<copy todir="${web.lib.dir}" description="">
<files includes="${lib.dir}/*.jar"/>
</copy>
<copy todir="${war.src}/WEB-INF" description="" file="${war.src}/WEB-INF/web.xml">
</copy>
</target>
<!-- Compile all of our class files -->
<target name="build" depends="prepare" description="Compile main source tree java files and build war file">
<javac destdir="${build.dir}" target="1.7" debug="true" deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
<!-- <copy todir="${build.dir}" file="${src.dir}/log4j.properties"/> -->
<jar destfile="${dist.dir}/${name}.jar">
<fileset dir="${build.dir}"/>
</jar>
<jar destfile="${web.lib.dir}/${name}.jar">
<fileset dir="${build.dir}"/>
</jar>
<!--<copy file="${war.src}/WEB-INF/applicationContext.xml.prod" tofile="${war.src}/WEB-INF/applicationContext.xml"/>-->
<copy file="${war.src}/WEB-INF/mvc-dispatcher-servlet.xml.prod" tofile="${war.src}/WEB-INF/mvc-dispatcher-servlet.xml"/>
<copy file="${src.dir}/PrimerProcess.sh" tofile="${primer.dir}/PrimerProcess.sh"/>
<copy file="${src.dir}/PrimerProcess.sh" tofile="${dist.dir}/PrimerProcess.sh"/>
<copy file="${src.dir}/HeteroDimerAnalyzeProcess.sh" tofile="${primer.dir}/HeteroDimerAnalyzeProcess.sh"/>
<copy file="${src.dir}/HeteroDimerAnalyzeProcess.sh" tofile="${dist.dir}/HeteroDimerAnalyzeProcess.sh"/>
<copy file="${src.dir}/OligoProcess.sh" tofile="${primer.dir}/OligoProcess.sh"/>
<copy file="${src.dir}/OligoProcess.sh" tofile="${dist.dir}/OligoProcess.sh"/>
<copy file="${src.dir}/RetrieveSequence.sh" tofile="${primer.dir}/RetrieveSequence.sh"/>
<copy file="${src.dir}/RetrieveSequence.sh" tofile="${dist.dir}/RetrieveSequence.sh"/>
<copy file="antholigo_test/antholigo_test.txt" tofile="${testFile.dir}/antholigo_test.txt"/>
<fixcrlf srcdir="${dist.dir}" includes="**/*.sh" eol="crlf" />
<war destfile="${dist.dir}/${name}.war" webxml="${war.src}/WEB-INF/web.xml">
<fileset dir="${war.src}">
</fileset>
</war>
<mkdir dir="docs"/>
<javadoc
destdir="docs/${name}"
author="true"
version="true"
use="true"
windowtitle="${name}">
<classpath refid="master-classpath"/>
<fileset dir="src" defaultexcludes="yes">
<!--<include name="com/dummy/test/**"/>
<exclude name="com/dummy/test/doc-files/**"/>-->
</fileset>
</javadoc>
</target>
<target name="buildProdNoJavaDoc" depends="prepare" description="Build prod without running javadoc">
<javac destdir="${build.dir}" target="1.7" includeantruntime="yes" debug="true" deprecation="false" optimize="true" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
<!-- <copy todir="${build.dir}" file="${src.dir}/log4j.properties"/> -->
<jar destfile="${dist.dir}/${name}.jar">
<fileset dir="${build.dir}"/>
</jar>
<jar destfile="${web.lib.dir}/${name}.jar">
<fileset dir="${build.dir}"/>
</jar>
<!--<copy file="${war.src}/WEB-INF/applicationContext.xml.curation" tofile="${war.src}/WEB-INF/applicationContext.xml"/>-->
<copy file="${war.src}/WEB-INF/mvc-dispatcher-servlet.xml.prod" tofile="${war.src}/WEB-INF/mvc-dispatcher-servlet.xml"/>
<copy file="${src.dir}/PrimerProcess.sh" tofile="${primer.dir}/PrimerProcess.sh"/>
<copy file="${src.dir}/PrimerProcess.sh" tofile="${dist.dir}/PrimerProcess.sh"/>
<copy file="${src.dir}/primer3_settings.txt" tofile="${primer.dir}/primer3_settings.txt"/>
<copy file="${src.dir}/primer3_settings.txt" tofile="${dist.dir}/primer3_settings.txt"/>
<copy file="${src.dir}/HeteroDimerAnalyzeProcess.sh" tofile="${primer.dir}/HeteroDimerAnalyzeProcess.sh"/>
<copy file="${src.dir}/HeteroDimerAnalyzeProcess.sh" tofile="${dist.dir}/HeteroDimerAnalyzeProcess.sh"/>
<copy file="${src.dir}/OligoProcess.sh" tofile="${primer.dir}/OligoProcess.sh"/>
<copy file="${src.dir}/OligoProcess.sh" tofile="${dist.dir}/OligoProcess.sh"/>
<copy file="${src.dir}/oligo_settings.txt" tofile="${primer.dir}/oligo_settings.txt"/>
<copy file="${src.dir}/oligo_settings.txt" tofile="${dist.dir}/oligo_settings.txt"/>
<copy file="${src.dir}/RetrieveSequence.sh" tofile="${primer.dir}/RetrieveSequence.sh"/>
<copy file="${src.dir}/RetrieveSequence.sh" tofile="${dist.dir}/RetrieveSequence.sh"/>
<copy file="antholigo_test/antholigo_test.txt" tofile="${testFile.dir}/antholigo_test.txt"/>
<fixcrlf srcdir="${dist.dir}" includes="**/*.sh" eol="crlf" />
<war destfile="${dist.dir}/${name}.war" webxml="${war.src}/WEB-INF/web.xml">
<fileset dir="${war.src}" >
</fileset>
</war>
</target>
<!-- Compile all of our class files -->
<target name="buildProd" depends="buildProdNoJavaDoc,buildJavaDoc" description="Compile main source tree java files and build war file">
</target>
<target name="buildLocalProdNoJavaDoc" depends="buildProdNoJavaDoc" description="Build dgd on local tomcat without running javadoc">
<copy todir="/Applications/Tomcat7/webapps" file="${dist.dir}/${name}.war"/>
</target>
<!-- Compile all of our class files -->
<target name="buildJavaDoc" depends="prepare" description="Build JavaDoc files">
<mkdir dir="docs"/>
<javadoc
destdir="docs/${name}"
author="true"
version="true"
use="true"
windowtitle="${name}">
<classpath refid="master-classpath"/>
<fileset dir="src" defaultexcludes="yes">
<!--<include name="com/dummy/test/**"/>
<exclude name="com/dummy/test/doc-files/**"/>-->
</fileset>
</javadoc>
</target>
<target name="git-revision">
<taskdef name="jgit-buildnumber" classname="ru.concerteza.util.buildnumber.JGitBuildNumberAntTask" classpathref="master-classpath"/>
<jgit-buildnumber/>
<script language="javascript">
var tag = project.getProperty("git.tag")
var revision = project.getProperty("git.shortRevision")
var buildnumber = tag + "_" + revision
project.setProperty("git.buildnumber", buildnumber)
</script>
<echo>Git version extracted ${git.commitsCount} (${git.shortRevision})</echo>
</target>
</project>