blob: d23e49e3828c6a0fb6a7d3096748c6e6dd14a1d6 (
plain)
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
|
<project name="interfaceLibrary" default="build" basedir=".">
<target name="build" depends="init">
<iajc
classpath="${aspectjrt.jar}"
outjar="interfaceOnly.jar"
srcdir="."
includes="lib/LibraryInterface.java"/>
<iajc
classpath="${aspectjrt.jar}${path.separator}interfaceOnly.jar"
outjar="aspectOnly.jar"
srcdir="."
includes="LibraryAspect.java"/>
<iajc
classpath="${aspectjrt.jar}"
aspectpath="aspectOnly.jar"
outjar="aspectedInterfaceOnly.jar"
srcdir="."
includes="lib/LibraryInterface.java"/>
<iajc
classpath="${aspectjrt.jar}"
aspectpath="aspectOnly.jar"
injars="interfaceOnly.jar"
outjar="aspectedInterfaceOnlyBinary.jar"/>
</target>
<target name="init" depends="init.variables,init.taskdefs"/>
<target name="init.variables"
description="init variables">
<!-- required directories - run from examples or predefine -->
<property name="interfaceLibrary.dir"
location="${basedir}"/>
<property name="aspectj.lib.dir"
location="${interfaceLibrary.dir}/../../../aj-build/dist/tools/lib"/>
<!-- required libraries - install or predefine -->
<property name="aspectjrt.jar"
location="${aspectj.lib.dir}/aspectjrt.jar"/>
<property name="aspectjtools.jar"
location="${aspectj.lib.dir}/aspectjtools.jar"/>
<!-- checking required libraries -->
<available file="${aspectjtools.jar}"
property="aspectjtools.jar.available"/>
<available file="${aspectjrt.jar}"
property="aspectjrt.jar.available"/>
</target>
<target name="init.taskdefs" depends="init.variables,
aspectjtools.jar.available,
aspectjrt.jar.available"
unless="taskdefs.init">
<!-- sets name of new task to iajc, old task to ajc -->
<taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
<classpath>
<pathelement path="${aspectjtools.jar}"/>
</classpath>
</taskdef>
<property name="taskdefs.init" value="true"/>
</target>
<!-- targets to fail unless required libraries available -->
<target name="aspectjrt.jar.available" depends="init.variables"
unless="aspectjrt.jar.available" >
<fail message="expecting aspectjrt.jar at ${aspectjrt.jar}"/>
</target>
<target name="aspectjtools.jar.available" depends="init.variables"
unless="aspectjtools.jar.available" >
<fail message="expecting aspectjtools.jar at ${aspectjtools.jar}"/>
</target>
</project>
|