Fix weaving of already compiled classes when source code is absent#240
Closed
slachiewicz with Copilot wants to merge 2 commits into
Closed
Fix weaving of already compiled classes when source code is absent#240slachiewicz with Copilot wants to merge 2 commits into
slachiewicz with Copilot wants to merge 2 commits into
Conversation
Modified hasSourcesToCompile() to also check for weaveDirectories and weaveDependencies. When these are configured, the plugin will proceed with weaving even if no source files are present. Added integration test WeaveDirectoriesNoSources to verify the fix. Co-authored-by: slachiewicz <6705942+slachiewicz@users.noreply.github.com>
Member
|
@copilot continue with fix |
Author
Fix is complete! All tasks have been finished: ✅ Code review completed - no actionable issues found (the "Azpect" naming follows existing test conventions) The fix allows weaving to proceed when |
Copilot
AI
changed the title
[WIP] Fix weaving of already compiled classes when source code is absent
Fix weaving of already compiled classes when source code is absent
Oct 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix weaving of already compiled classes when there is no source code
Fixes #217
Problem
The AspectJ Maven Plugin would skip weaving entirely when no source files were provided via
<sources/>, even whenweaveDirectoriesorweaveDependencieswere configured. This prevented users from:maven-compiler-pluginSolution
Modified the
hasSourcesToCompile()method inAbstractAjcCompiler.javato check for the presence ofweaveDirectoriesorweaveDependenciesin addition to source files. When these are configured, the plugin will proceed with weaving even if no source files are present.Changes Made
hasWeavableContent()helper method that returnstrueif eitherweaveDirectoriesorweaveDependenciesare configuredWeaveDirectoriesNoSourcestest to verify the plugin executes correctly when<sources/>is empty butweaveDirectoriesis configuredTesting
The fix is minimal and focused, allowing the plugin to proceed with weaving when weavable content is configured, without altering any other functionality.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.