@@ -17,22 +17,25 @@ one of two ways within your Maven reactors:
17
17
of this approach.
18
18
19
19
AspectJ Maven Plugin delegates most of its work to the AspectJ compiler `ajc` or documentation creator `ajdoc` included
20
- within the plugin. Refer to link:https://www.eclipse.org/aspectj/ for information and documentation about AspectJ
21
- itself.
20
+ within the plugin. Refer to the link:https://www.eclipse.org/aspectj/[AspectJ website] for information and documentation
21
+ about AspectJ itself.
22
22
23
23
### Plugin, AspectJ and Java version compatibility
24
24
25
- Each new version of AspectJ Maven Plugin by default uses the most recent AspectJ Compiler (AJC) version available at
26
- the release date. The plugin itself only requires Java 8, but depending on the AJC version you use, a more recent Java
27
- version might be necessary to run the build. For example, AspectJ 1.9.8+ requires a Java 11 runtime, AspectJ
28
- 1.9.21+ requires Java 17.
25
+ AspectJ Maven Plugin itself only requires Java 8 during build time and by default depends on the relatively old AspectJ
26
+ version 1.9.7, because it contains the last AspectJ compiler version capable of running on Java 8, even though it can
27
+ compile up to source/target Java 16.
28
+
29
+ Chances are, that you need support for more recent source/target versions, e.g. Java 17 or 21. Or maybe, you simply wish
30
+ to use the most recent AspectJ features and bugfixes. In that case, it is easy to change the AspectJ version used by
31
+ this plugin by simple configuration. That might, however, require you to also run the plugin on a JDK more recent than
32
+ 8. For example, AspectJ 1.9.8+ requires a Java 11 runtime, AspectJ 1.9.21+ requires Java 17.
29
33
30
34
Good news: All more recent AspectJ versions can still compile to lower source/target levels, i.e. your _compiled
31
35
programs_ still run on older Java versions, if you wish.
32
36
33
- If for some reason you also need to run your _build_ on an older Java version, you can downgrade the `aspectjtools`
34
- plugin dependency to an older version. Or the other way around, you can also upgrade to a newer `aspectjtools` version
35
- without upgrading the plugin. You have maximum flexibility, depending on your usage scenario. You only ever need to
37
+ So if you wish to upgrade to a newer (or downgrade to a lower) AspectJ version, simply override the default
38
+ `aspectjtools` plugin dependency. You have maximum flexibility, depending on your use case. You only ever need to
36
39
upgrade the plugin, if you need a new feature or bugfix of the plugin itself.
37
40
38
41
For more information see xref:usage.adoc#_upgrading_or_downgrading_aspectj[Upgrading or downgrading AspectJ] and
0 commit comments