-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
81 lines (66 loc) · 2.96 KB
/
build.xml
File metadata and controls
81 lines (66 loc) · 2.96 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
<project name="evlampia.core" default="pack" xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="ivy.install.version" value="2.3.0-rc2"/>
<property name="ivy.jar.dir" value="${basedir}/ivy"/>
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
<property name="build.dir" value="build"/>
<property name="src.dir" value="src"/>
<property name="lib.dir" value="lib"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="out.dir" value="${build.dir}/out"/>
<path id="lib.path.id">
<fileset dir="${lib.dir}"/>
</path>
<path id="run.path.id">
<path refid="lib.path.id"/>
<path location="${classes.dir}"/>
</path>
<target name="download-ivy" unless="skip.download">
<mkdir dir="${ivy.jar.dir}"/>
<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">
<pathelement location="${ivy.jar.file}"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<target name="resolve" depends="install-ivy" description="--> retreive dependencies with ivy">
<ivy:retrieve/>
</target>
<target name="report" depends="resolve" description="--> generates a report of dependencies">
<ivy:report todir="${build.dir}"/>
</target>
<target name="build" depends="resolve" description="--> compile and run the project">
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="lib.path.id" includeAntRuntime="false"
debug="false" deprecation="true" optimize="true"/>
</target>
<target name="pack" depends="build">
<mkdir dir="${out.dir}"/>
<jar jarfile="${out.dir}/${ant.project.name}.jar">
<fileset dir="${classes.dir}"/>
<manifest>
<attribute name="Bundle-Activator" value="org.evlampia.core.CoreActivator"/>
<attribute name="Import-Package" value="org.osgi.framework"/>
</manifest>
</jar>
</target>
<target name="clean" description="--> clean the project">
<delete includeemptydirs="true">
<fileset dir="${basedir}">
<exclude name="src/**"/>
<exclude name="etc/**"/>
<exclude name=".idea/**"/>
<exclude name="build.xml"/>
<exclude name="ivy.xml"/>
<exclude name="eva.iml"/>
</fileset>
</delete>
</target>
<target name="clean-cache" description="--> clean the ivy cache">
<ivy:cleancache/>
</target>
</project>