-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for polyglot when in lib/ext (#319)
Originally polyglot worked when loaded via .mvn/extensions.xml but not when created custom distro (put in lib/ext). Reason was simple, as Maven core beans were not overridden when in "flat space", that causes lib/ext, unlike mvn extensions. To make it work from lib/ext (when components are placed into maven core), following is needed: * DefaultProjectBuilder is "default" bean, hence we need to override it (using priority) * DefaultModelProcessor is trickier, it uses custom name (despite class name being Default) and uses Typed annotation. Essentially same thing, using priority makes polyglot component "prevail" as otherwise they are same ranked (non-default custom named components). * finally, do not extend component but use JSR330 capability to inject "exact" bean and just compose (possible as all used methods are public on replaced bean as well).
- Loading branch information
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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