Command-line users use CVS to check out something like this:
export CVS_ROOT=":pserver:anonymous@dev.eclipse.org:/home/technology" cvs co org.aspectj/modulesIf using Eclipse, check out the subdirectories of
org.aspectj/modules
as Java projects.
Skip modules aspectj-attic
if not tests
and testing-*
.
Build an AspectJ distribution:
cd org.aspectj/modules/build ../lib/ant/bin/ant -f build.xmlTo speed the build, Eclipse users can adopt the Eclipse-produced .class files:
../lib/ant/bin/ant -f build.xml -Dbuild.config=useEclipseCompilesInstall the distribution (e.g., into build/../aspectj-DEVELOPMENT):
java -jar ../aj-build/dist/aspectj-DEVELOPMENT.jarTest it by running the build script in the examples directory:
cd ../aspectj-DEVELOPMENT/doc/examples ../../ant/bin/antThis should build and run the spacewar example.
export CVS_ROOT=":pserver:anonymous@dev.eclipse.org:/home/technology" cvs co org.aspectj/modulesEclipse users should check out subdirectories of
org.aspectj/modules
as a Java project.
Not all modules are required.
The aspectj-attic
module only has old code,
and the tests
and testing-*
modules
are only needed to run tests.
Property | Meaning |
---|---|
module.name | To build any module (esp. those not directly supported by a target), use the "any-module" target and define the module name. |
check.build.jar | any value cause build to fail if
lib/build/build.jar is out of date. (This is a
built archive of the build module to avoid bootstrapping.)
|
build.config | override default configuration in build.xml. Significant values include "verbose" for more output and "useEclipseCompiles" to assume that Eclipse has compiled modules into their bin directories, and just assemble those classes. |
For example, to build everything into a release bundle, with verbose logging
cd modules/build ../lib/ant/bin/antTo build only the asm module (and any modules it requires):
cd modules/build ../lib/ant/bin/ant -f build.xml any-module -Dmodule.name=asmTo build the test harness into
../aj-build/jars/testing-drivers-all.jar
:
cd modules/build ../lib/ant/bin/ant -f build.xml build-testing-drivers
../lib/build/build.jar
, which is
added via a taskdef declaration.)
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 readme-build-module.html for more information.
useEclipseCompiles
in the
build.config
variable as described above. That reduces the build process
to product assembly, which can be completed in a couple minutes.
(And of course you can run Ant from Eclipse as described above.)
java -jar {file} {arguments}
.
To run the compiler from the command-line, use the ajbrowser
jar file:
java -jar aj-build/jars/ajbrowser-all.jar {compile arguments}This will run
ajbrowser
if you provide no arguments or
only (unflagged) .lst file arguments. To run the test harness,
use the testing-drivers
jar file:
java -jar aj-build/jars/testing-drivers-all.jar tests/ajcTests.xml ...
Program | Module | Main |
---|---|---|
AspectJ compiler | org.aspectj.ajdt.core | org.aspectj.tools.ajc.Main |
AspectJ browser | ajbrowser | org.aspectj.tools.ajbrowser.Main |
Test harness | testing-drivers | org.aspectj.testing.drivers.Harness |
testsrc
directory.
These parallel the src
directories and contain roll-up suites
for each package
({module}/testsrc/{packagePath}/{package}Tests.java
) and
for the module as a whole
({module}/testsrc/{module}ModuleTests.java
).
The AspectJ project also has custom tests in the
tests module,
mainly the compiler tests run by the harness in
ajcTests.xml.
build-testing-drivers
target builds a single jar with
the AspectJ binaries and a test harness as the main class.
It reads test suite files like
../tests/ajcTests.xml;
use the -help flag to see available options.
For more information, see
../tests/readme-tests-module.html.
org.aspectj.bridge.Version
.
See Version synchronization below
for more details on how the version is updated.
Normally, we do releases only after fixing all high-priority
(P1 and P2) bugs in the bug database
(a href="http://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).
For bug fixes, associated tests in
tests/ajcTestsFailing.xml
are fixed and moved to
tests/ajcTests.xml
.
Before a release, run the following tests:
tests/junitModules.xml
(which runs all the
modules/{module}/testsrc/{module}ModuleTests.java
).
tests/ajcTests.xml
.
Run these before the final build using the test harness.
Run both with and without the
-emacssym option. You can ignore known limitations and pure-java
failures (the latter
because they are presumed to be the fault of the underlying
eclipse Java compiler); do that by excluding those keywords.
For example, the following command runs the ajcTests.xml
suite twice (with and without -emacssym), skipping tests with
"pureJava" or "knownLimitation" as keywords, emitting verbose harness
information but logging only failures (not passes). It also
suppresses the output streams (but those associated with
failures are emitted when the failures are logged).
cd tests/ java -jar ../aj-build/jars/testing-drivers-all.jar ajcTests.xml -emacssym- \ -ajctestSkipKeywords=pureJava,knownLimitation -logFail -verbose -hideStreamsYou might also be able to use the build script:
cd build ../lib/ant/bin/ant -f build.xml ajcTestsFor more information, see the instructions for building and running the test harness ../testing-drivers/readme-testing-drivers.html and the tests ../tests/readme-tests-module.html.
cd {aspectj-install}/doc/examples ant -f build.xmlThis should build and run the spacewar example. To run all examples, use target
all
.
To run all the examples that do not require manual operation,
use target nonGui
.
This quick test verifies that the aspectjtools.jar and aspectjrt.jar
are installed and have a matching version, that the examples actually
compile and run, etc.
cd org.aspectj/ cvs tag -R -c v1_1_0
Pushing the release out to the web involves manually updating
aspectj-home/
with the release files
(and documentation, if it is not a preview release),
verifying the downloads and pages,
and sending any release notifications.
javac
,
put the JDK bin directory on your PATH and/or define
the JAVA_HOME environment variable.
Ant requires the path to the javac
executable
when the BuildModule
taskdef runs. I think it either
gets it from $JAVA_HOME
or if the bin
directory is on the PATH
.