blob: cbb60c8c0b893c3bd20eef249b4f63cb494dbe13 (
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
<!-- ====================================================================== -->
<!-- Copyright (c) 2005 Contributors -->
<!-- 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: (See CVS checkin's) -->
<!-- ====================================================================== -->
<project name="eclipse.plugins" default="eclipse.plugins" basedir=".">
<property name="aspectj.modules.dir" location="${basedir}/.."/>
<import file="${aspectj.modules.dir}/build/build-properties.xml" />
<target name="info">
<echo>
Assembles the Eclipse plugins.
Relies on ../build/build-properties.xml for some definitions, and
the build must have produced the AspectJ distribution already.
Define $${build.version.eclipse.plugins} to avoid "9.9.9" for
"DEVELOPMENT" (the default).
</echo>
</target>
<target name="init-eclipse-plugins" depends="init-properties">
<property name="ep.dir"
location="${aspectj.modules.dir}/eclipse.plugin"
/>
<condition property="build.version.eclipse.plugins"
value="9.9.9"
>
<equals arg1="DEVELOPMENT" arg2="${build.version.long}" />
</condition>
<condition property="build.version.eclipse.plugins"
value="${build.version.long}"
>
<not>
<equals arg1="DEVELOPMENT"
arg2="${build.version.long}"
/>
</not>
</condition>
<jar-property name="ep.aspectjrt.jar"
location="${aj.dist.dir}/tools/lib/aspectjrt.jar"
/>
<property name="ep.eclipse.dist.dir"
location="${aj.dist.dir}/ide/eclipse"
/>
</target>
<target name="eclipse.plugins"
depends="do-rt,do-source,do-ajde,do-doc"
/>
<target name="do-rt" depends="init-eclipse-plugins">
<property name="name.rt" value="org.aspectj.aspectjrt" />
<mkdir dir="${ep.eclipse.dist.dir}/${name.rt}" />
<copy todir="${ep.eclipse.dist.dir}/${name.rt}"
file="${ep.aspectjrt.jar}"
/>
<build-eclipse-plugin name="${name.rt}" />
</target>
<target name="do-source" depends="init-eclipse-plugins">
<property name="name.source"
value="org.aspectj.ajde.source"
/>
<clean-dir dir="${ep.eclipse.dist.dir}/${name.source}/src" />
<copy todir="${ep.eclipse.dist.dir}/${name.source}/src"
file="${aspectj.modules.dir}/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip"
/>
<!-- verify source dirs included:
grep 'kind="src"' */.classpath | sed '/testsrc/d;/path="\//d;s|\/.*path="|\/|;s|".*||'
compare filelist: ${aspectj.tools.modules}
-->
<zip destfile="${ep.eclipse.dist.dir}/${name.source}/src/aspectjsrc.zip"
>
<fileset dir="${aspectj.modules.dir}/ajbrowser/src" />
<fileset dir="${aspectj.modules.dir}/ajde/src" />
<fileset dir="${aspectj.modules.dir}/ajde.core/src" />
<fileset dir="${aspectj.modules.dir}/ajdoc/src" />
<fileset dir="${aspectj.modules.dir}/asm/src" />
<fileset dir="${aspectj.modules.dir}/aspectj5rt/java5-src"
/>
<fileset dir="${aspectj.modules.dir}/aspectj5rt/src" />
<fileset dir="${aspectj.modules.dir}/bridge/src" />
<fileset dir="${aspectj.modules.dir}/loadtime/src" />
<fileset dir="${aspectj.modules.dir}/org.aspectj.matcher/src" />
<fileset dir="${aspectj.modules.dir}/loadtime5/java5-src"
/>
<fileset dir="${aspectj.modules.dir}/org.aspectj.ajdt.core/src"
/>
<!--fileset dir="${aspectj.modules.dir}/org.aspectj.lib/src"
/-->
<fileset dir="${aspectj.modules.dir}/runtime/src" />
<fileset dir="${aspectj.modules.dir}/taskdefs/src" />
<fileset dir="${aspectj.modules.dir}/util/src" />
<fileset dir="${aspectj.modules.dir}/weaver/src" />
<fileset dir="${aspectj.modules.dir}/weaver5/java5-src" />
</zip>
<build-eclipse-plugin name="${name.source}" />
</target>
<target name="do-ajde" depends="init-eclipse-plugins">
<property name="name.ajde" value="org.aspectj.ajde" />
<jar-property name="ep.aspectjtools.jar"
location="${aj.dist.dir}/tools/lib/aspectjtools.jar"
/>
<clean-dir dir="${ep.eclipse.dist.dir}/${name.ajde}" />
<copy todir="${ep.eclipse.dist.dir}/${name.ajde}">
<fileset file="${ep.aspectjrt.jar}" />
<fileset file="${ep.aspectjtools.jar}" />
</copy>
<jar destfile="${ep.eclipse.dist.dir}/${name.ajde}/ajde.jar">
<zipfileset src="${ep.aspectjtools.jar}"
includes="org/aspectj/**"
/>
<!-- TODO dangerous assumption: only org.aspectj? not org.eclipse or org.osgi? -->
</jar>
<build-eclipse-plugin name="${name.ajde}" />
</target>
<target name="do-doc" depends="init-eclipse-plugins">
<available property="ep.docs.available"
file="${aj.dist.dir}/docs/doc/examples/build.xml"
/>
<fail unless="ep.docs.available"
message="no doc in ${aj.dist.dir}"
/>
<property name="name.doc" value="org.aspectj.ajde.doc" />
<clean-dir dir="${ep.eclipse.dist.dir}/${name.doc}/doc" />
<copy todir="${ep.eclipse.dist.dir}/${name.doc}/doc">
<fileset dir="${aj.dist.dir}/docs/doc" />
</copy>
<build-eclipse-plugin name="${name.doc}" />
</target>
<macrodef name="build-eclipse-plugin">
<attribute name="name" />
<sequential>
<mkdir dir="${ep.eclipse.dist.dir}/@{name}" />
<copy todir="${ep.eclipse.dist.dir}/@{name}">
<fileset dir="${ep.dir}/@{name}" />
</copy>
<replace file="${ep.eclipse.dist.dir}/@{name}/plugin.xml"
token="build.version.eclipse.plugins"
value="${build.version.eclipse.plugins}"
/>
<jar destfile="${ep.eclipse.dist.dir}/@{name}_${build.version.eclipse.plugins}.jar"
>
<fileset dir="${ep.eclipse.dist.dir}/@{name}" />
</jar>
</sequential>
</macrodef>
</project>
|