-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
134 lines (112 loc) · 4.83 KB
/
Copy pathbuild.xml
File metadata and controls
134 lines (112 loc) · 4.83 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
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="jlibiada-core-fast" default="ftp-publish">
<property name="ivy.install.version" value="2.2.0"/>
<property name="ivy.jar.dir" value="${basedir}/ivy"/>
<property name="ivy.lib.dir" value="lib"/>
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
<property name="jsch.jar.name" value="jsch-0.1.45.jar"/>
<property name="source" value="src"/>
<property name="source.main" value="${source}/main"/>
<property name="source.test" value="${source}/test"/>
<property name="build" value="build"/>
<property name="build.main" value="${build}/main"/>
<property name="build.test" value="${build}/test"/>
<property name="reports" value="reports"/>
<property name="reports.test.xml" value="${reports}/test/xml/"/>
<property name="dist" value="dist"/>
<path id="compile.classpath">
<fileset dir="${ivy.lib.dir}/compile">
<include name="*.jar"/>
</fileset>
</path>
<path id="test.compile.classpath">
<fileset dir="${ivy.lib.dir}/test">
<include name="*.jar"/>
</fileset>
<pathelement location="${build.main}"/>
</path>
<path id="test.classpath">
<path refid="test.compile.classpath"/>
<pathelement location="${build.test}"/>
</path>
<target name="init" depends="clean">
<mkdir dir="${dist}"/>
<mkdir dir="${build.main}"/>
<mkdir dir="${build.test}"/>
<mkdir dir="lib"/>
<mkdir dir="${reports.test.xml}"/>
</target>
<target name="compile" depends="init, install-ivy, download-ivy, ivy-retrieve">
<javac srcdir="${source.main}"
destdir="${build.main}"
includeantruntime="false"
debug="true">
<classpath refid="compile.classpath"/>
</javac>
</target>
<target name="archive" depends="compile">
<jar basedir="${build.main}" destfile="${dist}/jlibiada-core-fast.jar"/>
</target>
<target name="clean" depends="clean-cache, clean-ivy">
<delete dir="${dist}"/>
<delete dir="${build}"/>
<delete dir="${reports}"/>
</target>
<target name="test-compile" depends="compile">
<javac destdir="${build.test}"
debug="true"
includeantruntime="false"
srcdir="${source.test}">
<classpath refid="test.compile.classpath"/>
</javac>
</target>
<target name="test-basic" depends="test-compile">
<junit printsummary="false" haltonfailure="false">
<classpath refid="test.classpath"/>
<formatter type="xml"/>
<!--<test todir="${reports.test.xml}" name="test.FastChainAlgoritms.FastChainAlgorithms.FastChain.Calculators.testMuCalculator"/>-->
<batchtest todir="${reports.test.xml}">
<fileset dir="${build.test}" includes="**/*.class"/>
</batchtest>
</junit>
</target>
<target name="jar-make" depends="test-basic">
<jar destfile="${dist}/jlibiada-core-fast.jar" basedir="${build.main}"/>
</target>
<target name="download-ivy" unless="skip.download">
<mkdir dir="${ivy.jar.dir}"/>
<!--
download Ivy from web site so that it can be used even without any special installation
-->
<echo message="installing ivy..."/>
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<target name="install-ivy" depends="download-ivy" description="--> install ivy">
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.jar.file};${ivy.jar.dir}/${jsch.jar.name}"/>
</target>
<target name="clean-ivy" description="--> clean the ivy installation">
<!--<delete dir="${ivy.jar.dir}"/>-->
</target>
<!--
================================= target: clean-cache =================================
-->
<target name="clean-cache" depends="install-ivy" description="--> clean the ivy cache">
<ivy:cleancache/>
</target>
<target name="ivy-resolve">
<!--<ivy:configure file="${basedir}/ivyconf.xml"/>-->
<ivy:resolve />
</target>
<target name="ivy-retrieve" depends="ivy-resolve">
<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact]-[revision].[ext]" sync="true"/>
</target>
<target name="ftp-publish" depends="jar-make">
<ivy:publish resolver="ssh-serv"
pubrevision="1.0"
overwrite="true"
artifactspattern="${dist}/[artifact].[ext]"/>
</target>
</project>