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.

README.md 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. Please make sure that your project root directory name is either _aspectj_ (default for `git clone`) or _org.aspectj_ (case-insensitive), if you wish to run the build with tests.
  20. Some integration tests rely on this name when dynamically searching up the current path for the root folder.
  21. You can also use a reasonably recent (3.6.3+), locally installed Maven installation instead of the Maven wrapper script.
  22. This will build all the modules, run all the tests and install the key artifacts in your local repository.
  23. Once built, access the Maven dependencies from your local repository or run the installer to install AspectJ locally:
  24. ```
  25. java -jar installer/target/aspectj-<VERSION>.jar
  26. ```
  27. ## Running the tests in Eclipse
  28. 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.
  29. 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.
  30. ## Documentation for AspectJ users
  31. * [Complete documentation quicklinks](docs/index.adoc)
  32. * [Setting up a development environment](docs/developer/IDE.md)
  33. * [Getting started with AspectJ](docs/progguide/gettingstarted.adoc)
  34. * [Programming Guide](docs/progguide/index.adoc)
  35. * [READMEs for each version of AspectJ](docs/release)
  36. * [AspectJ Java version compatibility](docs/release/JavaVersionCompatibility.adoc)
  37. ## Documentation for AspectJ developers
  38. * [How to contribute to AspectJ](CONTRIBUTING.md)
  39. * [How to release AspectJ](docs/developer/RELEASE.md)
  40. * [Maven build options (profiles, properties)](docs/developer/BUILD.md)
  41. ## Maven releases
  42. AspectJ is published to Maven Central under [group ID `org.aspectj`](https://search.maven.org/search?q=g:org.aspectj).