-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
89 lines (72 loc) · 3.55 KB
/
build.xml
File metadata and controls
89 lines (72 loc) · 3.55 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
<project xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="lib.dir" value="./lib"/>
<!-- ivy start -->
<property name="ivy.install.version" value="2.1.0-rc2" />
<condition property="ivy.home" value="${env.IVY_HOME}">
<isset property="env.IVY_HOME" />
</condition>
<property name="ivy.home" value="${basedir}/.ant" />
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
<property name="ivy.settings.dir" value="." />
<property name="apache.ant.ext.lib" value="{ivy.home}"/>
<path id="ivy.classpath" path="${ivy.jar.file}" />
<typedef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant"
classpathref="ivy.classpath" />
<target name="download-ivy" unless="offline">
<mkdir dir="${ivy.jar.dir}"/>
<!-- download Ivy from web site so that it can be used even without any special installation -->
<get src="https://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="init-ivy" depends="download-ivy">
<!-- try to load ivy here from ivy home, in case the user has not already dropped
it into ant's lib dir (note that the latter copy will always take precedence).
We will not fail as long as local lib dir exists (it may be empty) and
ivy is in at least one of ant's lib dir or the local lib dir. -->
<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" classpathref="ivy.lib.path"/>
</target>
<target name="convert-pom">
<ivy:convertpom pomFile="pom.xml" ivyFile="ivy.xml" />
</target>
<!-- ivy to get dependencies and copy to project lib folder automatically -->
<target name="resolve-deps" description="retrieve dependencies with ivy">
<echo> Retrieving! ${ivy.settings.dir} </echo>
<ivy:retrieve/>
</target>
<!-- ivy end -->
<target name="clean">
<delete dir="build"/>
<delete dir="lib"/>
</target>
<path id="libs-classpath">
<pathelement location="${basedir}/lib"/>
<fileset dir="${basedir}/lib" includes="*.jar"/>
<!--pathelement location="${basedir}/../rbm-provisor-code-1/dist"/>-->
<!--fileset dir="${basedir}/../rbm-provisor-code-1/dist" includes="*.jar"/>-->
</path>
<target name="compile" depends="resolve-deps">
<pathconvert property="classpathProp" refid="libs-classpath"/>
<echo>Classpath is ${classpathProp}</echo>
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes" debug="true" includeantruntime="false" classpathref="libs-classpath"/>
</target>
<target name="jar" depends="compile">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/LSTMprovisor.jar" basedir="build/classes">
<zipgroupfileset dir="${basedir}/lib" includes="*.jar" />
<!--zipgroupfileset dir="${basedir}/../rbm-provisor-code-1/dist" includes="*.jar" />-->
<manifest>
<attribute name="Main-Class" value="main.Driver"/>
</manifest>
</jar>
</target>
<target name="run">
<java jar="build/jar/LSTMprovisor.jar" fork="true" args="${basedir}/driverconfig.properties"/>
</target>
</project>