You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # AspectJ
  2. AspectJ is:
  3. - a seamless aspect-oriented extension to the Java programming language
  4. - Java platform compatible
  5. - easy to learn and use
  6. AspectJ enables:
  7. - clean modularization of crosscutting concerns, such as error checking and handling, synchronization, context-sensitive behavior, performance optimizations, monitoring and logging, debugging support, and multi-object protocols
  8. ## Building
  9. AspectJ has a multi-module Maven build. Although various modules produce intermediate results, the key artifacts at the end of the build are:
  10. * `aspectjrt` - the AspectJ runtime
  11. * `aspectjweaver` - the AspectJ weaver
  12. * `aspectjtools` - the AspectJ compiler
  13. * `aspectjmatcher` - the AspectJ matcher
  14. These are the artifacts published to Maven Central for each release. In addition, there is an installer that can be run with `java -jar` to install AspectJ onto Windows/Mac/Linux. This installer is produced by the `installer` sub-module.
  15. In the root of a cloned AspectJ simply run:
  16. ```shell
  17. ./mvnw clean install
  18. ```
  19. You can also use a reasonably recent (3.6.3+), locally installed Maven installation instead of the Maven wrapper script.
  20. This will build all the modules, run all the tests and install the key artifacts in your local repository.
  21. Once built, access the Maven dependencies from your local repository or run the installer to install AspectJ locally:
  22. ```
  23. java -jar installer/target/aspectj-<VERSION>.jar
  24. ```
  25. ## Running the tests in Eclipse
  26. Once you have imported all the projects using `m2e`, there is a special module called `run-all-junit-tests` and within that a `RunTheseBeforeYouCommitTests` class that can be run with the JUnit launcher to execute thousands of tests.
  27. Ensure you run this with a JDK - the more recent the better since some tests will not execute on older JDKs - tests that verify language features that only exist in the more up to date JDK version.
  28. ## Documentation for AspectJ users
  29. * [Complete documentation quicklinks](https://www.eclipse.org/aspectj/docs.php)
  30. * [Setting up a development environment](docs/developer/IDE.md)
  31. * [Getting started with AspectJ](https://www.eclipse.org/aspectj/doc/released/progguide/starting.html)
  32. * [Programming Guide](https://www.eclipse.org/aspectj/doc/released/progguide/index.html)
  33. * [READMEs for each version of AspectJ](docs/dist/doc)
  34. ## Documentation for AspectJ developers
  35. * [How to contribute to AspectJ](CONTRIBUTING.md)
  36. * [How to release AspectJ](docs/developer/RELEASE.md)
  37. * [Maven build options (profiles, properties)](docs/developer/BUILD.md)
  38. ## Maven releases
  39. AspectJ is published to maven central under the `org.aspectj` groupID: https://search.maven.org/search?q=g:org.aspectj