Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>tags/V1_9_21_2
@@ -1,486 +0,0 @@ | |||
<!-- -*- Mode: SGML; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- --> | |||
<!-- ========================================================================= --> | |||
<!-- Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). --> | |||
<!-- Copyright (c) 2003, 2005 Contributors. --> | |||
<!-- All rights reserved. --> | |||
<!-- This program and the accompanying materials are made available --> | |||
<!-- under the terms of the Eclipse Public License v 2.0 --> | |||
<!-- which accompanies this distribution and is available at --> | |||
<!-- https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt --> | |||
<!-- --> | |||
<!-- Contributors: --> | |||
<!-- Xerox/PARC initial implementation --> | |||
<!-- A Colyer / G Harley eclipse plugin dirs --> | |||
<!-- ========================================================================= --> | |||
<!-- include as common entity for module build scripts --> | |||
<!-- should only need to edit version properties --> | |||
<project name="build-properties" default="init-properties"> | |||
<target name="init-properties" | |||
unless="init-properties.done"> | |||
<!-- callers should define aspectj.modules.dir --> | |||
<property name="aspectj.modules.dir" location="${basedir}/.."/> | |||
<require-available property="local-properties" | |||
path="${aspectj.modules.dir}/build/local.properties"/> | |||
<property file="${aspectj.modules.dir}/build/local.properties"/> | |||
<!-- | |||
Changing version: | |||
- base should always be 1.1 (used for manifests, other version-parsing code) | |||
- Others should be DEVELOPMENT unless testing/doing release builds, when | |||
they should be (e.g.,) 1.1b3 or 1.1beta3 | |||
- Changing version here causes org/aspectj/bridge/Version.java to be updated | |||
- also change org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties | |||
- build.version.eclipse.plugins should be set to "9.9.9" for "DEVELOPMENT", and | |||
- the same as build.version.long (in major.minor.service form) for releases. | |||
--> | |||
<property name="min.vm" value="13"/> | |||
<property name="max.vm" value="15"/> | |||
<property name="build.verbose" value="false"/> | |||
<property name="build.version" value="DEVELOPMENT"/> | |||
<property name="build.version.base" value="1.2"/> | |||
<property name="build.version.long" value="DEVELOPMENT"/> | |||
<property name="build.version.short" value="DEVELOPMENT"/> | |||
<!-- formats comply with SimpleDateFormat --> | |||
<property name="build.time.format" value="EEEE MMM d, yyyy 'at' HH:mm:ss z"/> | |||
<property name="build.date.format" value="EEEE MMM d, yyyy"/> | |||
<tstamp> | |||
<format property="build.date" | |||
pattern="${build.date.format}" | |||
timezone="GMT"/> | |||
<format property="build.time" | |||
pattern="${build.time.format}" | |||
timezone="GMT"/> | |||
</tstamp> | |||
<property name="company.name" value="aspectj.org"/> | |||
<property name="copyright.allRights.from1998" | |||
value="Copyright (c) 1998-2001 Xerox Corporation, 2002 Palo Alto Research Center, Incorporated, 2003-2008 Contributors. All rights reserved." /> | |||
<!-- aj... names are generated, can be mutated/cleaned --> | |||
<!-- these names are known to BuildModule.java and common to all --> | |||
<property name="aj.build.dir" | |||
location="${aspectj.modules.dir}/aj-build"/> | |||
<property name="aj.temp.dir" | |||
location="${aj.build.dir}/temp"/> | |||
<property name="aj.src.dir" | |||
location="${aj.build.dir}/src"/> | |||
<property name="aj.jar.dir" | |||
location="${aj.build.dir}/jars"/> | |||
<property name="aj.dist.dir" | |||
location="${aj.build.dir}/dist"/> | |||
<property name="aj.webDeploy.dir" | |||
location="${aj.build.dir}/webDeploy"/> | |||
<property name="aj.install.dir" | |||
location="${aj.build.dir}/install"/> | |||
<property name="aj.build.allresults.dir" | |||
location="${aj.build.dir}/allresults"/> | |||
<property name="aj.build.allfailures.file" | |||
location="${aj.build.allresults.dir}/allfailures.txt"/> | |||
<property name="aj.build.results.dir" | |||
location="${aj.build.dir}/results"/> | |||
<property name="aj.failure.file" | |||
location="${aj.build.results.dir}/failures.txt"/> | |||
<property name="aj.build-id.file" | |||
location="${aj.build.results.dir}/build-id.txt"/> | |||
<property name="aj.junit.dir" | |||
location="${aj.build.results.dir}/junit"/> | |||
<property name="aj.logs.dir" | |||
location="${aj.build.results.dir}/logs"/> | |||
<!-- aspectj... names are sources, not to be mutated --> | |||
<property name="aspectj.modules.lib.dir" | |||
location="${aspectj.modules.dir}/lib"/> | |||
<property name="aspectj.modules.build.dir" | |||
location="${aspectj.modules.dir}/build"/> | |||
<property name="aspectj.modules.docs.dir" | |||
location="${aspectj.modules.dir}/docs"/> | |||
<property name="aspectj.modules.tests.dir" | |||
location="${aspectj.modules.dir}/tests"/> | |||
<!-- BuildModule.java assumes products are here --> | |||
<property name="aspectj.products.dir" | |||
location="${aspectj.modules.build.dir}/products"/> | |||
<property name="aspectj.modules.tests.dir" | |||
location="${aspectj.modules.dir}/tests"/> | |||
<property file="${aspectj.modules.build.dir}/junit-patterns.properties"/> | |||
<property name="aspectj.tools.modules.13" | |||
value="ajde,ajde.core,ajdoc,asm,bridge,loadtime,org.aspectj.ajdt.core,runtime,taskdefs,util,weaver"/> | |||
<property name="aspectj.tools.modules.15" | |||
value="loadtime5,aspectj5rt,weaver5"/> | |||
<condition property="aspectj.tools.modules" | |||
value="${aspectj.tools.modules.13},${aspectj.tools.modules.15}"> | |||
<equals arg1="1.5" arg2="${ant.java.version}"/> | |||
</condition> | |||
<condition property="aspectj.tools.modules" | |||
value="${aspectj.tools.modules.13}"> | |||
<not> | |||
<equals arg1="1.5" arg2="${ant.java.version}"/> | |||
</not> | |||
</condition> | |||
<property name="aspectj.test.modules" | |||
value="build,testing,testing-client,testing-drivers,testing-util,tests"/> | |||
<property name="aspectj.compilerTest.modules" | |||
value="tests"/> | |||
<property name="aspectj.other.modules" | |||
value="docs,eclipse.plugin"/> | |||
<jar-property name="junit.jar" | |||
location="${aspectj.modules.lib.dir}/junit/junit.jar"/> | |||
<!-- TODO need version-specific JDK? --> | |||
<guarded-property name="jdk.tools.jar" | |||
location="${java.home}/../lib/tools.jar"/> | |||
<guarded-property name="jdk.tools.jar" | |||
location="${java.home}/lib/tools.jar"/> | |||
<guarded-property name="lib.test.aspectjrt.jar" | |||
location="${aspectj.modules.lib.dir}/test/aspectjrt.jar"/> | |||
<property name="init-properties.done" value="true"/> | |||
</target> | |||
<target name="init-taskdefs" | |||
depends="init-properties" | |||
unless="init-taskdefs.done" > | |||
<jar-property name="aspectj.build.jar" | |||
location="${aspectj.modules.lib.dir}/build/build.jar"/> | |||
<jar-property name="lib.ant.jar" | |||
location="${aspectj.modules.lib.dir}/ant/lib/ant.jar"/> | |||
<taskdef resource="org/aspectj/internal/tools/ant/taskdefs/taskdefs.properties" | |||
classpath="${aspectj.build.jar}"/> | |||
<path id="ant.lib.path"> | |||
<fileset dir="${aspectj.modules.lib.dir}/ant/lib"> | |||
<include name="**/*.jar"/> | |||
</fileset> | |||
</path> | |||
<taskdef name="junit" | |||
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" | |||
classpathref="ant.lib.path"/> | |||
<available classname="org.apache.xalan.processor.TransformerFactoryImpl" | |||
property="xalan.available" | |||
value="true"> | |||
<classpath refid="ant.lib.path"/> | |||
</available> | |||
<condition property="junitreport.available" value="true"> | |||
<istrue value="${xalan.available}"/> | |||
</condition> | |||
<echo message="junitreport.available: ${junitreport.available}"/> | |||
<antcall target="init-junitreport"/> | |||
</target> | |||
<target name="init-junitreport" depends="init-properties" | |||
if="xalan.available"> | |||
<taskdef name="junitreport" | |||
classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator" | |||
classpathref="ant.lib.path"/> | |||
</target> | |||
<target name="init-directories" | |||
depends="init-properties" | |||
description="ensure dirs, possibly many times in a build"> | |||
<mkdir dir="${aj.build.dir}" /> | |||
<mkdir dir="${aj.temp.dir}" /> | |||
<mkdir dir="${aj.jar.dir}" /> | |||
<mkdir dir="${aj.dist.dir}" /> | |||
<mkdir dir="${aj.install.dir}" /> | |||
<mkdir dir="${aj.logs.dir}" /> | |||
</target> | |||
<target name="init-filters" | |||
depends="init-properties" | |||
unless="init-filters.done" > | |||
<!-- build.version and build.date used in filters throughout, and | |||
build.version.base used in filtering manifest, but | |||
others used mainly for installer-resources/properties.txt --> | |||
<filter token="build.version" value="${build.version}"/> | |||
<filter token="build.version.base" value="${build.version.base}"/> | |||
<filter token="build.version.long" value="${build.version.long}"/> | |||
<filter token="build.version.short" value="${build.version.short}"/> | |||
<filter token="build.time.format" value="${build.time.format}"/> | |||
<filter token="build.date.format" value="${build.date.format}"/> | |||
<filter token="build.date" value="${build.date}"/> | |||
<filter token="build.time" value="${build.time}"/> | |||
<filter token="company.name" value="${company.name}"/> | |||
<filter token="copyright.allRights.from1998" | |||
value="${copyright.allRights.from1998}" /> | |||
<property name="init-filters.done" value="done"/> | |||
</target> | |||
<target name="clean-directories" depends="init-properties"> | |||
<delete quiet="on"> | |||
<fileset dir="${aj.build.dir}" includes="*,**/*"/> | |||
</delete> | |||
<antcall target="init-directories"/> | |||
</target> | |||
<target name="clean-jars" | |||
depends="init-directories" | |||
unless="clean-jars.done" > | |||
<delete quiet="on"> | |||
<fileset dir="${aj.jar.dir}" includes="*"/> | |||
</delete> | |||
<property name="clean-jars.done" value="done"/> | |||
</target> | |||
<target name="clean-keep-results" depends="init-properties"> | |||
<delete> | |||
<fileset dir="${aj.build.dir}"> | |||
<exclude name="results/*"/> | |||
<exclude name="results/**"/> | |||
<exclude name="allresults/*"/> | |||
<exclude name="allresults/**"/> | |||
</fileset> | |||
</delete> | |||
</target> | |||
<target name="clean-default-results" depends="init-properties"> | |||
<delete> | |||
<fileset dir="${aj.build.results.dir}" includes="*,**/*"/> | |||
</delete> | |||
</target> | |||
<target name="clean-result" depends="init-properties"> | |||
<delete quiet="on"> | |||
<fileset dir="${aj.build.results.dir}" includes="*,**/*"/> | |||
</delete> | |||
</target> | |||
<macrodef name="save-build-id" | |||
description="save ${id} to ${aj.build-id.file}"> | |||
<attribute name="id"/> | |||
<sequential> | |||
<echo message="@{id}" file="${aj.build-id.file}"/> | |||
</sequential> | |||
</macrodef> | |||
<macrodef name="load-build-id"> | |||
<attribute name="property"/> | |||
<sequential> | |||
<available property="aj.build-id.file.available" | |||
file="${aj.build-id.file}"/> | |||
<antcall target="ensure-build-id"/> | |||
<loadfile srcfile="${aj.build-id.file}" property="@{property}"/> | |||
</sequential> | |||
</macrodef> | |||
<target name="ensure-build-id" unless="aj.build-id.file.available" | |||
description="create datestamp build id in ${aj.build-id.file} if n/a"> | |||
<tstamp> | |||
<format property="build.id.name" | |||
timezone="GMT+10" | |||
pattern="yyyyMMdd-hhmmss" | |||
/> | |||
</tstamp> | |||
<echo file="${aj.build-id.file}" message="${build.id.name}"/> | |||
</target> | |||
<target name="save-result" depends="init-properties"> | |||
<load-build-id property="build.id"/> | |||
<copy todir="${aj.build.allresults.dir}/${build.id}"> | |||
<fileset dir="${aj.build.results.dir}" /> | |||
</copy> | |||
</target> | |||
<target name="echo-properties" depends="init-properties"> | |||
<echo> | |||
Build Properties | |||
build.date = ${build.date} | |||
build.time = ${build.time} | |||
build.version = ${build.version} | |||
build.version.long = ${build.version.long} | |||
build.version.short = ${build.version.short} | |||
aspectj.modules.dir = ${aspectj.modules.dir} | |||
aj.build.dir = ${aj.build.dir} | |||
ant.home = ${ant.home} | |||
java.home = ${java.home} | |||
java11.home = ${java11.home} | |||
java13.home = ${java13.home} | |||
java14.home = ${java14.home} | |||
java15.home = ${java15.home} | |||
</echo> | |||
</target> | |||
<macrodef name="guarded-property" | |||
description="set property {name} to {location} if unset and {location} exists"> | |||
<attribute name="name"/> | |||
<attribute name="location"/> | |||
<sequential> | |||
<property name="@{name}.path" | |||
location="@{location}"/> | |||
<condition property="@{name}" | |||
value="${@{name}.path}"> | |||
<and> | |||
<not> | |||
<isset property="@{name}"/> | |||
</not> | |||
<available file="${@{name}.path}"/> | |||
</and> | |||
</condition> | |||
</sequential> | |||
</macrodef> | |||
<macrodef name="clean-dir"> | |||
<attribute name="dir"/> | |||
<sequential> | |||
<mkdir dir="@{dir}"/> | |||
<delete> | |||
<fileset dir="@{dir}" includes="*,**/*"/> | |||
</delete> | |||
<mkdir dir="@{dir}"/> | |||
</sequential> | |||
</macrodef> | |||
<!-- | |||
Reporting failures | |||
Failure-reports supports running multiple build targets in sequence for a | |||
configuration, saving off those results, doing it over, etc., and then | |||
checking the result (of the current builds or all builds), i.e., | |||
# first set of builds | |||
- build, report-if-failed ... | |||
- build, report-if-failed ... | |||
... | |||
- {save-build-id} first-set | |||
- save-result | |||
- clean-keep-results | |||
- clean-default-results | |||
# second set of builds | |||
- build, report-if-failed ... | |||
... | |||
- save-result | |||
# fail build if anything in either set failed | |||
- fail-if-allresults-allfailures | |||
Clients call | |||
<report-if-failed property="failed" text="JUnit failed"/> | |||
to signal failure. This goes into results/failures.txt, to be read later. | |||
Many clients can call this, across many (current) build invocations, so | |||
results just accumulate. Clients should never call <fail> directly; while | |||
the cruise-control script can handle build failures, they won't be recorded | |||
in a way that supports easy evaluation. | |||
To fail if the current builds fail, do | |||
<antcall target="fail-if-results-failures"/> | |||
You can do a sequence of builds (e.g., in 1.3), save the results off, | |||
and do it again (e.g., in 1.4), save the results, and then compare them. | |||
Use save-result to store the current build results in ../allresults. | |||
Between such builds, you can do a clean-keep-results (to clear out jars | |||
and such), followed by clean-default-results (to clear the current results). | |||
(The normal clean also cleans out any results, so avoid that when saving | |||
results from multiple builds.) | |||
Each build can be named using save-build-id. This name must be a valid | |||
directory name. When the results are saved to ../allresults, the directory | |||
name will use the most recent build-id. If none has been saved, then this | |||
creates a name out of the date (down to the second). | |||
To fail if any of the saved builds has failed, do fail-if-allresults-allfailures. | |||
This target ignores the current builds (if they are unsaved). | |||
--> | |||
<macrodef name="report-if-failed"> | |||
<attribute name="property"/> | |||
<attribute name="text"/> | |||
<sequential> | |||
<echo level="debug" message="property: @{property}: ${@{property}}"/> | |||
<echo level="debug" message="text: @{text}: ${@{text}}"/> | |||
<condition property="failed" value="true"> | |||
<isset property="@{property}"/> | |||
</condition> | |||
<echo level="debug" message="failed: ${failed}"/> | |||
<antcall target="do-report-fail"> | |||
<param name="text" value="@{text}"/> | |||
</antcall> | |||
</sequential> | |||
</macrodef> | |||
<target name="do-report-fail" | |||
if="failed"> | |||
<echo append="true" file="${aj.failure.file}">${text} | |||
</echo> | |||
</target> | |||
<target name="fail-if-results-failures" depends="init-properties"> | |||
<fail-if-failures failureFile="${aj.failure.file}"/> | |||
</target> | |||
<target name="fail-if-allresults-allfailures" depends="init-properties"> | |||
<concat destfile="${aj.build.allfailures.file}"> | |||
<fileset dir="${aj.build.allresults.dir}" | |||
includes="*/failures.txt"/> | |||
</concat> | |||
<fail-if-failures failureFile="${aj.build.allfailures.file}"/> | |||
</target> | |||
<macrodef name="fail-if-failures" | |||
description="fail if ${failureFile} exists and is not empty"> | |||
<attribute name="failureFile"/> | |||
<sequential> | |||
<loadfile | |||
failonerror="false" | |||
property="failures" | |||
srcfile="@{failureFile}"/> | |||
<fail> | |||
<condition> | |||
<length file="@{failureFile}" | |||
when="greater" length="0"/> | |||
</condition> | |||
# @{failureFile} failures: | |||
${failures} | |||
</fail> | |||
</sequential> | |||
</macrodef> | |||
<macrodef name="jar-property"> | |||
<attribute name="name"/> | |||
<attribute name="location"/> | |||
<sequential> | |||
<property name="@{name}" | |||
location="@{location}"/> | |||
<available file="${@{name}}" | |||
property="@{name}.available" | |||
value="${@{name}}"/> | |||
<fail unless="@{name}.available" | |||
message="unable to find @{name}: ${@{name}}"/> | |||
</sequential> | |||
</macrodef> | |||
<macrodef name="set-available" | |||
description="set property and property.available if path exists"> | |||
<attribute name="property"/> | |||
<attribute name="path"/> | |||
<sequential> | |||
<property name="@{property}.location" | |||
location="@{path}"/> | |||
<available property="@{property}" | |||
file="${@{property}.location}" | |||
value="${@{property}.location}"/> | |||
<condition property="@{property}.available"> | |||
<equals arg1="${@{property}.location}" arg2="${@{property}}"/> | |||
</condition> | |||
</sequential> | |||
</macrodef> | |||
<macrodef name="require-available"> | |||
<attribute name="property"/> | |||
<attribute name="path"/> | |||
<attribute name="message" default=""/> | |||
<sequential> | |||
<set-available property="@{property}" path="@{path}"/> | |||
<fail unless="@{property}.available"> | |||
@{message} (property "@{property}" not at "@{path}") | |||
</fail> | |||
</sequential> | |||
</macrodef> | |||
</project> |
@@ -1,983 +0,0 @@ | |||
<!-- -*- Mode: SGML; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- --> | |||
<!-- ========================================================================= --> | |||
<!-- Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC), --> | |||
<!-- 2003-2005 Contributors --> | |||
<!-- All rights reserved. --> | |||
<!-- This program and the accompanying materials are made available --> | |||
<!-- under the terms of the Eclipse Public License v 2.0 --> | |||
<!-- which accompanies this distribution and is available at --> | |||
<!-- https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt --> | |||
<!-- --> | |||
<!-- Contributors: (See CVS checkin's) --> | |||
<!-- Xerox/PARC initial implementation --> | |||
<!-- Adrian Colyer / George Harley eclipse plugin targets --> | |||
<!-- ========================================================================= --> | |||
<project name="build" default="all" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:maven="antlib:org.apache.maven.artifact.ant"> | |||
<target name="all" depends="aspectj"> | |||
<antcall target="eclipse.plugins"/> | |||
</target> | |||
<target name="clean" depends="clean-directories"/> | |||
<target name="compile" depends="build-module" | |||
description="compile module ${module.name} (without tests, by default)"/> | |||
<target name="compile-tests" depends="init" | |||
description="compile module ${module.name} tests"> | |||
<assemble-module-test module="${module.name}"/> | |||
</target> | |||
<target name="test" depends="compile-tests"> | |||
<antcall target="do-test-junit"/> | |||
</target> | |||
<!-- ===================================================================== --> | |||
<!-- Init --> | |||
<!-- ===================================================================== --> | |||
<property name="modules.dir" location="${basedir}/.."/> | |||
<property name="module.name" value="${ant.project.name}"/> | |||
<import file="${modules.dir}/build/build-properties.xml"/> | |||
<target name="init" depends="init-properties,init-directories"> | |||
<property name="build.config" value=""/> | |||
<property name="trim.testing.default" value="true"/> | |||
<property name="aj.installer.jar" location="${aj.dist.dir}/aspectj-${build.version.long}.jar"/> | |||
<available property="ant.lib.aspectjtools" | |||
file="${ant.home}/lib/aspectjtools.jar" | |||
value="Expect classpath errors from ${ant.home}/lib/aspectjtools.jar"/> | |||
<available property="ant.lib.aspectjrt" | |||
file="${ant.home}/lib/aspectjrt.jar" | |||
value="Expect classpath errors from ${ant.home}/lib/aspectjrt.jar"/> | |||
<available property="testing.drivers.all.available" | |||
file="${aj.jar.dir}/testing-drivers-all.jar" | |||
value="${aj.jar.dir}/testing-drivers-all.jar"/> | |||
</target> | |||
<target name="version-uptodate" depends="init,init-taskdefs" | |||
unless="version-uptodate.done"> | |||
<!-- XXX change task to pre-check & avoid scan if dates uptodate --> | |||
<versionuptodate | |||
version="${build.version}" | |||
versionSourceFile="${aspectj.modules.dir}/bridge/src/org/aspectj/bridge/Version.java" | |||
versionTagFile="${aj.temp.dir}/versionUptodate"/> | |||
<available file="${aj.temp.dir}/versionUptodate" | |||
property="version.uptodate"/> | |||
<property name="version-uptodate.done" value="done"/> | |||
</target> | |||
<target name="init-version" depends="init,init-filters,version-uptodate" > | |||
<antcall target="init-filters"/> | |||
<copy file="${aspectj.modules.dir}/build/lib/BridgeVersion.java.txt" | |||
tofile="${aspectj.modules.dir}/bridge/src/org/aspectj/bridge/Version.java" | |||
overwrite="yes" filtering="yes"/> | |||
<property name="init.version.done" value="done"/> | |||
<!-- consider checking this in? --> | |||
</target> | |||
<!-- ===================================================================== --> | |||
<!-- Misc setup and warnings --> | |||
<!-- ===================================================================== --> | |||
<target name="warn.ant.lib.aspectjrt" if="ant.lib.aspectjrt"> | |||
<echo message="----- WARNING: ${ant.lib.aspectjrt}" /> | |||
</target> | |||
<target name="warn.ant.lib.aspectjtools" if="ant.lib.aspectjtools"> | |||
<echo message="----- WARNING: ${ant.lib.aspectjtools}" /> | |||
</target> | |||
<target name="fail-unless-boot-libraries-uptodate" depends="init" | |||
description="fail unless all boot libraries are up-to-date"> | |||
<antcall target="verify-boot-lib"> | |||
<param name="boot.lib" value="test/aspectjrt.jar"/> | |||
<param name="vbl.module.name" value="runtime"/> | |||
</antcall> | |||
<antcall target="verify-boot-lib"> | |||
<param name="boot.lib" value="build/build.jar"/> | |||
<param name="vbl.module.name" value="build"/> | |||
</antcall> | |||
<antcall target="verify-boot-lib"> | |||
<param name="boot.lib" value="test/testing-client.jar"/> | |||
<param name="vbl.module.name" value="testing-client"/> | |||
</antcall> | |||
<echo message="fyi, bridge/util changes rarely mean client is invalid"/> | |||
<antcall target="verify-boot-lib"> | |||
<param name="boot.lib" value="test/testing-client.jar"/> | |||
<param name="vbl.module.name" value="util"/> | |||
</antcall> | |||
<antcall target="verify-boot-lib"> | |||
<param name="boot.lib" value="test/testing-client.jar"/> | |||
<param name="vbl.module.name" value="bridge"/> | |||
</antcall> | |||
<echo message="all boot libraries verified"/> | |||
</target> | |||
<target name="update-tree" depends="init" | |||
description="update tree"> | |||
<fail unless="CVSROOT" | |||
message="required: {ant} -DCVSROOT=... ..."/> | |||
<cvs cvsRoot="${CVSROOT}" | |||
dest="${aspectj.modules.dir}" | |||
quiet="on" | |||
failonerror="on" | |||
command="update -dP" /> | |||
</target> | |||
<!-- ===================================================================== --> | |||
<!-- antcall targets --> | |||
<!-- ===================================================================== --> | |||
<target name="build-product" depends="init,init-taskdefs,init-version" description="build $${product.name}"> | |||
<ajbuild jarDir="${aj.jar.dir}" | |||
baseDir="${aspectj.modules.dir}" | |||
distDir="${aj.dist.dir}" | |||
productDir="${aspectj.modules.dir}/build/products/${product.name}" | |||
trimTesting="true" | |||
buildConfig="${build.config}" | |||
version="${build.version.long}" | |||
verbose="${build.verbose}" | |||
failonerror="true"/> | |||
</target> | |||
<target name="build-module" depends="init,init-taskdefs,init-version"> | |||
<ajbuild module="${module.name}" | |||
baseDir="${aspectj.modules.dir}" | |||
distDir="${aj.dist.dir}" | |||
jarDir="${aj.jar.dir}" | |||
trimTesting="${trim.testing}" | |||
buildConfig="${build.config}" | |||
version="${build.version.long}" | |||
verbose="${build.verbose}" | |||
assembleall="${assemble}" | |||
failonerror="true"/> | |||
</target> | |||
<macrodef name="build-module-all"> | |||
<attribute name="module"/> | |||
<attribute name="trimTesting" default="${trim.testing.default}"/> | |||
<sequential> | |||
<antcall target="build-module"> | |||
<param name="module.name" value="@{module}"/> | |||
<param name="trim.testing" value="@{trimTesting}"/> | |||
<param name="assemble" value="true"/> | |||
</antcall> | |||
</sequential> | |||
</macrodef> | |||
<macrodef name="build-module"> | |||
<attribute name="module"/> | |||
<attribute name="trimTesting" default="${trim.testing.default}"/> | |||
<attribute name="assemble" default="false"/> | |||
<sequential> | |||
<antcall target="build-module"> | |||
<param name="module.name" value="@{module}"/> | |||
<param name="trim.testing" value="@{trimTesting}"/> | |||
<param name="assemble" value="@{assemble}"/> | |||
</antcall> | |||
</sequential> | |||
</macrodef> | |||
<macrodef name="assemble-module-test"> | |||
<attribute name="module"/> | |||
<sequential> | |||
<build-module module="@{module}" assemble="true" trimTesting="false"/> | |||
</sequential> | |||
</macrodef> | |||
<target name="create-installer" depends="init,init-taskdefs,init-filters" | |||
description="create ${installer.file} from ${staging.dir} using ${htmlSrc.dir} and ${simpleClassName}"> | |||
<!-- init-filters: filter on copy used by ajinstaller taskdef --> | |||
<delete quiet="on" file="${installer.file}"/> | |||
<ajinstaller zipfile="${installer.file}" | |||
installerclassjar="${aspectj.build.jar}" | |||
basedir="${staging.dir}" | |||
mainclass="$$installer$$.org.aspectj.${simpleClassName}" | |||
htmlSrc="${htmlSrc.dir}" | |||
resourcesSrc="${aspectj.modules.build.dir}/installer-resources"/> | |||
</target> | |||
<target name="verify-boot-lib" depends="init" | |||
description="fail if ${boot.lib} is out of date wrt ${vbl.module.name}"> | |||
<uptodate property="lib-warning-${vbl.module.name}" | |||
targetfile="${aspectj.modules.dir}/lib/${boot.lib}"> | |||
<srcfiles dir="${aspectj.modules.dir}/${vbl.module.name}/src" | |||
includes="**/*.java"/> | |||
</uptodate> | |||
<fail unless="lib-warning-${vbl.module.name}" | |||
message="${boot.lib} out of date wrt module ${vbl.module.name}"/> | |||
</target> | |||
<!-- ===================================================================== --> | |||
<!-- test targets --> | |||
<!-- ===================================================================== --> | |||
<target name="test-run-all-junit-tests" | |||
depends="init" | |||
description="run unit tests via run-all-junit-tests module"> | |||
<antcall target="test"> | |||
<param name="module.name" value="run-all-junit-tests"/> | |||
</antcall> | |||
</target> | |||
<target name="test-compiler-tests" | |||
depends="init" | |||
description="run compiler tests via tests module"> | |||
<antcall target="test"> | |||
<param name="module.name" value="tests"/> | |||
</antcall> | |||
</target> | |||
<target name="test-each-module" | |||
depends="init" | |||
description="run JUnit tests for each module"> | |||
<subant target="test"> | |||
<filelist dir="${aspectj.modules.dir}" | |||
files="${aspectj.tools.modules},${aspectj.test.modules}"/> | |||
</subant> | |||
</target> | |||
<!-- | |||
<target name="ivy.init" unless="ivy.initialized"> | |||
<property name="ivy.lib.dir" value="n:/apache-ivy-2.1.0/lib"/> | |||
<property name="ivy.settings.file" value="n:/workspaces/aspectj16_1/build/ivysettings.xml"/> | |||
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"> | |||
<classpath> | |||
<path location="${ivy.lib.dir}/ivy.jar"/> | |||
<path location="${ivy.lib.dir}/org.springframework.build.aws.ivy.jar"/> | |||
<path location="${ivy.lib.dir}/commons-codec.jar"/> | |||
<path location="${ivy.lib.dir}/commons-httpclient.jar"/> | |||
<path location="${ivy.lib.dir}/commons-logging.jar"/> | |||
<path location="${ivy.lib.dir}/jets3t.jar"/> | |||
<path location="${ivy.lib.dir}"/> | |||
</classpath> | |||
</taskdef> | |||
<ivy:settings file="${ivy.settings.file}"/> | |||
<property name="ivy.initialized" value="true"/> | |||
</target> | |||
--> | |||
<target name="maven.init" > | |||
<property name="org.apache.maven.ant.version" value="2.0.10"/> | |||
<property name="org.springframework.build.aws.maven.version" value="2.0.0.RELEASE"/> | |||
<!-- | |||
<ivy:cachepath resolveId="maven.ant.tasks.classpath" pathid="maven.ant.tasks.classpath" | |||
organisation="org.apache.maven" module="com.springsource.org.apache.maven.ant" | |||
revision="${org.apache.maven.ant.version}" conf="runtime" type="jar" inline="true" log="download-only"/> | |||
--> | |||
<!-- | |||
<taskdef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" | |||
classpathref="maven.ant.tasks.classpath"/> | |||
--> | |||
<maven:install-provider groupId="org.springframework.build.aws" artifactId="org.springframework.build.aws.maven" | |||
version="${org.springframework.build.aws.maven.version}"/> | |||
<!-- | |||
<maven:install-provider groupId="org.springframework.build" artifactId="aws.maven" | |||
version="${org.springframework.build.aws.maven.version}"/> | |||
--> | |||
</target> | |||
<target name="junitreport" depends="init,init-taskdefs" | |||
if="junitreport.available"> | |||
<clean-dir dir="${aj.junit.dir}/html"/> | |||
<junitreport todir="${aj.junit.dir}/html"> | |||
<fileset dir="${aj.junit.dir}"> | |||
<include name="**/TEST-*.xml"/> | |||
</fileset> | |||
<report format="frames" todir="${aj.junit.dir}/html"/> | |||
</junitreport> | |||
<pathconvert property="jur.url" targetos="unix"> | |||
<path location="${aj.junit.dir}/html/index.html"/> | |||
</pathconvert> | |||
<echo message="see file:${jur.url}"/> | |||
</target> | |||
<target name="do-test-junit" | |||
depends="init-taskdefs" | |||
description="run junit tests for a module using module root or leaves"> | |||
<property name="dtj.dir" | |||
location="${aj.junit.dir}/${module.name}"/> | |||
<mkdir dir="${dtj.dir}"/> | |||
<condition property="dtj.includes" | |||
value="${junit.includes}" | |||
else="${junit.rootSuites}"> | |||
<istrue value="${junit.leaves}"/> | |||
</condition> | |||
<condition property="dtj.excludes" | |||
value="${junit.excludes}" | |||
else=""> | |||
<istrue value="${junit.leaves}"/> | |||
</condition> | |||
<junit | |||
dir="${aspectj.modules.build.dir}" | |||
failureproperty="test-junit-${module.name}.failed" | |||
fork="on" | |||
forkmode="perTest" | |||
maxmemory="400m" | |||
includeAntRuntime="off" | |||
printsummary="yes" | |||
haltonfailure="${haltOnTestFailure}" > | |||
<classpath> | |||
<pathelement location="${aj.jar.dir}/${module.name}-test-all.jar"/> | |||
<!-- see skipped libraries in Builder.properties --> | |||
<pathelement location="${jdk.tools.jar}"/> | |||
<pathelement location="${aspectj.modules.lib.dir}/junit/junit.jar"/> | |||
<fileset dir="${aspectj.modules.lib.dir}/commons" includes="commons.jar"/> | |||
<!-- XML api's used by loadtime, also needed when running under 1.3 per Ant FAQ --> | |||
<fileset dir="${aspectj.modules.lib.dir}/ant/lib" | |||
includes="ant.jar,ant-junit.jar,xml-apis.jar,xercesImpl.jar"/> | |||
</classpath> | |||
<jvmarg value="-Daspectjrtpath=${lib.test.aspectjrt.jar}" /> | |||
<formatter type="xml"/> | |||
<batchtest todir="${dtj.dir}"> | |||
<fileset dir="${modules.dir}/${module.name}/testsrc" | |||
includes="${dtj.includes}" | |||
excludes="${dtj.excludes}"/> | |||
</batchtest> | |||
</junit> | |||
<report-if-failed text="JUnit tests for ${module.name} failed" | |||
property="test-junit-${module.name}.failed"/> | |||
</target> | |||
<!-- ===================================================================== --> | |||
<!-- custom targets --> | |||
<!-- ===================================================================== --> | |||
<target name="build-harness-jar" depends="init" | |||
description="build harness jar from scratch"> | |||
<antcall target="clean-jars"/> | |||
<assemble-module-test module="testing-drivers"/> | |||
</target> | |||
<target name="build-testing-jars" depends="init" | |||
description="build testing jars from scratch"> | |||
<antcall target="build-harness-jar"/> | |||
</target> | |||
<target name="build-testing-client" depends="init-taskdefs,init"> | |||
<build-module module="testing-client" assemble="true"/> | |||
<assemble-module-test module="testing-client"/> | |||
<echo> | |||
To use testing client jar in tests, | |||
mv ../aj-build/jars/testing-client-all.jar ../lib/tests/testing-client.jar | |||
</echo> | |||
</target> | |||
<target name="aspectj" depends="init,aspectjtools-dist,docs-dist" description="create installer from local distributions"> | |||
<property name="installer.staging.dir" location="${aj.temp.dir}/installer-staging"/> | |||
<clean-dir dir="${installer.staging.dir}"/> | |||
<copy todir="${installer.staging.dir}"> | |||
<fileset dir="${aj.dist.dir}/tools"/> | |||
<fileset dir="${aj.dist.dir}/docs"/> | |||
</copy> | |||
<antcall target="create-installer"> | |||
<param name="installer.file" location="${aj.installer.jar}"/> | |||
<param name="staging.dir" location="${installer.staging.dir}"/> | |||
<param name="htmlSrc.dir" location="${aspectj.modules.build.dir}/products/aspectj/install"/> | |||
<param name="simpleClassName" value="ToolsInstaller"/> | |||
</antcall> | |||
<delete dir="${installer.staging.dir}"/> | |||
</target> | |||
<target name="docs-dist" depends="init"> | |||
<ant dir="${aspectj.modules.dir}/docs" | |||
antfile="build.xml" | |||
target="local-dist" | |||
inheritAll="false"/> | |||
</target> | |||
<target name="aspectjrt" depends="init" | |||
description="build aspectjrt.jar (differently than release)"> | |||
<build-module-all module="aspectj5rt"/> | |||
<copy file="${aj.jar.dir}/aspectj5rt-all.jar" | |||
tofile="${aj.jar.dir}/aspectjrt.jar"/> | |||
</target> | |||
<target name="compile-runtime-11" depends="init-properties" | |||
description="compile runtime under 1.1 - fails, but by how much?"> | |||
<condition property="cr1.in13"> | |||
<equals arg1="1.3" arg2="${ant.java.version}"/> | |||
</condition> | |||
<antcall target="compile-runtime-11-flag-unless13"/> | |||
<antcall target="compile-runtime-11-do-if13"/> | |||
</target> | |||
<target name="compile-runtime-11-flag-unless13" depends="init-properties" | |||
unless="cr1.in13"> | |||
<echo message="Skipping compile-runtime-11 unless 1.3"/> | |||
</target> | |||
<target name="compile-runtime-11-do-if13" depends="init-properties" | |||
if="cr1.in13"> | |||
<mkdir dir="${aj.build.dir}/classes-1.1"/> | |||
<property name="java11.classes.zip" | |||
location="${java11.home}/lib/classes.zip"/> | |||
<available property="classes.zip.available" | |||
file="${java11.classes.zip}"/> | |||
<fail unless="classes.zip.available" message="no 1.1 bootclasspath"/> | |||
<javac | |||
compiler="javac1.1" | |||
bootclasspath="${java11.classes.zip}" | |||
source="1.3" | |||
includejavaruntime="no" | |||
includeantruntime="no" | |||
destdir="${aj.build.dir}/classes-1.1" | |||
srcdir="${aspectj.modules.dir}/runtime/src" | |||
target="1.1" | |||
verbose="false" | |||
failonerror="true" | |||
/> | |||
<delete dir="${aj.build.dir}/classes-1.1"/> | |||
</target> | |||
<!-- ===================================================================== --> | |||
<!-- boilerplate antcalls --> | |||
<!-- ===================================================================== --> | |||
<!-- for any-[module|product], define [module|product].name --> | |||
<target name="any-module" depends="init"> | |||
<fail unless="module.name" message="use -Dmodule.name=... to define"/> | |||
<build-module module="${module.name}"/> | |||
</target> | |||
<target name="any-module-all" depends="init"> | |||
<fail unless="module.name" message="use -Dmodule.name=... to define"/> | |||
<build-module-all module="${module.name}"/> | |||
</target> | |||
<target name="any-product" depends="init"> | |||
<fail unless="product.name" message="use -Dproduct.name=... to define"/> | |||
<antcall target="build-product"> | |||
<param name="product.name" value="${product.name}"/> | |||
</antcall> | |||
</target> | |||
<target name="ajdoc-all"> | |||
<build-module-all module="ajdoc"/> | |||
</target> | |||
<target name="build"> | |||
<build-module-all module="build"/> | |||
</target> | |||
<target name="aspectjtools-dist" depends="init" description="build local distribution"> | |||
<antcall target="build-product"> | |||
<param name="product.name" value="tools"/> | |||
</antcall> | |||
</target> | |||
<!-- ===================================================================== --> | |||
<!-- eclipse plugins --> | |||
<!-- ===================================================================== --> | |||
<target name="eclipse.plugins" depends="init" | |||
description="create the Eclipse distribution plugins"> | |||
<ant dir="${aspectj.modules.dir}/eclipse.plugin" inheritAll="false"/> | |||
</target> | |||
<target name="src" depends="init" description="build src modules"> | |||
<mkdir dir="${aj.src.dir}"/> | |||
<jar destfile="${aj.src.dir}/aspectjrt${build.version}-src.jar"> | |||
<fileset dir="${aspectj.modules.dir}/aspectj5rt/java5-src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/runtime/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
</jar> | |||
<unzip dest="${aj.src.dir}/bcelsrc" src="${aspectj.modules.dir}/lib/bcel/bcel-src.zip"/> | |||
<!-- loadtime5/asm/bridge/loadtime/weaver/weaver5 --> | |||
<jar destfile="${aj.src.dir}/aspectjweaver${build.version}-src.jar"> | |||
<fileset dir="${aspectj.modules.dir}/aspectj5rt/java5-src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/runtime/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
<exclude name="**/*.html"/> | |||
</fileset> | |||
<fileset dir="${aj.src.dir}/bcelsrc"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/loadtime5/java5-src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/asm/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/bridge/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/loadtime/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/org.aspectj.matcher/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/weaver/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/weaver5/java5-src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/util/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
</jar> | |||
<!-- missing from this are the jdtDepends.jar src files --> | |||
<unzip dest="${aj.src.dir}/jdtsrc" src="${aspectj.modules.dir}/lib/jdtcore-aj/jdtcore-for-aspectj-src.zip"/> | |||
<!-- ajde/ajde.core/ajdoc/asm/bridge/loadtime/org.aspectj.ajdt.core/taskdefs/util/weaver5 --> | |||
<jar destfile="${aj.src.dir}/aspectjtools${build.version}-src.jar"> | |||
<fileset dir="${aj.src.dir}/jdtsrc"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aj.src.dir}/bcelsrc"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/loadtime5/java5-src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/loadtime/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/ajde/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/ajde.core/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/runtime/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/aspectj5rt/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/ajdoc/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/asm/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/bridge/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/loadtime/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/org.aspectj.ajdt.core/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/taskdefs/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/util/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/weaver/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/org.aspectj.matcher/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/weaver5/java5-src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
</jar> | |||
<delete dir="${aj.src.dir}/bcelsrc" failonerror="false"/> | |||
<delete dir="${aj.src.dir}/jdtsrc" failonerror="false"/> | |||
<jar destfile="${aj.src.dir}/org.aspectj.matcher-${build.version}-src.jar"> | |||
<fileset dir="${aspectj.modules.dir}/bridge/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/util/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/org.aspectj.matcher/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<!-- | |||
<fileset dir="${aj.src.dir}/jdtsrc"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aj.src.dir}/bcelsrc"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/loadtime5/java5-src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/loadtime/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/ajde/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/ajde.core/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/runtime/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/aspectj5rt/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/ajdoc/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/asm/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/loadtime/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/org.aspectj.ajdt.core/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/taskdefs/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/weaver/src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
<fileset dir="${aspectj.modules.dir}/weaver5/java5-src"> | |||
<exclude name="CVS"/> | |||
<exclude name="**/.cvsignore"/> | |||
</fileset> | |||
--> | |||
</jar> | |||
<jar destfile="${aj.src.dir}/org.aspectj-${build.version}-src.jar"> | |||
<fileset dir="${aj.src.dir}"> | |||
<include name="aspectjrt${build.version}-src.jar"/> | |||
<include name="aspectjweaver${build.version}-src.jar"/> | |||
<include name="aspectjtools${build.version}-src.jar"/> | |||
<include name="org.aspectj.matcher-${build.version}-src.jar"/> | |||
</fileset> | |||
</jar> | |||
<delete file="{aj.src.dir}/aspectjrt${build.version}-src.jar"/> | |||
<delete file="{aj.src.dir}/aspectjweaver${build.version}-src.jar"/> | |||
<delete file="{aj.src.dir}/aspectjtools${build.version}-src.jar"/> | |||
<delete file="{aj.src.dir}/org.aspectj.matcher${build.version}-src.jar"/> | |||
</target> | |||
<target name="repo" depends="init" description="deploy maven repo"> | |||
<property name="repo.url" value="scp://simonegianni.it/home/mavenrsync/repo"/> | |||
<property name="repo.id" value="simonegianni-rsync"/> | |||
<mkdir dir="${modules.dir}/aj-build/repo"/> | |||
<copy toDir="${modules.dir}/aj-build/repo" file="aspectjtools.pom"/> | |||
<copy toDir="${modules.dir}/aj-build/repo" file="aspectjweaver.pom"/> | |||
<copy toDir="${modules.dir}/aj-build/repo" file="aspectjrt.pom"/> | |||
<replaceregexp byline="true" flags="g"> | |||
<regexp pattern="ASPECTJVERSION"/> | |||
<substitution expression="${repo.version}"/> | |||
<fileset dir="${modules.dir}/aj-build/repo"> | |||
<include name="*.pom"/> | |||
</fileset> | |||
</replaceregexp> | |||
<!-- Invoke maven to deploy the jars to the rsynced repo --> | |||
<antcall target="mavenDeployJar"> | |||
<param name="file" value="${modules.dir}/aj-build/dist/tools/lib/aspectjtools.jar"/> | |||
<param name="artifact" value="aspectjtools"/> | |||
<param name="desc" value="AspectJ Tools"/> | |||
</antcall> | |||
<antcall target="mavenDeployJar"> | |||
<param name="file" value="${modules.dir}/aj-build/dist/tools/lib/aspectjweaver.jar"/> | |||
<param name="artifact" value="aspectjweaver"/> | |||
<param name="desc" value="AspectJ Weaver"/> | |||
</antcall> | |||
<antcall target="mavenDeployJar"> | |||
<param name="file" value="${modules.dir}/aj-build/dist/tools/lib/aspectjrt.jar"/> | |||
<param name="artifact" value="aspectjrt"/> | |||
<param name="desc" value="AspectJ Runtime"/> | |||
</antcall> | |||
<antcall target="mavenDeploySource"> | |||
<param name="file" value="${modules.dir}/aj-build/src/aspectjtools${build.version}-src.jar"/> | |||
<param name="artifact" value="aspectjtools"/> | |||
<param name="desc" value="AspectJ Tools"/> | |||
</antcall> | |||
<antcall target="mavenDeploySource"> | |||
<param name="file" value="${modules.dir}/aj-build/src/aspectjweaver${build.version}-src.jar"/> | |||
<param name="artifact" value="aspectjweaver"/> | |||
<param name="desc" value="AspectJ Weaver"/> | |||
</antcall> | |||
<antcall target="mavenDeploySource"> | |||
<param name="file" value="${modules.dir}/aj-build/src/aspectjrt${build.version}-src.jar"/> | |||
<param name="artifact" value="aspectjrt"/> | |||
<param name="desc" value="AspectJ Runtime"/> | |||
</antcall> | |||
</target> | |||
<!-- | |||
ant -propertyfile XXX publishtomaven | |||
--> | |||
<target name="publishtomaven_snapshot" depends="maven.init"> | |||
<property name="build.root" value="/Users/aclement/gits/org.aspectj"/> | |||
<property name="adjusted.release.type" value="snapshot"/> | |||
<property name="maven.central.repository" value="s3://maven.springframework.org/${adjusted.release.type}"/> | |||
<!-- | |||
<property name="maven.central.repository" value="https://repo.spring.io/libs-snapshot-local/org/aspectj/aspectjweaver"/> | |||
--> | |||
<!-- aspectjtools/target/aspectjtools-1.9.8-SNAPSHOT.jar --> | |||
<property name="bin.jars.folder" value="${build.root}/dist/tools/lib"/> | |||
<property name="src.jars.folder" value="${build.root}/src"/> | |||
<property name="suffix" value="1.9.8-SNAPSHOT"/> | |||
<!-- ASPECTJRT --> | |||
<maven:deploy file="${build.root}/aspectjrt/target/aspectjrt-${suffix}.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload/aspectjrt.pom"/> | |||
<attach file="${build.root}/aspectjrt/target/aspectjrt-${suffix}-sources.jar" classifier="sources"/> | |||
</maven:deploy> | |||
<!-- ASPECTJTOOLS --> | |||
<maven:deploy file="${build.root}/aspectjtools/target/aspectjtools-${suffix}.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload/aspectjtools.pom"/> | |||
<attach file="${build.root}/aspectjtools/target/aspectjtools-${suffix}-sources.jar" classifier="sources"/> | |||
</maven:deploy> | |||
<!-- ASPECTJWEAVER --> | |||
<maven:deploy file="${build.root}/aspectjweaver/target/aspectjweaver-${suffix}.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload/aspectjweaver.pom"/> | |||
<attach file="${build.root}/aspectjweaver/target/aspectjweaver-${suffix}-sources.jar" classifier="sources"/> | |||
</maven:deploy> | |||
<!-- ASPECTJMATCHER --> | |||
<maven:deploy file="${build.root}/aspectjmatcher/target/aspectjmatcher-${suffix}.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload/aspectjmatcher.pom"/> | |||
<attach file="${build.root}/aspectjmatcher/target/aspectjmatcher-${suffix}-sources.jar" classifier="sources"/> | |||
</maven:deploy> | |||
</target> | |||
<target name="publishtomaven_milestone" depends="maven.init"> | |||
<property name="build.root" value="/Users/aclement/gits/org.aspectj"/> | |||
<property name="suffix" value="1.9.8.M1"/> | |||
<property name="adjusted.release.type" value="milestone"/> | |||
<property name="maven.central.repository" value="s3://maven.springframework.org/${adjusted.release.type}"/> | |||
<property name="bin.jars.folder" value="${build.root}/dist/tools/lib"/> | |||
<property name="src.jars.folder" value="${build.root}/src"/> | |||
<!-- ASPECTJRT --> | |||
<maven:deploy file="${build.root}/aspectjrt/target/aspectjrt-${suffix}.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload_milestone/aspectjrt.pom"/> | |||
<attach file="${build.root}/aspectjrt/target/aspectjrt-${suffix}-sources.jar" classifier="sources"/> | |||
</maven:deploy> | |||
<!-- ASPECTJTOOLS --> | |||
<maven:deploy file="${build.root}/aspectjtools/target/aspectjtools-${suffix}.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload_milestone/aspectjtools.pom"/> | |||
<attach file="${build.root}/aspectjtools/target/aspectjtools-${suffix}-sources.jar" classifier="sources"/> | |||
</maven:deploy> | |||
<!-- ASPECTJWEAVER --> | |||
<maven:deploy file="${build.root}/aspectjweaver/target/aspectjweaver-${suffix}.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload_milestone/aspectjweaver.pom"/> | |||
<attach file="${build.root}/aspectjweaver/target/aspectjweaver-${suffix}-sources.jar" classifier="sources"/> | |||
</maven:deploy> | |||
<!-- ASPECTJMATCHER --> | |||
<maven:deploy file="${build.root}/aspectjmatcher/target/aspectjmatcher-${suffix}.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload_milestone/aspectjmatcher.pom"/> | |||
<attach file="${build.root}/aspectjmatcher/target/aspectjmatcher-${suffix}-sources.jar" classifier="sources"/> | |||
</maven:deploy> | |||
</target> | |||
<target name="publishtomaven_release" depends="maven.init"> | |||
<property name="suffix" value="1.7.2"/> | |||
<property name="build.root" value="/Users/aclement/gits/org.aspectj/aj-build"/> | |||
<property name="adjusted.release.type" value="release"/> | |||
<property name="maven.central.repository" value="s3://maven.springframework.org/${adjusted.release.type}"/> | |||
<property name="bin.jars.folder" value="${build.root}/dist/tools/lib"/> | |||
<property name="src.jars.folder" value="${build.root}/src"/> | |||
<!-- ASPECTJRT --> | |||
<maven:deploy file="${bin.jars.folder}/aspectjrt.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload_${adjusted.release.type}/aspectjrt.pom"/> | |||
<attach file="${src.jars.folder}/aspectjrt${suffix}-src.jar" classifier="sources"/> | |||
</maven:deploy> | |||
<!-- ASPECTJTOOLS --> | |||
<maven:deploy file="${bin.jars.folder}/aspectjtools.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload_${adjusted.release.type}/aspectjtools.pom"/> | |||
<attach file="${src.jars.folder}/aspectjtools${suffix}-src.jar" classifier="sources"/> | |||
</maven:deploy> | |||
<!-- ASPECTJWEAVER --> | |||
<maven:deploy file="${bin.jars.folder}/aspectjweaver.jar"> | |||
<remoteRepository url="${maven.central.repository}"> | |||
<authentication username="${accessKey}" passphrase="${secretKey}"/> | |||
</remoteRepository> | |||
<pom file="usedForMavenUpload_${adjusted.release.type}/aspectjweaver.pom"/> | |||
<attach file="${src.jars.folder}/aspectjweaver${suffix}-src.jar" classifier="sources"/> | |||
</maven:deploy> | |||
</target> | |||
<target name="repo2" depends="maven.init"> | |||
</target> | |||
<target name="mavenDeployJar"> | |||
<!-- | |||
Currently only an exec is usable, see http://jira.codehaus.org/browse/MANTTASKS-71 | |||
this mean you need to have maven installed on your system. | |||
--> | |||
<exec executable="n:/tools/apache-maven-2.0.9/bin/mvn.bat" failonerror="true"> | |||
<arg line="--batch-mode"/> | |||
<arg line="deploy:deploy-file"/> | |||
<arg line="-Durl=${repo.url}"/> | |||
<arg line="-DrepositoryId=${repo.id}"/> | |||
<arg line="-Dfile=${file}"/> | |||
<arg line="-DgroupId=org.aspectj"/> | |||
<arg line="-DartifactId=${artifact}"/> | |||
<arg line="-Dpackaging=jar"/> | |||
<arg line="-Dversion=${repo.version}"/> | |||
<arg line="-DpomFile=${modules.dir}/aj-build/repo/${artifact}.pom"/> | |||
</exec> | |||
</target> | |||
<target name="mavenDeploySource"> | |||
<!-- | |||
Currently only an exec is usable, see http://jira.codehaus.org/browse/MANTTASKS-71 | |||
this mean you need to have maven installed on your system. | |||
failonerror is set to false because deploy:deploy-file goes NPE for some obscure reason | |||
on recent versions, see http://jira.codehaus.org/browse/MDEPLOY-48 | |||
--> | |||
<exec executable="n:/tools/apache-maven-2.0.9/bin/mvn.bat" failonerror="false"> | |||
<arg line="--batch-mode"/> | |||
<arg line="deploy:deploy-file"/> | |||
<arg line="-Durl=${repo.url}"/> | |||
<arg line="-DrepositoryId=${repo.id}"/> | |||
<arg line="-Dfile=${file}"/> | |||
<arg line="-DgroupId=org.aspectj"/> | |||
<arg line="-DartifactId=${artifact}"/> | |||
<arg line="-Dpackaging=java-source"/> | |||
<arg line="-Dversion=${repo.version}"/> | |||
<arg value="-DgeneratePom=false"/> | |||
</exec> | |||
</target> | |||
</project> |
@@ -1,73 +0,0 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<ivysettings> | |||
<settings defaultResolver="external-lookup" defaultLatestStrategy="latest-lexico"/> | |||
<caches resolutionCacheDir="${ivy.cache.dir}/resolution" repositoryCacheDir="${ivy.cache.dir}/repository" | |||
ivyPattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" | |||
artifactPattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" | |||
useOrigin="true" checkUpToDate="false"/> | |||
<!-- | |||
<typedef name="s3" classname="org.springframework.aws.ivy.S3Resolver"/> | |||
<macrodef name="s3repo"> | |||
<attribute name="bucket"/> | |||
<attribute name="artifact.type"/> | |||
<attribute name="release.type"/> | |||
<s3 descriptor="required" accessKey="${accessKey}" secretKey="${secretKey}"> | |||
<ivy pattern="s3://@{bucket}/ivy/@{artifact.type}/@{release.type}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/> | |||
<artifact pattern="s3://@{bucket}/ivy/@{artifact.type}/@{release.type}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/> | |||
</s3> | |||
</macrodef> | |||
--> | |||
<!-- | |||
<macrodef name="localrepo"> | |||
<filesystem descriptor="required"> | |||
<ivy pattern="${local.repo.dir}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/> | |||
<artifact pattern="${local.repo.dir}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/> | |||
</filesystem> | |||
</macrodef> | |||
--> | |||
<resolvers> | |||
<!-- Integration repositories --> | |||
<!-- | |||
<filesystem name="integration" descriptor="required"> | |||
<ivy pattern="${integration.repo.dir}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/> | |||
<artifact pattern="${integration.repo.dir}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/> | |||
</filesystem> | |||
--> | |||
<!-- Lookup repositories --> | |||
<chain name="external-lookup" returnFirst="true"> | |||
<localrepo name="local-external-repository"/> | |||
<s3repo name="bundle-external-repository" bucket="repository.springsource.com" artifact.type="bundles" release.type="external"/> | |||
<s3repo name="library-external-repository" bucket="repository.springsource.com" artifact.type="libraries" release.type="external"/> | |||
</chain> | |||
<chain name="spring-portfolio-lookup" returnFirst="true"> | |||
<resolver ref="integration"/> | |||
<localrepo name="local"/> | |||
<s3repo name="bundle-release-repository" bucket="repository.springsource.com" artifact.type="bundles" release.type="release"/> | |||
<s3repo name="bundle-milestone-repository" bucket="repository.springsource.com" artifact.type="bundles" release.type="milestone"/> | |||
<s3repo name="bundle-snapshot-repository" bucket="repository.springsource.com" artifact.type="bundles" release.type="snapshot"/> | |||
<s3repo name="library-release-repository" bucket="repository.springsource.com" artifact.type="libraries" release.type="release"/> | |||
<s3repo name="library-milestone-repository" bucket="repository.springsource.com" artifact.type="libraries" release.type="milestone"/> | |||
<s3repo name="library-snapshot-repository" bucket="repository.springsource.com" artifact.type="libraries" release.type="snapshot"/> | |||
</chain> | |||
<!-- Publishing repositories --> | |||
<s3repo name="ebr-bundle-publish" bucket="${publish.bucket}" artifact.type="bundles" release.type="${adjusted.release.type}"/> | |||
<s3repo name="ebr-library-publish" bucket="${publish.bucket}" artifact.type="libraries" release.type="${adjusted.release.type}"/> | |||
<localrepo name="local-bundle-publish"/> | |||
<localrepo name="local-library-publish"/> | |||
</resolvers> | |||
<modules> | |||
<module organisation="org.springframework.*" name="*" resolver="spring-portfolio-lookup"/> | |||
<module organisation="com.springsource.*" name="*" resolver="spring-portfolio-lookup"/> | |||
</modules> | |||
</ivysettings> |
@@ -1,266 +0,0 @@ | |||
<?xml version="1.0" ?> | |||
<!-- writen for Ant 1.5.1 --> | |||
<project name="Packaging AJ for AJDT" default="ajdtjars"> | |||
<description>Takes an AJ build and spits out the jars for AJDT</description> | |||
<property name="pkg.working.dir" value="../aj-build/ajdttemp" /> | |||
<property name="aspectj.lib.dir" value="../aj-build/dist/tools/lib"/> | |||
<property name="ajdt.output.dir" value="../aj-build/ajdtoutput"/> | |||
<target name="ajdtjars" depends="ajdejar,weaverjar,runtimejar" | |||
description="Run in the build folder, it will take the aj-build/ output and create AJDT jars"> | |||
</target> | |||
<target name="ajdejar" description="Construct ajde.jar and ajdesrc.zip for the ajde plugin using an AJ build"> | |||
<!-- copy and unpack an aspectjtools.jar --> | |||
<delete dir="${pkg.working.dir}"/> | |||
<copy file="${aspectj.lib.dir}/aspectjtools.jar" tofile="aspectjtools.jar" overwrite="true" /> | |||
<mkdir dir="${pkg.working.dir}" /> | |||
<unzip dest="${pkg.working.dir}" src="aspectjtools.jar" /> | |||
<delete file="aspectjtools.jar"/> | |||
<!-- delete everything that isn't in the org.aspectj package --> | |||
<delete includeemptydirs="true"> | |||
<fileset dir="${pkg.working.dir}"> | |||
<exclude name="org/aspectj/**/*.*" /> | |||
</fileset> | |||
</delete> | |||
<!-- delete everything which is going to be in aspectjweaver.jar --> | |||
<echo message="Removing files not required in ajde.jar since they're contained in aspectjweaver.jar"/> | |||
<delete includeemptydirs="true"> | |||
<fileset dir="${pkg.working.dir}"> | |||
<include name="org/aspectj/asm/**/*.*" /> | |||
<include name="org/aspectj/weaver/**/*.*" /> | |||
<include name="org/aspectj/apache/bcel/**/*.*" /> | |||
<include name="org/aspectj/bridge/**/*.*" /> | |||
<include name="org/aspectj/util/**/*.*" /> | |||
</fileset> | |||
</delete> | |||
<!-- delete everything which is going to be in aspectjrt.jar --> | |||
<echo message="Removing files not required in ajde.jar since they're contained in aspectjrt.jar"/> | |||
<delete includeemptydirs="true"> | |||
<fileset dir="${pkg.working.dir}"> | |||
<!-- bug 118235: currently the commented out classes appear in both ajde.jar and aspectjrt.jar | |||
uncomment this if decide it should only live in aspectjrt.jar | |||
<include name="org/aspectj/internal/lang/annotation/**/*.*" /> | |||
<include name="org/aspectj/internal/lang/reflect/**/*.*" /> --> | |||
<include name="org/aspectj/runtime/**/*.*" /> | |||
<include name="org/aspectj/lang/**/*.*" /> | |||
</fileset> | |||
</delete> | |||
<!-- construct the ajde.jar --> | |||
<zip destfile="ajde.jar"> | |||
<fileset dir="${pkg.working.dir}" /> | |||
</zip> | |||
<delete dir="${pkg.working.dir}" /> | |||
<!-- build a src zip --> | |||
<unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/jdtcore-for-aspectj-src.zip"/> | |||
<unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/aspectjsrc.zip"/> | |||
<!-- delete everything that isn't in the org.aspectj package --> | |||
<delete includeemptydirs="true"> | |||
<fileset dir="${pkg.working.dir}"> | |||
<exclude name="org/aspectj/**/*.*"/> | |||
</fileset> | |||
</delete> | |||
<!-- delete everything which is going to be in aspectjweaversrc.zip --> | |||
<echo message="Removing files not required in ajdesrc.zip since they're contained in aspectjweaversrc.zip"/> | |||
<delete includeemptydirs="true"> | |||
<fileset dir="${pkg.working.dir}"> | |||
<include name="org/aspectj/asm/**/*.*" /> | |||
<include name="org/aspectj/weaver/**/*.*" /> | |||
<include name="org/aspectj/apache/bcel/**/*.*" /> | |||
<include name="org/aspectj/bridge/**/*.*" /> | |||
<include name="org/aspectj/util/**/*.*" /> | |||
</fileset> | |||
</delete> | |||
<!-- delete everything which is going to be in aspectjrtsrc.zip --> | |||
<echo message="Removing files not required in ajdesrc.zip since they're contained in aspectjrtsrc.zip"/> | |||
<delete includeemptydirs="true"> | |||
<fileset dir="${pkg.working.dir}"> | |||
<!-- bug 118235: currently the commented out classes appear in both ajde.jar and aspectjrt.jar | |||
uncomment this if decide it should only live in aspectjrt.jar | |||
<include name="org/aspectj/internal/lang/annotation/**/*.*" /> | |||
<include name="org/aspectj/internal/lang/reflect/**/*.*" /> --> | |||
<include name="org/aspectj/runtime/**/*.*" /> | |||
<include name="org/aspectj/lang/**/*.*" /> | |||
</fileset> | |||
</delete> | |||
<zip destfile="ajdesrc.zip"> | |||
<fileset dir="${pkg.working.dir}"/> | |||
</zip> | |||
<delete dir="${pkg.working.dir}" /> | |||
<copy file="ajde.jar" todir="${ajdt.output.dir}"/> | |||
<copy file="ajdesrc.zip" todir="${ajdt.output.dir}"/> | |||
<delete file="ajde.jar"/> | |||
<delete file="ajdesrc.zip"/> | |||
</target> | |||
<target name="weaverjar" description="Construct aspectjweaver.jar and aspectjweaversrc.zip for the aspectjweaver plugin using an AJ build"> | |||
<!-- copy and unpack an aspectjweaver.jar into a local build directory --> | |||
<delete dir="${pkg.working.dir}"/> | |||
<copy file="${aspectj.lib.dir}/aspectjweaver.jar" tofile="aspectjweaver.jar" overwrite="true" /> | |||
<mkdir dir="${pkg.working.dir}" /> | |||
<unzip dest="${pkg.working.dir}" src="aspectjweaver.jar" /> | |||
<delete file="aspectjweaver.jar"/> | |||
<!-- delete everything which shouldn't be included in the aspectjweaver.jar --> | |||
<echo message="Removing files not required in aspectjweaver.jar"/> | |||
<delete includeemptydirs="true"> | |||
<fileset dir="${pkg.working.dir}"> | |||
<exclude name="META-INF/*.*" /> | |||
<exclude name="org/aspectj/apache/bcel/**/*.*" /> | |||
<exclude name="org/aspectj/asm/**/*.*" /> | |||
<exclude name="org/aspectj/bridge/**/*.*" /> | |||
<exclude name="org/aspectj/util/**/*.*" /> | |||
<exclude name="org/aspectj/weaver/**/*.*" /> | |||
<exclude name="org/aspectj/org/objectweb/asm/**/*.*"/> | |||
</fileset> | |||
</delete> | |||
<!-- construct the aspectjweaver.jar directly in the org.aspectj.weaver plugin --> | |||
<zip destfile="aspectjweaver.jar"> | |||
<fileset dir="${pkg.working.dir}" /> | |||
</zip> | |||
<delete dir="${pkg.working.dir}" /> | |||
<!-- build a src zip --> | |||
<unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/jdtcore-for-aspectj-src.zip"/> | |||
<unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/aspectjsrc.zip"/> | |||
<!-- delete everything that isn't in the org.aspectj package --> | |||
<delete includeemptydirs="true"> | |||
<fileset dir="${pkg.working.dir}"> | |||
<exclude name="org/aspectj/**/*.*"/> | |||
</fileset> | |||
</delete> | |||
<!-- delete everything which shouldn't be included in the aspectjweaversrc.zip --> | |||
<echo message="Removing files not required in aspectjweaversrc.zip"/> | |||
<delete includeemptydirs="true"> | |||
<fileset dir="${pkg.working.dir}"> | |||
<exclude name="org/aspectj/apache/bcel/**/*.*" /> | |||
<exclude name="org/aspectj/asm/**/*.*" /> | |||
<exclude name="org/aspectj/bridge/**/*.*" /> | |||
<exclude name="org/aspectj/util/**/*.*" /> | |||
<exclude name="org/aspectj/weaver/**/*.*" /> | |||
</fileset> | |||
</delete> | |||
<zip destfile="aspectjweaversrc.zip"> | |||
<fileset dir="${pkg.working.dir}"/> | |||
</zip> | |||
<delete dir="${pkg.working.dir}" /> | |||
<copy file="aspectjweaver.jar" todir="${ajdt.output.dir}"/> | |||
<copy file="aspectjweaversrc.zip" todir="${ajdt.output.dir}"/> | |||
<delete file="aspectjweaver.jar"/> | |||
<delete file="aspectjweaversrc.zip"/> | |||
</target> | |||
<target name="runtimejar" description="Copy the aspectjrt.jar from an | |||
AJ build into the runtime plugin containing | |||
the src"> | |||
<copy file="${aspectj.lib.dir}/aspectjrt.jar" | |||
tofile="aspectjrt.jar" | |||
overwrite="true" /> | |||
<delete dir="${pkg.working.dir}" /> | |||
<!-- build a src zip --> | |||
<unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/jdtcore-for-aspectj-src.zip"/> | |||
<unzip dest="${pkg.working.dir}" src="${aspectj.lib.dir}/../../ide/eclipse/org.aspectj.ajde.source/src/aspectjsrc.zip"/> | |||
<!-- delete everything which shouldn't be included in the aspectjrtsrc.zip --> | |||
<echo message="Removing files not required in aspectjrtsrc.zip"/> | |||
<delete includeemptydirs="true"> | |||
<fileset dir="${pkg.working.dir}"> | |||
<exclude name="org/aspectj/internal/lang/annotation/**/*.*" /> | |||
<exclude name="org/aspectj/internal/lang/reflect/**/*.*" /> | |||
<exclude name="org/aspectj/runtime/**/*.*" /> | |||
<exclude name="org/aspectj/lang/**/*.*" /> | |||
</fileset> | |||
</delete> | |||
<zip destfile="aspectjrtsrc.zip"> | |||
<fileset dir="${pkg.working.dir}"/> | |||
</zip> | |||
<delete dir="${pkg.working.dir}" /> | |||
<copy file="aspectjrt.jar" todir="${ajdt.output.dir}"/> | |||
<copy file="aspectjrtsrc.zip" todir="${ajdt.output.dir}"/> | |||
<delete file="aspectjrt.jar"/> | |||
<delete file="aspectjrtsrc.zip"/> | |||
</target> | |||
<!-- VERSION-STRING --> | |||
<!-- these property values will be overridden when called from the master build script --> | |||
<property name="ajde.version" value="9.9.9" /> | |||
<property name="build.dir" value="build" /> | |||
<property file="aspectjlib.properties" /> | |||
<target name="init"> | |||
<mkdir dir="${build.dir}" /> | |||
<mkdir dir="dist" /> | |||
</target> | |||
<target name="clean" depends="init"> | |||
<delete dir="${build.dir}" /> | |||
<delete dir="dist" /> | |||
</target> | |||
<!--target name="packaged-plugin" depends="init" description="Create the plugin jar file from the assembled components in the build dir"> | |||
<copy todir="${build.dir}" includeemptydirs="false"> | |||
<fileset dir="."> | |||
<exclude name="*src.zip" /> | |||
<exclude name="build.*" /> | |||
<exclude name=".*" /> | |||
<exclude name="*/*" /> | |||
<exclude name="META-INF/MANIFEST.MF" /> | |||
<exclude name="aspectjlib.properties" /> | |||
<depth max="0" /> | |||
</fileset> | |||
</copy> | |||
<copy file="META-INF/MANIFEST.MF" tofile="${build.dir}/META-INF/MANIFEST.MF"> | |||
<filterset begintoken="9" endtoken="9"> | |||
<filter token="2.2.2" value="${ajde.version}"/> | |||
</filterset> | |||
</copy> | |||
<copy todir="${build.dir}/doc"> | |||
<fileset dir="doc" /> | |||
</copy> | |||
<copy todir="${build.dir}/icons"> | |||
<fileset dir="icons" /> | |||
</copy> | |||
<zip destfile="dist/org.aspectj.ajde_${ajde.version}.jar"> | |||
<fileset dir="build" /> | |||
</zip> | |||
</target--> | |||
<target name="copy doc" description="This copies the aspectj docs into the org.eclipse.ajde | |||
plugin. By default, it only copies over any changes from the current version"> | |||
<copy todir="doc" failonerror="false"> | |||
<fileset dir="${aspectj.doc.dir}"> | |||
<exclude name="examples" /> | |||
</fileset> | |||
</copy> | |||
</target> | |||
</project> |
@@ -1,604 +0,0 @@ | |||
<html> | |||
<head> | |||
<title>Build and Test AspectJ</title> | |||
</head> | |||
<body> | |||
<h1>Build and Test AspectJ</h1> | |||
This describes how to build and test AspectJ | |||
for developers working on source code for AspectJ. | |||
It covers building with Ant or Eclipse and testing with | |||
JUnit and the harness used for compiler tests. | |||
For information on how the build works and how to | |||
debug failed builds, see | |||
<a href="readme-build-module.html"> | |||
readme-build-module.html</a>. | |||
<ol> | |||
<li>Quick start</li> | |||
<li>Requirements</li> | |||
<li>Standard builds | |||
<ol> | |||
<li>Building using Ant</li> | |||
<li>Building with Eclipse</li> | |||
<li>Running the Ant build scripts from Eclipse</li> | |||
<li>Using Eclipse to compile but Ant to assemble</li> | |||
</ol> | |||
</li> | |||
<li>Running build products | |||
<ol> | |||
<li>Running the compiler, browser, or harness from the command-line</li> | |||
<li>Running the compiler, browser, or harness from Eclipse</li> | |||
<li>Running Ant-built jars from Eclipse</li> | |||
</ol> | |||
</li> | |||
<li>Testing AspectJ | |||
<ol> | |||
<li>Running JUnit tests in Eclipse</li> | |||
<li>Running JUnit tests from the command-line without Eclipse</li> | |||
<li>Running JUnit tests from Ant without Eclipse</li> | |||
<li>Using the test harness to run compiler tests</li> | |||
</ol> | |||
</li> | |||
<li>Releases | |||
<ol> | |||
<li>Release builds</li> | |||
<li>Release preconditions and testing</li> | |||
<li>Release completion</li> | |||
</ol> | |||
</li> | |||
<li>New modules, Java 5, and Ant-only build problems</li> | |||
<li>Build Problems</li> | |||
</ol> | |||
<h3>Quick start</h3> | |||
This is a minimal introduction to building and testing AspectJ. | |||
<p/>Command-line users use CVS to check out something like this: | |||
<pre> | |||
export CVS_ROOT=":pserver:anonymous@dev.eclipse.org:/home/technology" | |||
cvs co org.aspectj/modules</pre> | |||
If using Eclipse, check out the subdirectories of | |||
<code>org.aspectj/modules</code> as Eclipse projects. | |||
Skip the <code>aspectj-attic</code> module. | |||
<p/>Build an AspectJ distribution: | |||
<pre> | |||
cd org.aspectj/modules/build | |||
../lib/ant/bin/ant</pre> | |||
Install the distribution (e.g., into build/../aspectj-install): | |||
<pre> java -jar ../aj-build/dist/aspectj-DEVELOPMENT.jar</pre> | |||
You can skip the GUI by specifying an existing, empty writable | |||
target directory using <code>-to {targDir}</code>: | |||
<pre> java -jar ../aj-build/dist/aspectj-DEVELOPMENT.jar -to .</pre> | |||
Test it by running the build script in the examples directory: | |||
<pre> cd ../aspectj-install/doc/examples | |||
../../lib/ant/bin/ant</pre> | |||
This should build and run the spacewar example. | |||
<h3>Required sources, libraries, and tools</h3> | |||
<p> | |||
To build requires only the AspectJ project modules and Java VM's. | |||
All necessary libraries and tools are in the | |||
<a href="../lib/">lib</a> directory, including Ant. | |||
</p> | |||
<p>To get the source, check out from CVS. E.g., from the command line, | |||
</p> | |||
<pre> | |||
export CVS_ROOT=":pserver:anonymous@dev.eclipse.org:/home/technology" | |||
cvs co org.aspectj/modules | |||
</pre> | |||
<p> | |||
Eclipse users should check out each relevant subdirectory of | |||
<code>org.aspectj/modules</code> as a project | |||
(most have .project files). | |||
</p> | |||
<p> | |||
Not all modules are required. | |||
The <code>aspectj-attic</code> module only has old code. | |||
</p> | |||
<h3>Standard builds</h3> | |||
<h4>Overview</h4> | |||
The build system is designed to work standalone and support | |||
Eclipse and Ant. | |||
Each module is an Eclipse project, and all required libraries | |||
are in lib/. | |||
All build dependencies are read from Eclipse .classpath files | |||
and managed using an Ant builder task, | |||
so no Ant build scripts need to change when dependencies change. | |||
However, that means the modules (read: Eclipse projects) can only | |||
do what the builder task understands. Currently it expects | |||
release source files in <code>src</code> (or <code>java5-src</code> | |||
for Java 5 code) and test source files in | |||
<code>testsrc</code> (or <code>java5-testsrc</code>), | |||
and can handle Java and AspectJ projects. | |||
For more information on the build infrastructure and setup, see | |||
<a href="readme-build-module.html">readme-build-module.html</a> | |||
and <a href="#antInvariants">below</a>. | |||
<h4>Building using Ant</h4> | |||
<p> | |||
You should use the Ant in ../lib/ant. Currently this is a vanilla | |||
distribution of Ant 1.6.3, but that might change. | |||
</p> | |||
<p> | |||
This <a href=".">build</a> directory has a master | |||
<a href="build.xml">build.xml</a> script, and the modules have | |||
satellite <code>build.xml</code> which support building only that | |||
module. | |||
The <a href="release">release</a> directory has scripts for doing | |||
release builds (in multiple VM's, with testing). These are run by | |||
automated build and before any AspectJ distribution. | |||
Custom <code>build.xml</code> files are in | |||
The <a href="../docs/build.xml">../docs/build.xml</a>, | |||
<a href="../org.aspectj.lib/build-aspectjlib.xml">org.aspectj.lib/build-aspectjlib.xml</a>, | |||
and <a href="../eclipse.plugin/build.xml">../eclipse.plugin/build.xml</a>. | |||
These are invoked by the master | |||
<a href="build.xml">build.xml</a> as needed. | |||
Other modules have generic <code>build.xml</code>'s that just | |||
use the master build file to run targets <code>compile</code> and | |||
<code>test</code> for that module. | |||
(If you do <code>clean</code>, all binaries for all | |||
modules are cleaned.) | |||
</p> | |||
<p> | |||
The master <a href="build.xml">build.xml</a> | |||
creates an AspectJ distribution in | |||
<a href="../aj-build/dist/aspectj-DEVELOPMENT.jar"> | |||
../aj-build/dist/aspectj-DEVELOPMENT.jar | |||
</a>; | |||
You'll notice module jar results are put in | |||
<a href="../aj-build/jars">../aj-build/jars</a>, | |||
including <code>{module}.jar</code> and <code>{module}-test.jar</code> | |||
(for the release and test classes) and | |||
<code>{module}-all.jar</code>, and | |||
<code>{module}-test-all.jar</code> | |||
(including all antecedant classes and libraries). | |||
See <a href="build.xml">build.xml</a> for other targets. | |||
</p> | |||
<p> | |||
For any build, you should create your own version of | |||
<a href="local.properties">local.properties</a>, using | |||
<a href="sample.local.properties">sample.local.properties</a> | |||
as a template. | |||
When using the master <code>build.xml</code>, | |||
consider defining "build.config" to pass flags to the Ant | |||
builder. E.g., to reuse Eclipse classes and log verbosely, | |||
<p/> | |||
<pre> | |||
ant -Dbuild.config=useEclipseCompiles,verbose | |||
</pre> | |||
<p> | |||
(<code>useEclipseCompiles</code> is incompatible with release builds | |||
since it mixes testing and release classes.) | |||
<p/> | |||
<h4>Example builds</h4> | |||
<p> | |||
For example, to build everything into a release bundle, | |||
with verbose logging: | |||
</p> | |||
<pre> | |||
cd modules/build | |||
../lib/ant/bin/ant | |||
</pre> | |||
<p> | |||
To build only the asm module (and any modules it requires) using | |||
<code>modules/build</code>: | |||
</p> | |||
<pre> | |||
cd modules/build | |||
../lib/ant/bin/ant -f build.xml any-module -Dmodule.name=asm | |||
</pre> | |||
<p> | |||
To build and test the asm module from that module: | |||
</p> | |||
<pre> | |||
cd modules/asm | |||
../lib/ant/bin/ant test | |||
</pre> | |||
<p> | |||
To build the test harness into | |||
<code>../aj-build/jars/testing-drivers-all.jar</code>: | |||
</p> | |||
<pre> | |||
cd modules/build | |||
../lib/ant/bin/ant build-harness-jar | |||
</pre> | |||
<h4>Building with Eclipse</h4> | |||
<p> | |||
As mentioned above, the modules are Eclipse projects, so | |||
once checked out, they should build as-is. | |||
(You will need to be using a version of Eclipse that can | |||
handle the .project and .classpath files in the modules/projects.) | |||
That will enable you | |||
to run the compiler or test harness from within Eclipse (see below), | |||
but it will not build the AspectJ release as Ant does. | |||
If you are making changes in Eclipse, you should set your default JRE | |||
to the minimum supported by the AspectJ tools (currently JDK 1.3) | |||
to avoid using later API's. | |||
You'll need to set some variables in your Eclipse environment; | |||
currently these are: | |||
</p> | |||
<ul> | |||
<li><u>JAVA_HOME</u>: used to access <code>JAVA_HOME/lib/tools.jar</code> | |||
</li> | |||
<li><u>JRE15_LIB</u>: used to access Java 5 libraries. | |||
Some modules/projects use Java 5 API's. These have | |||
per-project compiler settings for 5.0 compliance, but cannot | |||
be built with the default pre-1.5 VM libraries. | |||
Until the minimum VM required by the tools is 1.5, | |||
we'll need to define this variable. | |||
</li> | |||
</ul> | |||
<h4>Running the Ant build scripts from Eclipse</h4> | |||
When running Ant from older versions of Eclipse, | |||
be sure to replace the Eclipse Ant | |||
libraries with ours. In the Ant configuration, remove all jars | |||
specified by Eclipse and add all the libraries in | |||
<a href="../lib/ant/lib">../lib/ant/lib</a> | |||
as well as in <a href="../lib/junit">../lib/junit</a>. | |||
(Do not add <code>../lib/build/build.jar</code>, which is | |||
added via a taskdef declaration.) | |||
<p/> | |||
If you find on rebuilding that the build products are not | |||
being regenerated, you may need to manually delete them | |||
or restart eclipse (the files are not being closed); see | |||
<a href="readme-build-module.html">readme-build-module.html</a> | |||
for more information. | |||
<h4>Using Eclipse to compile but Ant to assemble</h4> | |||
As mentioned above, | |||
assuming Eclipse is compiling the AspectJ modules successfully, | |||
you can use Ant to assemble the Eclipse-built .class files into a | |||
product by including <code>useEclipseCompiles</code> in the | |||
<code>build.config</code>. That reduces the build process | |||
to product assembly. | |||
(And of course you can run Ant from Eclipse as described above.) | |||
<h4>Running the compiler, browser, or harness from the command-line</h4> | |||
The build produces jar files in | |||
<a href="../aj-build/jars/">../aj-build/jars/</a>, | |||
some of which have manifests specifying the main class, so they | |||
can be run using <code>java -jar {file} {arguments}</code>. | |||
<p/>To run the compiler from the command-line, use the <code>ajbrowser</code> jar file: | |||
<pre> | |||
java -jar aj-build/jars/ajbrowser-all.jar {compile arguments} | |||
</pre> | |||
This will run <code>ajbrowser</code> if you provide no arguments or | |||
only (unflagged) .lst file arguments. To run the test harness, | |||
use the <code>testing-drivers</code> jar file: | |||
<pre> | |||
java -jar aj-build/jars/testing-drivers-all.jar tests/ajcTests.xml ... | |||
</pre> | |||
<h4>Running the compiler, browser, or harness from Eclipse</h4> | |||
To run things within Eclipse, create a run configuration from the | |||
defining module using the main class: | |||
<p/> | |||
<table border="1" cellpadding="1"> | |||
<tr><th>Program</th><th>Module</th><th>Main</th></tr> | |||
<tr><td>AspectJ compiler</td><td>org.aspectj.ajdt.core</td><td>org.aspectj.tools.ajc.Main</td></tr> | |||
<tr><td>AspectJ browser</td><td>ajbrowser</td><td>org.aspectj.tools.ajbrowser.Main</td></tr> | |||
<tr><td>Test harness</td><td>testing-drivers</td><td>org.aspectj.testing.drivers.Harness</td></tr> | |||
</table> | |||
<h4>Running Ant-built jars from Eclipse</h4> | |||
You can run build products (built jars) from Eclipse in two ways: | |||
<ul> | |||
<li>Put them on the classpath of some run configuration</li> | |||
<li>Select the jar files and right-click to "open with default editor" | |||
(assuming your system is configured to run .jar files)</li> | |||
</ul> | |||
You might do this to run the installer or test the browser as built. | |||
However, doing so might prevent those jar files from being recreated | |||
in the next build. | |||
It appears that sometimes these jar files are not close during the | |||
Eclipse session, which means they cannot be overwritten in new builds, | |||
even those run from a different Ant process. | |||
If you find that builds are silently failing, try deleting the | |||
build products. | |||
<h3>Testing AspectJ</h3> | |||
<p> | |||
Each module has a tree of JUnit tests in the <code>testsrc</code> directory. | |||
These parallel the <code>src</code> directories and contain roll-up suites | |||
for each package | |||
(<code>{module}/testsrc/{packagePath}/{package}Tests.java</code>) and | |||
for the module as a whole | |||
(<code>{module}/testsrc/{module}ModuleTests.java</code>). | |||
</p> | |||
<p> | |||
The AspectJ project also has <i>additional</i> custom tests in the | |||
<a href="../tests">tests module</a>, | |||
mainly the compiler tests run by the harness in | |||
<a href="../tests/ajcTests.xml">ajcTests.xml</a>. <u>It is important | |||
to run these additional compiler tests (not covered by the JUnit | |||
suite) before and after any change to the compiler.</u> | |||
</p> | |||
<p> | |||
The module <a href="../run-all-junit-tests">run-all-junit-tests</a> | |||
refers to all the other modules and the compiler tests adapted through | |||
the <a href="../tests/src">../tests/src</a>. So the easiest way to | |||
run the JUnit and compiler tests is to run the top-level suite | |||
<a href="../run-all-junit-tests/testsrc/RunTheseBeforeYouCommitTests.java"> | |||
RunTheseBeforeYouCommitTests</a>. | |||
</p> | |||
<h4>Running JUnit tests in Eclipse</h4> | |||
JUnit tests may be run under eclipse by selecting any JUnit source file | |||
and creating a run configuration for it, including the roll-up | |||
root test | |||
<a href="../run-all-junit-tests/testsrc/RunTheseBeforeYouCommitTests.java"> | |||
RunTheseBeforeYouCommitTests</a>. | |||
<h4>Running JUnit tests in Ant from the command line</h4> | |||
To run the JUnit tests for any module, just go there and | |||
<pre>../lib/ant/bin/ant tests</pre>. | |||
<h4>Running JUnit tests from the command-line without Eclipse or Ant</h4> | |||
<p> | |||
To run JUnit directly, put JUnit and the {module}-test-all.jar file | |||
on the classpath: | |||
</p> | |||
<pre> | |||
set cp="lib/junit/junit.jar;aj-build/jars/util-test-all.jar" | |||
java -classpath "$cp" junit.textui.TestRunner UtilModuleTests | |||
</pre> | |||
<p> | |||
The assembled (<code>-all</code>) jar files include all antecedants, | |||
except for those "skipped" (like Ant and JUnit). | |||
(For more on skipped libraries, see | |||
<a href="readme-build-module.html">readme-build-module.html</a>). | |||
</p> | |||
<h4>Using the test harness to run compiler tests</h4> | |||
<p> | |||
The <a href="build.xml">build.xml</a> <code>build-harness-jar</code> | |||
target builds a single jar with | |||
the AspectJ binaries and a test harness as the main class. | |||
It reads test suite files like | |||
<a href="../tests/ajcTests.xml">../tests/ajcTests.xml</a>; | |||
use the -help flag to see available options. | |||
For more information, see | |||
<a href="../tests/readme-tests-module.html"> | |||
../tests/readme-tests-module.html</a>. | |||
</p> | |||
<hr/> | |||
<h3><a name="releases"></a>Releases</h3> | |||
<h4>Release builds</h4> | |||
Committers do official release builds to create the distribution | |||
released in binary form from the web site. | |||
Release builds differ mainly in running | |||
from a clean, up-to-date tree and with correct build version values | |||
in <a href="local.properties">local.properties</a>, which | |||
will update <code>org.aspectj.bridge.Version</code>. | |||
Do not run using the <code>build.config</code> value | |||
<code>useEclipseCompiles</code>, | |||
because this will include testing classes in the release libraries. | |||
See <a href="#version">Version synchronization</a> below | |||
for more details on how the version is updated. | |||
<h4>Release preconditions and testing</h4> | |||
<p/> | |||
Normally, we do releases only after fixing all high-priority | |||
(P1 and P2) bugs in the bug database | |||
(<a href="https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&priority=P1&priority=P2"> | |||
All open AspectJ bugs with P1 and P2</a>). | |||
For bug fixes, associated tests in | |||
<code>tests/ajcTestsFailing.xml</code> are fixed and moved to | |||
<code>tests/ajcTests.xml</code>. | |||
<p/>Before a release, run the release tests as described in | |||
<a href="../tests/readme-release-tests.html"> | |||
../tests/readme-release-tests.html</a> | |||
(deprecated? using: | |||
<a href="../build/release-checklist.txt"> | |||
../build/release-checklist.txt</a>). | |||
<h4>Release completion</h4> | |||
When the release build is accepted, | |||
tag the tree with the release version | |||
so others can do diffs or create patches | |||
based on the release code. E.g., from the command line: | |||
<pre> | |||
cd org.aspectj/ | |||
cvs tag -R -c v1_1_0 | |||
</pre> | |||
<p/> | |||
Pushing the release out to the web involves manually updating | |||
the web with the release files and documentation, | |||
verifying the downloads and pages, | |||
and sending any release notifications. | |||
Save the release installer, test results, and any notes | |||
about deferred bugs or tests in | |||
<code>org.aspectj/releases/aspectj-{version}/</code>. | |||
<p/> | |||
<hr/> | |||
<a name="antInvariants"/> | |||
<h3>New modules, Java 5, and Ant-only build problems</h3> | |||
<p> | |||
To reiterate (and as described more fully in | |||
<a href="readme-build-module.html">readme-build-module.html</a>), | |||
the build system introspects on module and the .classpath file | |||
to determine how to build. Further, it enforces stricter build | |||
invariants than the Eclipse projects do; when your code works | |||
in Eclipse but fails in the Ant, it's your responsibility to fix it | |||
by following the build invariants below. | |||
</p> | |||
<p> | |||
<p>What to do when adding a new module (i.e., eclipse project): | |||
</p> | |||
<ol> | |||
<li>Setup like the other modules, following the invariants below, esp. | |||
<ol> | |||
<li>same directory level</li> | |||
<li>same naming conventions for source folders</li> | |||
<li>same use of known classpath variables/entries</li> | |||
</ol> | |||
</li> | |||
<li>Add module to those checked for copyright/license in | |||
<a href="testsrc/org/aspectj/build/BuildModuleTests.java"> | |||
testsrc/org/aspectj/build/BuildModuleTests.java | |||
</a> | |||
</li> | |||
<li>Add module to module dependency tree as usual in Eclipse project properties</li> | |||
<li>If the module is to produce a jar visible in {AspectJ}/lib, | |||
then add a zero-length file of the correct name to | |||
<a href="products/tools/dist/lib">products/tools/dist/lib</a> | |||
and an alias to that file from the module name in | |||
<a href="src/org/aspectj/internal/tools/build/Builder.properties"> | |||
Builder.properties</a> | |||
</li> | |||
<li>To make the JUnit tests visible to the Ant builder, include a | |||
top-level Ant suite titled {Module}ModuleTests.java | |||
</li> | |||
<li>Test the build in Eclipse/JUnit using | |||
<a href="testsrc/org/aspectj/internal/build/BuildModuleTest.java"> | |||
testsrc/org/aspectj/internal/build/BuildModuleTest.java | |||
</a> | |||
</li> | |||
</ol> | |||
<p> | |||
How the build system introspects, and the build invariants that | |||
are enforced by the Ant build: | |||
</p> | |||
<ul> | |||
<li>A given module is identified by its directory name. | |||
</li> | |||
<li>Most modules are Eclipse Java projects; some are AspectJ projects. | |||
Eclipse is not required to build. | |||
</li> | |||
<li>The file <code>{module.name}/.classpath</code> is read to determine | |||
the source directories and required projects and libraries. | |||
</li> | |||
<li>Normal Java source files are in <code>src</code> and <code>testsrc</code> | |||
directories. | |||
</li> | |||
<li>Java 5 source files are in <code>java5-src</code> and <code>java5-testsrc</code> | |||
directories. | |||
</li> | |||
<li>Neither <code>testsrc</code> directory is used in production builds. | |||
</li> | |||
<li> | |||
This only requires what's in the | |||
<a href="../lib">../lib</a> directory and the usual Java VM's. | |||
That means modules can only depend on each other and the libraries | |||
in <a href="../lib">../lib</a>. | |||
</li> | |||
<li>Modules are built into jar files. <code>{module.name}.jar</code> | |||
includes only the module classes, and <code>{module.name}-all.jar</code> | |||
includes the module classes plus any antecendant modules and any | |||
required libraries not skipped (see below). | |||
</li> | |||
<li>A file <code>{module.name}/{module.name}.mf.txt</code>, if available, | |||
will be used as the jar file manifest, after replacing certain | |||
variables in the <code>.mf.txt</code> file. | |||
</li> | |||
<li>All required libraries are included in the production jars, except | |||
for testing libraries and those "skipped" in | |||
<a href="src/org/aspectj/internal/tools/build/Builder.properties"> | |||
Builder.properties</a> | |||
(Ant, JUnit, etc.). | |||
</li> | |||
<li>Test classes are excluded from the compile process for production builds. | |||
These result in the same jar files; there is no way to | |||
tell externally whether the test classes were stripped from a jar. | |||
</li> | |||
<li>ONLY resources specified as <code>resource.pattern</code> in | |||
<a href="src/org/aspectj/internal/tools/build/Builder.properties"> | |||
Builder.properties</a> | |||
are included with assembled jars. | |||
</li> | |||
<li>No <code>testing-*</code> module is used in production builds, | |||
directly or indirectly. | |||
</li> | |||
<li>It is an error for any code to depend on any <code>testsrc</code> code, | |||
whether in the same or another module. | |||
</li> | |||
<li>AspectJ projects are built in Ant using | |||
<a href="../lib/aspectj">../lib/aspectj</a>. | |||
</li> | |||
<li>Java 5 code is not supported in AspectJ (yet). | |||
</li> | |||
<li>Java 5 code is built in Ant only if JAVA_HOME points to Java 5 (or later). | |||
</li> | |||
<li>No normal code can depend on any Java 5 code. | |||
The build system checks by building everything using the | |||
lowest VM supported by the tools. | |||
</li> | |||
</ul> | |||
<p>That means there are a number of legal Eclipse projects and code | |||
arrangements which are not valid AspectJ modules. | |||
When you add modules, libraries, or dependencies, you must build | |||
with Ant to verify these invariants are not broken. | |||
</p> | |||
<h3>Build problems</h3> | |||
Some build problems and fixes encountered in the past: | |||
<ul> | |||
<li>If the build works in Eclipse, but fails in Ant, | |||
do not assume the build scripts are broken. | |||
See <a href="#antInvariants">Invariants enforced only in Ant</a>. | |||
</li> | |||
<li>If your compiles fail because Ant cannot find <code>javac</code>, | |||
put the JDK bin directory on your PATH and/or define | |||
the JAVA_HOME environment variable. | |||
Ant requires the path to the <code>javac</code> executable | |||
when the <code>BuildModule</code> taskdef runs. I think it either | |||
gets it from <code>$JAVA_HOME</code> or if the <code>bin</code> | |||
directory is on the <code>PATH</code>. | |||
</li> | |||
<li>If using an IBM JDK at version 1.4 or higher within Eclipse, | |||
then the default value of JRE_LIB will point to the jar file | |||
"core.jar." Unlike the Sun JDK, IBM does not package the full | |||
runtime into a single jar ("rt.jar"), but instead has multiple | |||
jar files. Since core.jar does not contain the graphics libraries, | |||
several of the AspectJ projects will fail to build as checked out | |||
of CVS - there are missing dependencies on AWT and swing. The | |||
solution is to add graphics.jar to the project classpaths... BUT | |||
if this is added as an ordinary (external jar), then the main | |||
ant build script will pick up the contents of graphics.jar and | |||
include it in the aspectj distribution (obvious clue, the size of | |||
the built aspectjtools.jar doubles to about 10MB). Instead, from the | |||
Java Build Path properties page of the project, select "Add Library" | |||
and add the JDK library. You now have to remove the JRE_LIB entry | |||
from the project or Eclipse complains about duplicate jar files | |||
in the path. | |||
</li> | |||
<li>More generally, if you find extra classes in the assembled jars, | |||
most likely you have added unexpected libraries to the build, e.g., | |||
when adding libraries for the IBM JRE. | |||
To skip those, add them to the "skip.libraries" list in | |||
<a href="src/org/aspectj/internal/tools/build/Builder.properties"> | |||
src/org/aspectj/internal/tools/build/Builder.properties</a>. | |||
These libraries will always be skipped for any module built this way; | |||
there is no way to include a library in one module but not another. | |||
For more information on the properties file, see | |||
<a href="readme-build-module.html">readme-build-module.html</a>. | |||
</li> | |||
</ul> | |||
</body> | |||
</html> |
@@ -1,205 +0,0 @@ | |||
<html> | |||
<head> | |||
<title>AspectJ build module</title> | |||
</head> | |||
<body> | |||
<h1>AspectJ build</h1> | |||
This build module contains taskdefs and resources for doing builds | |||
and checking source licenses. This document describes our approach | |||
to builds and provides some notes for maintaining the build module | |||
and debugging builds. | |||
For information | |||
on running builds and doing testing for the AspectJ project, see | |||
<a href="readme-build-and-test-aspectj.html"> | |||
readme-build-and-test-aspectj.html</a>. | |||
<h3>Approach</h3> | |||
The AspectJ project source files are broken into modules, | |||
the subdirectories of the modules directory. | |||
(To eclipse users, each module is a Java or AspectJ project.) | |||
The modules are compiled independently and may be assembled | |||
by the build script into the release jar files. | |||
All required libraries are checked into the <code>lib</code> module. | |||
We use Ant to drive the build, but the logic for building and | |||
assembling modules resides in the BuildModule taskdef, | |||
which reads module dependencies from the Eclipse .classpath files | |||
and assembles the product according to the templates in the | |||
product directory. | |||
This makes it easy to change dependencies and add modules, | |||
but could make it difficult to debug if something were to go wrong. | |||
<h3>Maintaining the build module</h3> | |||
Because the BuildModule taskdef extracts dependencies from the Eclipse | |||
<code>.classpath</code> file, there is no need to update build scripts when | |||
adding or removing modules or changing their dependencies, so long | |||
as they are all in the base modules directory (usually the base of | |||
the eclipse workspace). | |||
Likewise, updating a product assembly should be easy, | |||
since they are based on introspection of the product directories. | |||
Still, the taskdef workings are not obvious in the build script, so | |||
this section makes clear some of the implicit logic | |||
in case it's required when debugging build failures or | |||
to make changes. | |||
<h4>Build module code updates</h4> | |||
The build module produces taskdefs used to run the build. | |||
The scripts avoid bootstrapping by using a build library jar | |||
checked in to | |||
<code>lib/build/build.jar</code>. | |||
That means code updates in the build module are not reflected in | |||
the build process until the <code>build.jar</code> produced by | |||
building this <code>build</code> module replaces that found in | |||
<code>lib/build/build.jar</code>. Once the module update is | |||
confirmed, the new <code>lib/build/build.jar</code> must be checked in | |||
to propogate the changes to other users. | |||
The scripts support an Ant variable <code>check.build.jar</code> | |||
by warning when <code>lib/build/build.jar</code> is out of date. | |||
<h4>BuildModule task</h4> | |||
The | |||
<a href="src/org/aspectj/internal/tools/ant/taskdefs/BuildModule.java"> | |||
BuildModule</a> | |||
taskdef implements an integrated module or product build. | |||
<p/><u>Module builds</u> are based on the Eclipse <code>.classpath</code> | |||
file, and can produce | |||
a jar with the module classes, with two variations: | |||
<ul> | |||
<li> include only the module classes, | |||
or assemble the jar complete with all antecedent modules and | |||
libraries; | |||
</li><li>compile the module(s) with or without any | |||
testing source or libraries | |||
</li> | |||
</ul> | |||
If there is a file {moduleName}.mf.txt | |||
in the module directory, it will be used as the manifest for the | |||
module jar file. | |||
<p/><u>Product builds</u> are defined by introspection of a | |||
<a href="products">products</a> subdirectory like | |||
<a href="products/tools">products/tools</a> for the AspectJ installer. | |||
These have an <code>install</code> directory for installer resources | |||
and a <code>dist</code> directory containing all files belonging in | |||
the distribution, including 0-length placeholders for the module build | |||
results (e.g., <a href="products/tools/dist/lib">products/tools/dist/lib</a>). | |||
These placeholder file names are mapped to the originating | |||
module by <code>Builder.moduleAliasFor(String)</code> | |||
using values in | |||
<a href="src/org/aspectj/internal/tools/build/Builder.properties"> | |||
Builder.properties</a>. | |||
(The "-all" suffix in the source jars means that the module and all required | |||
modules are included.) | |||
<p/> | |||
<a name="version"></a> | |||
<h4>Version synchronization</h4> | |||
The version is expressed in the jar manifests, in the <code>Version</code> class, | |||
and in some documentation files. The build script | |||
ensures all version expressions | |||
are aligned. When not doing or testing release builds, | |||
developers use the default "DEVELOPMENT" version. | |||
<p/>The build version is set in | |||
<a href="build-properties.xml">build-properties.xml</a> and propogated | |||
using Ant copy filters out to | |||
the <a href="../aspectj5rt/aspectj5rt.mf.txt">aspectjrt.jar manifest</a>, | |||
the <a href="../ajbrowser/ajbrowser.mf.txt">aspectjtools.jar manifest</a> | |||
and to | |||
<a href="../bridge/src/org/aspectj/bridge/Version.java"> | |||
../bridge/src/org/aspectj/bridge/Version.java</a> | |||
which the <a href="build.xml">build.xml</a> <code>init-version</code> task | |||
generates from a template | |||
<a href="lib/BridgeVersion.java.txt">lib/BridgeVersion.java.txt</a>. | |||
To avoid updating <code>Version.java</code> whenever | |||
<code>build-properties.xml</code> changes, a task | |||
<a href="src/org/aspectj/internal/tools/ant/taskdefs/VersionUptodate.java"> | |||
src/org/aspectj/internal/tools/ant/taskdefs/VersionUptodate.java</a> | |||
determines whether Version.java has the same version by scanning the source file. | |||
The scan is dim-witted; do not change the lines flagged in the template | |||
without also changing the scanning code in the task. | |||
<h4>Temporary aj-{name} and persistant aspectj-{name}</h4> | |||
<p/> | |||
Top-level temporary build directories are prefixed "aj-", | |||
so you can safely destroy any such directory or ignore it | |||
in CVS or the Eclipse package explorer. By default the build script | |||
puts them at the same level as other modules. In build scripts, property names | |||
follow a similar convention; those prefixed "aj-" may be deleted at will, while | |||
"aspectj-" names are source directories which should never be deleted. | |||
<h4>Building Java 5 sources</h4> | |||
<p/> | |||
Java 5 source is supported in <code>{module}/java5-src</code> directories. | |||
Under Ant, when building in a pre-Java-5 VM, this source will be ignored | |||
(hence, it must not be required to compile). Under Eclipse, developers | |||
not using Java 5 should close the corresponding modules. | |||
<h4>Builder.properties, resources, and tree audit tests</h4> | |||
<p/> | |||
In <a href="src/org/aspectj/internal/tools/build/Builder.properties"> | |||
src/org/aspectj/internal/tools/build/Builder.properties</a> | |||
you can set up | |||
<ul> | |||
<li>product aliases for mapping module jars</li> | |||
<li>libraries to exclude for assembling module jars</li> | |||
<li>patterns for copying resources.</li> | |||
</ul> | |||
Regarding the patterns, if you add a resource with an unrecognized suffix to a | |||
source tree, the corresponding unit test in | |||
<a href="testsrc/BuildModuleTests.java">testsrc/BuildModuleTests.java</a> | |||
will fail. You'll need to update the <code>Builder.properties</code> | |||
file (and recreate the build.jar) to ensure that the new resource | |||
is copied to the assembled module jar. | |||
<h3>Debugging build problems</h3> | |||
<h4>Running under Eclipse</h4> | |||
When running Ant from eclipse, | |||
do not use the default Eclipse Ant classpath; remove those jars and | |||
add all the libraries in <a href="../lib/ant/lib">../lib/ant/lib</a> | |||
as well as in <a href="../lib/junit">../lib/junit</a>. | |||
If the build is failing under eclipse or Ant and the problem appears | |||
to be in the build module, you can run the build directly in eclipse | |||
(not using the Ant script) by running the skipped JUnit tests in | |||
<a href="testsrc/org/aspectj/internal/build/ModulesTests.java"> | |||
testsrc/org/aspectj/internal/build/ModulesTests.java</a>. | |||
<p/> | |||
<h4>Why new or changed modules might not work</h4> | |||
The BuildModule taskdef makes some assumptions about the naming, | |||
position, and contents of module directories and files. | |||
Understand those (documented in | |||
<a href="src/org/aspectj/internal/tools/ant/taskdefs/BuildModule.java"> | |||
BuildModule.java</a>) before using non-standard module directories. | |||
<h4>Silent classpath and build failures</h4> | |||
<u>warning</u>: When Ant runs compile processes, sometimes Jar files | |||
are not closed until the process quits. When running Ant under Eclipse, | |||
that means the jar files are not writable until eclipse quits. | |||
This affects build products (e.g., installers) which are run under eclipse | |||
(e.g., by opening with the "default system editor") and libraries used | |||
when compiling under Javac (if not zip products or input). This problem | |||
presents as files not being writable, i.e., deleted or modified. | |||
<p/> | |||
One workaround is to delete any existing build products | |||
before re-creating them. The problem with this is that Ant provides no | |||
notice of that deletes fail when deleting with quiet="on", but when not | |||
running in quiet mode, deletes will fail if the directory does not exist. | |||
The workaround-workaround would be to create any required directories | |||
before trying to deleting any files, with the result of creating unused | |||
empty directories. | |||
<p/> | |||
Currently BuildModule tasks forks the Javac command to try to work around | |||
this problem, but the Zip commands do not work around it. | |||
If under Eclipse, you get strange behavior with Ant builds, clear | |||
out everything and build from the command line. In some cases, you | |||
have to exit Eclipse before files can be deleted. (*sigh*) | |||
<p/> | |||
</body> | |||
</html> |
@@ -1,42 +0,0 @@ | |||
<!-- ========================================================================= --> | |||
<!-- Copyright (c) 2005 Contributors --> | |||
<!-- All rights reserved. --> | |||
<!-- This program and the accompanying materials are made available --> | |||
<!-- under the terms of the Eclipse Public License v 2.0 --> | |||
<!-- which accompanies this distribution and is available at --> | |||
<!-- https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt --> | |||
<!-- --> | |||
<!-- Contributors: (See CVS checkin's) --> | |||
<!-- Wes Isberg initial implementation --> | |||
<!-- ========================================================================= --> | |||
<project name="test-build-script" default="all" basedir="."> | |||
<property name="modules.dir" location="${basedir}/.."/> | |||
<import file="${modules.dir}/build/build-properties.xml"/> | |||
<target name="all" depends="failures"/> | |||
<target name="failures" depends="init-properties"> | |||
<delete file="${aj.failure.file}"/> | |||
<echo message="-> no false negative (no file)"/> | |||
<antcall target="fail-if-failures"/> | |||
<touch file="${aj.failure.file}"/> | |||
<echo message="-> no false negative (empty file)"/> | |||
<antcall target="fail-if-failures"/> | |||
<echo message="-> no false negative (unset Property)"/> | |||
<report-if-failed text="not error text" property="unsetProperty"/> | |||
<antcall target="fail-if-failures"/> | |||
<echo message="-> true negative (set Property)"/> | |||
<property name="setProperty" value="."/> | |||
<report-if-failed text="error text" property="setProperty"/> | |||
<antcall target="fail-if-failures"/> | |||
<loadfile property="emit" srcfile="${aj.failure.file}"/> | |||
<echo message="-> file contents: ${emit}"/> | |||
</target> | |||
</project> |
@@ -1,87 +0,0 @@ | |||
#!/bin/sh | |||
[ -n "$DEBUG" ] && set -vx | |||
genAntScript=${genAntScript} # anything to create Ant script instead | |||
eclipseDir=`cd $HOME/../apps/eclipse && pwd` | |||
[ -d "$eclipseDir" ] || exit 3 | |||
scriptDir=`dirname "$0` | |||
scriptDir=`cd "$scriptDir"; pwd` | |||
cd "$scriptDir/../.." # in lib/build | |||
listAllPlugins() { | |||
cd "$eclipseDir/plugins" | |||
ls -d * | |||
} | |||
# try first without ant | |||
jdtPlugins() { | |||
cat<<EOF | |||
org.apache.ant_1.4.1 | |||
org.apache.xerces_4.0.3 | |||
org.eclipse.core.boot_2.0.0 | |||
org.eclipse.core.resources_2.0.0 | |||
org.eclipse.core.runtime_2.0.0 | |||
EOF | |||
} | |||
#return paths from eclipse plugin dir to jdt jars | |||
jdtPluginJars() { | |||
curDir=`pwd` | |||
for i in `jdtPlugins` ; do | |||
cd "$eclipseDir/plugins/$i" | |||
for j in *.jar; do | |||
echo "$i/$j" | |||
done | |||
cd "$curDir" | |||
done | |||
} | |||
verifyingCreatedAndActual() { | |||
cat<<EOF | |||
rm made | |||
\$JDKDIR/bin/jar tf jdtDepends.jar \ | |||
| sed '/META-INF/d' \ | |||
| sort > made | |||
rm have | |||
\$JDKDIR/bin/jar tf \ | |||
c:/home/wes/aj/aspectj/modules/lib/eclipse2.0/jdtDepends.jar \ | |||
| sed '/META-INF/d' \ | |||
| sort > have | |||
diff made have | |||
1720d1719 | |||
< org/w3c/dom/html/HTMLDOMImplementation.class | |||
EOF | |||
} | |||
cd "$eclipseDir/plugins" | |||
if [ -n "$genAntScript" ] ; then | |||
cat<<EOF | |||
<!-- | |||
<property name="eclipseDir" | |||
location="\${eclipseDir}"/> | |||
--> | |||
<target name="jdtDepends.jar" if="\${eclipseDir}" > | |||
<jar destfile="jdtDepends.jar" > | |||
<zipgroupfileset dir="\${eclipseDir}/plugins"> | |||
EOF | |||
for k in `jdtPluginJars` ; do | |||
cat <<EOF | |||
<include name="$k" /> | |||
EOF | |||
done | |||
cat <<EOF | |||
</zipgroupfileset> | |||
</jar> | |||
</target> | |||
EOF | |||
else | |||
mkdir tempzzz; cd tempzzz ; rm -rf *; | |||
for k in `jdtPluginJars` ; do | |||
"$JDKDIR"/bin/jar xf ../$k | |||
done | |||
"$JDKDIR"/bin/jar cfM ../jdtDepends.jar . | |||
cd .. | |||
mv jdtDepends.jar "$scriptDir" | |||
ls -ald "$scriptDir/jdtDepends.jar" | |||
fi |