这是indexloc提供的服务,不要输入任何密码
Skip to content

Weaving of already compiled classes is skipped when there is no source code #217

@plcarmel-aylo

Description

@plcarmel-aylo

The example given here doesn't work:
https://dev-aspectj.github.io/aspectj-maven-plugin/examples/weaveDirectories.html

This is because already compiled classes will be overridden with the configuration they give.

In my use case, I need to compile classes, apply modifications to their bytecode using another plugin entirely, and then weave them. My modifications are lost because they are overridden with the weaving that comes from the source code.

The example here seems to offer a solution:
https://dev-aspectj.github.io/aspectj-maven-plugin/examples/includeExclude.html

I tried using an empty source tag, <sources/>, but then the weaving is skipped entirely.

The only work-around that works for me is to exclude part of the source code, using <excludes>...</excludes> for example, while leaving at least one class to avoid the weaving being skipped entirely.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions