blob: 6f04d98cbf3d717d370bd1f5099a655e73d38ab4 (
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
|
<project name="interfaceDefinition" default="all" basedir=".">
<target name="info">
<echo>
This reproduces bug 43972.
When the implementation of an interface-declared method is defined
by an aspect, the implementing type does not appear to javac to have
the method. To run, build the tree as usual or define aspectj.lib.dir:
ant -Daspectj.lib.dir="c:\aspectj-1.1.1\lib"
</echo>
</target>
<target name="init">
<property name="example.dir"
location="${basedir}"/>
<property name="aspectj.lib.dir"
location="${basedir}/../../../aj-build/dist/tools/lib"/>
<property name="classes.dir"
location="${example.dir}/classes"/>
<property name="aspectjrt.jar"
location="${aspectj.lib.dir}/aspectjrt.jar"/>
<property name="aspectjtools.jar"
location="${aspectj.lib.dir}/aspectjtools.jar"/>
<property name="classes.dir"
location="${example.dir}/classes"/>
</target>
<target name="init.taskdefs" depends="init"
unless="taskdefs.init">
<taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
<classpath>
<pathelement path="${aspectjtools.jar}"/>
</classpath>
</taskdef>
<property name="taskdefs.init" value="true"/>
</target>
<target name="all" depends="init.taskdefs">
<mkdir dir="${classes.dir}"/>
<delete dir="${classes.dir}"/>
<mkdir dir="${classes.dir}"/>
<iajc destdir="${classes.dir}"
fork="true"
forkclasspath="${aspectjtools.jar}"
srcdir="${example.dir}"
includes="pack/MyInterface.java,pack/InterfaceDefinition.java"
classpath="${aspectjrt.jar}"/>
<java classname="pack.InterfaceDefinition">
<classpath>
<pathelement path="${aspectjrt.jar}"/>
<pathelement path="${classes.dir}"/>
</classpath>
</java>
<javac destdir="${classes.dir}"
srcdir="${example.dir}"
includes="Main.java">
<classpath>
<pathelement path="${aspectjrt.jar}"/>
<pathelement path="${classes.dir}"/>
</classpath>
</javac>
<java class="Main">
<classpath>
<pathelement path="${aspectjrt.jar}"/>
<pathelement path="${classes.dir}"/>
</classpath>
</java>
<delete dir="${classes.dir}"/>
</target>
</project>
|