My favorites | Sign in
Logo
                
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
<project name="BlueCove Emulator" default="default" basedir=".">
<description>
Open source implementation of JSR-82 Java Bluetooth API. Additional JSR-82 Emulator module.
</description>

<property name="product_version" value="2.1.1-SNAPSHOT"/>

<property name="bluecove_main_dist_dir" location="../bluecove/target"/>
<property name="bluecove_main_jar" location="${bluecove_main_dist_dir}/bluecove-${product_version}.jar"/>

<property name="basedir" value="."/>

<!-- set global properties for this build -->
<property name="src" location="src/main/java"/>
<property name="target" location="target"/>
<property name="build_classes" location="${target}/classes"/>
<property name="dist" location="${target}"/>

<target name="default" depends="compile"/>

<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build_classes}"/>
<available property="bluecove-main.exists" file="${bluecove_main_jar}" type="file"/>
<antcall target="verify-bluecove-main-exists"/>
</target>

<target name="verify-bluecove-main-exists" unless="bluecove-main.exists">
<fail>
The path "${bluecove_main_jar}" does not exist.
Download or build main BlueCove jar.
</fail>
</target>

<target name="compile" depends="init"
description="Compile the source">

<echo message="compiling on java ${java.version}, OS ${os.name} ${os.version} ${os.arch}"/>
<javac source="1.5" target="1.5" debug="true"
srcdir="${src}" destdir="${build_classes}">
<classpath>
<pathelement path="${bluecove_main_jar}"/>
</classpath>
</javac>

</target>

<target name="jar" depends="compile"
description="Create the distribution jar">

<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>

<tstamp>
<format property="today" pattern="yyyy-MM-dd hh:mm:ss" />
</tstamp>

<jar jarfile="${dist}/bluecove-emu-${product_version}.jar">
<manifest>
<attribute name="Description" value="BlueCove JSR-82 implementation, JSR-82 Emulator module"/>
<attribute name="License" value="The Apache Software License, Version 2.0"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Version" value="${product_version}"/>
<attribute name="Build-Date" value="${today}"/>
<attribute name="Build-Jdk" value="${java.runtime.version}"/>
<attribute name="Build-Platform" value="${os.arch} ${os.name} ${os.version}"/>
</manifest>
<fileset dir="${build_classes}">
<include name="**/*.class"/>
<exclude name="**/*.log"/>
<exclude name="**/.*"/>
<exclude name="**/Thumbs.db"/>
</fileset>
</jar>
</target>

<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>

<target name="all" depends="clean, jar"/>
</project>
Show details Hide details

Change log

r2923 by skarzhevskyy on Mar 14, 2009   Diff
Updated manifest creation using ant
Go to: 
Project members, sign in to write a code review

Older revisions

r2919 by skarzhevskyy on Mar 13, 2009   Diff
add ant build for emulator module
All revisions of this file

File info

Size: 3371 bytes, 87 lines

File properties

svn:mime-type
text/xml
svn:eol-style
native
svn:keywords
Date Author Id Revision
Hosted by Google Code