-
Notifications
You must be signed in to change notification settings - Fork 93
Fix #220 - multimodule-module-with-parent there is a missing direct-dependency #329
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 #220 - multimodule-module-with-parent there is a missing direct-dependency #329
Conversation
multimodule-module-with-parent
to provide FlattenDependencyMode to the DirectDependenciesInheritanceModelMerger to decide if the parent dependencies should be merged into the child.
flattenDependencyMode all
flattenDependencyMode all
add class documentation to the issue and the need for the class and configuration hint
…to accomplish the job
… on top of master
|
|
||
| @Inject | ||
| private InheritanceAssembler inheritanceAssembler; | ||
| private DirectDependenciesInheritanceAssembler inheritanceAssembler; |
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.
Maybe using a @Named annotation instead of the implementation class to choose which implementation is to be injected ?
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 get a NullPointer when using @Named instead of @Inject and using InheritanceAssembler
And using InheritanceAssembler with @Inject retrieves the DefaultImplementation
Cannot invoke "org.apache.maven.model.inheritance.InheritanceAssembler.assembleModelInheritance(org.apache.maven.model.Model, org.apache.maven.model.Model, org.apache.maven.model.building.ModelBuildingRequest, org.apache.maven.model.building.ModelProblemCollector)" because "this.inheritanceAssembler" is null
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.
You need to add it on both the injection point and the DirectDependenciesInheritanceAssembler.
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.
That DirectDependenciesInheritanceAssembler has @Named annotation... maybe the annotations are from wrong package?
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.
It works with @Component( role = InheritanceAssembler.class ) on the DirectDependenciesInheritanceAssembler and with @Inject on the InheritanceAssembler field.
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 wanted to get rid of the DirectDependenciesInheritanceAssembler and use the interface instead, but the implementation is actually used, so that can't be done.
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.
In the FlattenMojo there is a direct usage of the implementation, yes.
… artifact is faster than using the sisu-maven-plugin
Hi @slawekjaranowski,
I created a new branch for issue #220 starting on top master and cherry-picked and adjusted.
Maybe this branch is better for a pull request.
I did not want to force push the bugfix/220 branch.
Best Regards,
Kemal