Skip to content
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

Maven plugin for Helidon Service Inject #9461

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

tomas-langer
Copy link
Member

Maven plugin that:

  • generates application binding class (bindings for injection points)
  • generates main class (registration of descriptor instances to InjectConfig that disables bootstrap service discovery)
  • updated tests

To see what happens, build the project with -Ptests, and check directory:
service/tests/inject/toolbox/target/generated-sources/annotations/io/helidon/service/tests/inject/toolbox

See ApplicationMain and Injection__Binding classes.

@tomas-langer tomas-langer added 4.x Version 4.x declarative Helidon Declarative labels Nov 4, 2024
@tomas-langer tomas-langer added this to the 4.2.0 milestone Nov 4, 2024
@tomas-langer tomas-langer self-assigned this Nov 4, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 4, 2024
@tomas-langer tomas-langer force-pushed the 9158-inject-maven-plugin branch from 4781036 to aaf4d5f Compare November 4, 2024 17:15
service/inject/maven-plugin/pom.xml Outdated Show resolved Hide resolved
bom/pom.xml Outdated Show resolved Hide resolved
service/inject/maven-plugin/README.md Outdated Show resolved Hide resolved
service/inject/maven-plugin/README.md Outdated Show resolved Hide resolved
service/inject/maven-plugin/pom.xml Outdated Show resolved Hide resolved
service/inject/maven-plugin/pom.xml Outdated Show resolved Hide resolved
service/inject/maven-plugin/pom.xml Outdated Show resolved Hide resolved
service/inject/maven-plugin/pom.xml Outdated Show resolved Hide resolved
service/inject/maven-plugin/pom.xml Outdated Show resolved Hide resolved
danielkec
danielkec previously approved these changes Nov 27, 2024
Moved version management for maven plugin to project root pom, moved plugin configuration there as well
A fix in `AptTypeInfoFactory` where a NPE was possible.
Switch hint log level to trace in maven plugin
Removed bad info log, added useful info log to maven plugin
Cleaned up dependencies.
Support for registry in builder.
…ration is not present.

Added a test to validate it.
…ay be a service that requires a dependency, but itself is not required by any injection point.
…rs even for a single instance, as any may return an empty optional (if appropriate supplier type), and we would not yield an instance, even when we should.

As a result the method "explodeFilterAndSort" was going through all service manager and collected all instances - which resulted in errors if a provider with lower weight was not capable of creating an intance because of unsatisfied dependency.
@tomas-langer tomas-langer force-pushed the 9158-inject-maven-plugin branch from 5f8f56c to ef78142 Compare December 17, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x declarative Helidon Declarative must-have OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants