This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildAndRun.xml
65 lines (53 loc) · 2.33 KB
/
buildAndRun.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
<?xml version="1.0"?>
<project name="builds bundlebee and runs it on equinox" default="all">
<description>
Simple script for building BundleBee using Maven and
then deploying to and running on Equinox.
Author: Hendrik Schreiber, hs@tagtraum.com
</description>
<condition property="maven.executable" value="mvn.bat" else="mvn">
<os family="windows"/>
</condition>
<property name="org.osgi.service.http.port" value="48110"/>
<property name="version" value="0.5.2-SNAPSHOT"/>
<target name="build">
<exec executable="${maven.executable}">
<arg value="-Dmaven.test.skip=true"/>
<arg value="clean"/>
<arg value="install"/>
</exec>
<exec executable="${maven.executable}" dir="Assembly">
<arg value="assembly:assembly"/>
</exec>
</target>
<target name="test" depends="installdependencieslocally">
<exec executable="${maven.executable}">
<arg value="-Dmaven.test.skip=false"/>
<arg value="clean"/>
<arg value="install"/>
</exec>
<exec executable="${maven.executable}" dir="Assembly">
<arg value="assembly:assembly"/>
</exec>
</target>
<target name="installdependencieslocally">
<ant antfile="installDependenciesLocally.xml"/>
</target>
<target name="run">
<available file="Assembly/target/org.bundlebee.assembly_${version}-equinox.zip" type="file" property="equinox.assembly.present"/>
<fail unless="equinox.assembly.present">Failed to find Equinox assembly. Run with target 'all'.</fail>
<tstamp/>
<property name="temp.dir" value="${java.io.tmpdir}/bundlebee-${DSTAMP}-${TSTAMP}"/>
<mkdir dir="${temp.dir}"/>
<unzip src="Assembly/target/org.bundlebee.assembly_${version}-equinox.zip" dest="${temp.dir}"/>
<echo>Starting Equinox.... in ${temp.dir}</echo>
<echo>Use help, ss, install, etc. as needed.</echo>
<chmod file="${temp.dir}/run.sh" perm="755"/>
<ant antfile="${temp.dir}/run.xml" dir="${temp.dir}"/>
<concat>
<fileset dir="${temp.dir}/plugins" includes="*.log"/>
</concat>
<echo>Stopped Equinox launched from ${temp.dir}</echo>
</target>
<target name="all" depends="test,run"/>
</project>