-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
198 lines (171 loc) · 10.8 KB
/
build.xml
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!-- Copyright (C) 2016 Federal University of Pernambuco and
University of Central Florida
* This file is part of AspectJML
*
* AJML is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* AJML is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AJML; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: build.xml,v 6.0 2021/04/08 12:52:45 henriquerebelo Exp $
-->
<!-- THE FUN HAS JUST BEGUN!! AspectJML team -->
<project name="SIESTA-StringBuilder Single Thread" default="ajmlc">
<!-- THE ASPECTJML COMPILER (ajmlc) VERSION BEING USED -->
<property name="AspectJML" value="1.8.1" />
<!-- SYSTEM DEPENDENT VARIABLES - CHANGE FOR YOUR NEEDS -->
<property name="aspectjml.release.jar" value="aspectjml-lib/aspectjml-release1.8.1.jar" />
<property name="src.dir" value="src" />
<!-- From within Eclipse, you can put the generated bytecode directly at the "bin" folder and run the application direclty from Eclipse-->
<!-- This tip is useful if you have several main classes and to avoid run one by one by changing the "main.class" property -->
<property name="dest.dir" value="bin" />
<!-- Target directory to print the instrumented source code (isc) as AspectJ aspects -->
<property name="dest.dir.isc" value="isc" />
<property name="main.class" value="stringbuilderexample.StringBuilderMultiThreadDemo" />
<property name="app.lib" value="lib" />
<property name="aspectjml.lib" value="aspectjml-lib" />
<!-- NOTE: 'aspectjml.lib' MUST INCLUDE THE ASPECTJ WEAVER, AJC -->
<!-- CLASSPATH OF AspectJML TOOL FOR COMPILATION AND CHECKING TASKS -->
<taskdef classpath="${aspectjml.release.jar}" resource="org/aspectjml/ant/taskdefs/aspectjmlTaskdefs.properties" />
<!-- SOURCEPATH FOR EXTRA SOURCEROOTS FOR COMPILATION AND TASKS -->
<path id="sourcepath">
<!-- IF YOU HAVE MORE SOURCE FILES DIFFERENT FROM THOSE IN ${src.dir},
UNCOMMENT THE FOLLOWING AND SPECIFY THE EXTRA DIR(s). PLEASE USE
ONE "dirset" FOR EACH EXTRA DIR -->
<!--<dirset dir="dirName" />-->
</path>
<!-- CLASSPATH FOR COMPILATION AND TASKS -->
<path id="classpath">
<!-- IF YOU HAVE APPLICATION SPECIFIC LIB, UNCOMMENT THE FOLLOWING -->
<!--<fileset dir="${app.lib}">
<include name="*.jar" />
</fileset>-->
<fileset dir="${aspectjml.lib}">
<include name="*.jar" />
</fileset>
</path>
<!-- INPATH TO ACCEPT AS SOURCE BYTECODE ANY .CLASS FILE IN THE .JAR FILES OR DIRECTORIES ON PATH -->
<path id="inpath">
<!-- IF YOU HAVE LIBS THAT SHOULD BE PROCESSED, UNCOMMENT THE FOLLOWING
AND REMEMBER TO INCLUDE IN THE AJMLC COMPILATION OPTIONS-->
<!--<fileset dir="dirName">
<include name="*.jar" />
</fileset>-->
<!-- OR YOU MAY ALSO HAVE DIRECTORIES CONTAINING .CLASS FILES, UNCOMMENT THE FOLLOWING -->
<!--<dirset dir="dirName" />-->
</path>
<!-- CREATE NEEDED DIRECTORIES -->
<target name="prepare">
<mkdir dir="${dest.dir}" />
</target>
<!-- CLEANUP -->
<target name="clean">
<delete dir="${dest.dir}" />
</target>
<!-- CLEANUP RESIDUAL GENERATED ASPECTJ ASPECTS [.aj] FILES -->
<!-- IF YOU FACE ANY COMPILATION PROBLEM AND ACCIDENTALLY SEE ANY GENERATED ASPECTJML ASPECT,
PLEASE USE THIS TASK TO REMOVE SUCH ASPECTS FROM THE SYSTEM -->
<target name="clean-residual-aspectjml">
<delete>
<fileset dir="${src.dir}" includes="**/AspectJMLRac_*.aj" />
</delete>
</target>
<!-- VERSION INFORMATION -->
<target name="ajmlc-version-options" description="Task responsible for printing the ajmlc version">
<java classname="org.aspectjml.ajmlrac.Main" fork="true">
<arg value="--version" />
<classpath refid="classpath" />
</java>
</target>
<!-- HELP OPTIONS -->
<target name="ajmlc-help-options" description="Task responsible for displaying ajmlc compilation options">
<java classname="org.aspectjml.ajmlrac.Main" fork="true">
<arg value="--help" />
<classpath refid="classpath" />
</java>
</target>
<!-- COMPILATIONS -->
<!-- NOTE: These are the most common options used to run an AspectJML program.
- For more ajmlc [AspectJML compiler] options, please run the task above "ajmlc-help-options" and update the "ajmlc task" of interest below to properly include them
- if you define and want to use the inpath property, please add it as follows to the "ajmlc task" of interest:
inpath = "inpath"
-->
<!-- THE FUN HAS JUST BEGUN!! AspectJML team -->
<target name="ajmlc" depends="clean,prepare" description="Ant task responsible for compiling AspectJML files [.java, .jml or .ajml] using the ajmlc compiler version ${AspectJML}">
<ajmlc destdir="${dest.dir}" srcdir="${src.dir}" sourcepathref="sourcepath" classpathref="classpath" print="false" source="1.8" ajweaver="ajc"
defaultnonnull="false" norepresentserror="false" noexecutionsiteinstrumenation="false" callsiteinstrumenation="false" clientawarechecking="false"
multiplespeccasechecking="false" nocrosscutting="false" nocontractchecking="false" crossrefs="false"
showweaveinfo="false" quiet="false" verbose="false" fork="false">
</ajmlc>
</target>
<target name="ajmlc-cac" depends="clean,prepare" description="Ant task responsible for compiling AspectJML files [.java, .jml or .ajml] using the ajmlc compiler version ${AspectJML}">
<ajmlc destdir="${dest.dir}" srcdir="${src.dir}" sourcepathref="sourcepath" classpathref="classpath" print="false" source="1.8" ajweaver="ajc"
defaultnonnull="false" norepresentserror="false" noexecutionsiteinstrumenation="false" callsiteinstrumenation="false" clientawarechecking="true"
multiplespeccasechecking="false" nocrosscutting="false" nocontractchecking="false" crossrefs="false"
showweaveinfo="false" quiet="false" verbose="false" fork="false">
</ajmlc>
</target>
<!-- CODE GENERATION/PRINT -->
<target name="ajmlc-source-printing" depends="clean,prepare" description="Ant task responsible for printing the instrumented source code in AspectJ format [.aj] using the ajmlc compiler version ${AspectJML}">
<ajmlc destdir="${dest.dir.isc}" srcdir="${src.dir}" sourcepathref="sourcepath" classpathref="classpath" print="true" source="1.8" ajweaver="ajc"
defaultnonnull="false" norepresentserror="false" noexecutionsiteinstrumenation="false" callsiteinstrumenation="false" clientawarechecking="false"
multiplespeccasechecking="false" nocrosscutting="false" nocontractchecking="false" crossrefs="false"
showweaveinfo="false" quiet="false" verbose="false" fork="false">
</ajmlc>
</target>
<target name="ajmlc-cac-source-printing" depends="clean,prepare" description="Ant task responsible for printing the instrumented source code in AspectJ [.aj] format using the ajmlc compiler version ${AspectJML}">
<ajmlc destdir="${dest.dir.isc}" srcdir="${src.dir}" sourcepathref="sourcepath" classpathref="classpath" print="true" source="1.8" ajweaver="ajc"
defaultnonnull="false" norepresentserror="false" noexecutionsiteinstrumenation="false" callsiteinstrumenation="false" clientawarechecking="true"
multiplespeccasechecking="false" nocrosscutting="false" nocontractchecking="false" crossrefs="false"
showweaveinfo="false" quiet="false" verbose="false" fork="false">
</ajmlc>
</target>
<!-- TYPE CHECKING -->
<target name="ajml" description="Ant task responsible for type checking AspectJML files [.java, .jml or .ajml] using the ajml type checker version ${AspectJML}">
<ajml destdir="${dest.dir}" srcdir="${src.dir}" sourcepathref="sourcepath" classpathref="classpath" verbose="false">
</ajml>
</target>
<!-- RUNNING APPLICATION -->
<target name="ajmlrac" description="Ant task responsible for running the AspectJML program (by means of a main class); using the ajmlrac version ${AspectJML}">
<ajmlrac classname="${main.class}" classpathref="classpath" verbose="true">
<classpath location="${dest.dir}" />
</ajmlrac>
</target>
<!-- CONTRACTJDOC [aka Javadoc-based JML specifications] TASKS -->
<!-- COMPILATION -->
<target name="contractjdoc-ajmlc" depends="clean,prepare" description="Ant task responsible for compiling AspectJML files [.java, .jml or .ajml] and also processing custom javadoc tags using the ajmlc compiler version ${AspectJML}">
<ajmlc destdir="${dest.dir}" srcdir="${src.dir}" sourcepathref="sourcepath" classpathref="classpath" print="false" source="1.8" ajweaver="ajc"
defaultnonnull="false" norepresentserror="false" noexecutionsiteinstrumenation="false" callsiteinstrumenation="false" clientawarechecking="true"
multiplespeccasechecking="false" javadocbasedjml="true" nocrosscutting="false" nocontractchecking="false" crossrefs="false"
showweaveinfo="false" quiet="false" verbose="false" fork="false">
</ajmlc>
</target>
<!-- CODE GENERATION/PRINT -->
<target name="contractjdoc-ajmlc-source-printing" depends="clean,prepare" description="Ant task responsible for printing the instrumented source code in AspectJ format [.aj] using the ajmlc compiler version ${AspectJML}">
<ajmlc destdir="${dest.dir.isc}" srcdir="${src.dir}" sourcepathref="sourcepath" classpathref="classpath" print="true" source="1.8" ajweaver="ajc"
defaultnonnull="false" norepresentserror="false" noexecutionsiteinstrumenation="false" callsiteinstrumenation="false" clientawarechecking="false"
multiplespeccasechecking="false" javadocbasedjml="true" nocrosscutting="false" nocontractchecking="false" crossrefs="false"
showweaveinfo="false" quiet="false" verbose="false" fork="false">
</ajmlc>
</target>
<!-- TYPE CHECKING -->
<target name="contractjdoc-ajml" description="Ant task responsible for type checking AspectJML files [.java, .jml or .ajml] using the ajml type checker version ${AspectJML}">
<ajml destdir="${dest.dir}" srcdir="${src.dir}" sourcepathref="sourcepath" classpathref="classpath" javadocbasedjml="true" verbose="false">
</ajml>
</target>
<!-- RUNNING APPLICATION -->
<target name="contractjdoc-ajmlrac" description="Ant task responsible for running the AspectJML program (by means of a main class); using the ajmlrac version ${AspectJML}">
<ajmlrac classname="${main.class}" classpathref="classpath" verbose="true">
<classpath location="${dest.dir}" />
</ajmlrac>
</target>
</project>