-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix core export provider #764
Conversation
Since apache/maven#616, the default CoreExportProvider no longer uses the provided CoreExports, but instead tries (and fails) to discover them itself. This change fixes that by providing our own custom instance of CoreExportProvider. This allows core extension to contribute exported artifacts and exported packages again, like it used to do before the Maven 4.x upgrade.
The underlying reason why the default logic doesn't work is because the discovery method calls ClassRealm.loadResourcesFromImport, which does not handle maven-embedder has the same problem now. Really, |
I have resterted the ubuntu-18.04 CI job. Not sure why it has shown up as cancelled. |
@oehme thx for the detailed explanation. Would it be possible to add an IT to test this feature ? |
Yes, I'll add one |
@gnodet The test infrastructure assumes that every test case is a single project, but for my case I had to install the extension first before using it in the consuming build. I hacked around this by adding the project dir as an additional parameter, but I'd love suggestions for a more elegant solution. |
integration-tests/src/test/java/org/mvndaemon/mvnd/it/ExtensionWithApiTest.java
Outdated
Show resolved
Hide resolved
I have left a suggestion inline. |
28b7bdd
to
263387b
Compare
263387b
to
11cf2bb
Compare
@ppalaga this should be good to go :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let @gnodet re-review and merge.
Would it be possible to get an m2 for this? I'd love to run our extensions full CI build against this to make sure we work properly when 1.0 comes out. |
Yes, though I'd like to have a |
Here is a fix for GH Actions not publishing the PR's binaries #774 |
@oehme, BTW if you now send some dummy PR, it will publish the distribution zips for 3 (of 4, excl. Apple M1) supported platforms under Checks > Artifacts. You could perhaps use those to test on your side? |
Since apache/maven#616, the default CoreExportProvider no longer uses the provided CoreExports, but instead tries (and fails) to discover them itself.
This change fixes that by providing our own custom instance of CoreExportProvider. This allows core extension to contribute exported artifacts and exported packages again, like it used to do before the Maven 4.x upgrade.