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 (or components injected into singletons).
-- Regards, Igor On Tue, Sep 1, 2015, at 05:44 PM, Karen Isaakyan wrote: > 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) > Component comp; > } > > @Component > class Component > { > @Parameter(name = param1) > String param1 > } > > Regards, KI > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org