No, not possible to inject mojo parameters into plain components.
With recent versions of Maven, it is possible to inject MavenSession,
MavenProject and MojoExecution into components. Not example what you are
asking, but maybe close enough. Be careful not to inject those into
singleton components
Hi there,
just wondering whether it is possible to configure a component shared between
different Mojos using DI instead of using inheritance over composition? Any
ideas?
@Mojo(name = mojo1)
class Mojo1
{
@Component(name = bla)
}
@Mojo(name = mojo2)
class Mojo2
{
@Component(name = bla)