Skip to content

Include test dependency in Mojo classpath#135

Merged
RadikalJin merged 2 commits intoalfasoftware:mainfrom
therealluigi-gh:issue-134-astra-maven-plugin-classloader-does-not-include-test-dependencies
Apr 2, 2025
Merged

Include test dependency in Mojo classpath#135
RadikalJin merged 2 commits intoalfasoftware:mainfrom
therealluigi-gh:issue-134-astra-maven-plugin-classloader-does-not-include-test-dependencies

Conversation

@therealluigi-gh
Copy link
Copy Markdown

Maven apparently only passes the source classpath entries from the module a plugin is operating on to the plugin classloader.
These changes ensure that we augment the classloader used by the astra-maven-plugin with the test dependencies of the module it is operating on. They also ensure that we also augment AstraCore with the same entries.

This has been tested using the plug-in to apply a refactoring which references types in test-scoped dependencies. Without the changes in this PR astra-maven-plugin fails with the error reported in this issue. Augmenting AstraCore classpath is also required otherwise AST may not be able to resolve bindings to types in test-scoped dependencies

Luigi Iannone added 2 commits April 2, 2025 11:35
@RadikalJin RadikalJin merged commit cf6c9eb into alfasoftware:main Apr 2, 2025
1 check passed
@RadikalJin
Copy link
Copy Markdown
Member

Merged this now - thank you for your contribution to Astra, @therealluigi-gh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants