aboutsummaryrefslogtreecommitdiffstats
path: root/tests/harness/classpathTest/classpath-src/build.xml
blob: 3cc258f19ad7be6ca0c005620a2296d9fd044225 (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
<!-- ========================================================================= -->
<!-- Copyright (c) 2002 Wes Isberg                                             -->
<!-- All rights reserved.                                                      -->
<!-- This program and the accompanying materials are made available            -->
<!-- under the terms of the Eclipse Public License v1.0                        -->
<!-- which accompanies this distribution and is available at                   -->
<!-- http://www.eclipse.org/legal/epl-v10.html                                 -->
<!--                                                                           -->
<!-- Contributors:                                                             -->
<!--     Xerox/PARC     initial implementation                                 -->
<!-- ========================================================================= -->

<project name="classpath-test" default="all" basedir=".">


    <target name="init.variables" 
     description="setup variables - user defines aspectj.lib.dir">

      <!-- required directories - run from examples or predefine -->
      <property name="test.base.dir"
            location="${basedir}/.."/> 
      <property name="classes.dir"
            location="${test.base.dir}/classesDir"/> 
      <property name="jar.dir"
            location="${test.base.dir}/jars"/> 

       
      <!-- caller must define aspectj.lib.dir -->
      <property name="aspectj.lib.dir"
            location="lib"/> 
      <property name="aspectjrt.jar"
            location="${aspectj.lib.dir}/aspectjrt.jar"/> 
      <available file="${aspectjrt.jar}"
             property="aspectjrt.jar.available"/>
      <fail unless="aspectjrt.jar.available"
           message="expecting aspectjrt.jar at ${aspectjrt.jar}"/>

      <property name="aspectjtools.jar"
            location="${aspectj.lib.dir}/aspectjtools.jar"/> 
      <available file="${aspectjtools.jar}"
             property="aspectjtools.jar.available"/>
      <fail unless="aspectjtools.jar.available"
           message="expecting aspectjtools.jar at ${aspectjtools.jar}"/>

      <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
          <classpath> 
            <pathelement path="${aspectjtools.jar}"/> 
          </classpath>
      </taskdef>

    </target>
    <target name="all" depends="init.variables"
     description="build classes, required.jar and requiredAspects.jar">
        <iajc outjar="${jar.dir}/required.jar"
           sourceroots="${test.base.dir}/classpath-src/classjar">
           <classpath>
               <pathelement path="${aspectjrt.jar}"/> 
           </classpath>
        </iajc>

        <iajc outjar="${jar.dir}/requiredAspects.jar"
           sourceroots="${test.base.dir}/classpath-src/aspectjar">
           <classpath>
               <pathelement path="${aspectjrt.jar}"/> 
               <pathelement path="${test.base.dir}/../../../lib/test/testing-client.jar"/> 
           </classpath>
        </iajc>

        <delete>
           <fileset dir="${classes.dir}" includes="**/*"/>
        </delete>
        <iajc destdir="${classes.dir}"
           sourceroots="${test.base.dir}/classpath-src/classesDir">
           <classpath>
               <pathelement path="${aspectjrt.jar}"/> 
           </classpath>
        </iajc>
    </target>

</project>