Skip to content

Maintenance(v2): Update aspectj dependency to current version #1401

Closed
@roamingthings

Description

@roamingthings

Summary

Update the aspectj dependency (currently 1.9.20) for Java 17 compativility.

Why is this needed?

We have a project with multiple Gradle modules and are using the io.freefair.aspectj.post-compile-weaving plugin as described in the documentation. This setup will pull in version 1.9.7 of the aspectjrt dependency that is referenced by the Powertools library and overwrite/ignore the version that is usually referenced by the aspectjrt plugin. Unfortunately version 1.9.7 is not compatible with Java 17 leading to an error when building the project:

[error] target level should be in '1.1'...'1.8','9'...'16' (or '5.0'..'16.0') or cldc1.1: 17

This issue has been addressed by the AspectJ project some times ago.

To use Java 17 we have to manually add aspectjrt as dependency in the current version. This means additional maintenance since we have to manually update this dependency according to the version used by the plugin.

Which area does this relate to?

No response

Solution

Either update aspectjrt to the current version or no longer propagate aspectj as a transient dependency. In the latter case I'm not sure if projects would still compile, when you don't use the plugin in you project. So 'removing' the dependency would make more sense in the next major release of the Powertools.

I would be happy to provide a PR, also it would require some testing with Maven, which I don't use that often.

Acknowledgment

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Coming soon

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions