Hello, Couple of things still open here 1) Is there a way to query the executed project form the MavenEmbedder? Or can I get it with the @executedProject tag? 2) If the plugin executed by the MavenEmbedder produced an artifact, can it be resolved somehow from somewhere.
br, Mikko --- www.codeboi.com Mikko wrote: > > Hi, > > Still a little bit in the dark here, is there a way to query the executed > project form the MavenEmbedder? Or can I get it with the @executedProject > tag? > > br, > Mikko > --- > www.codeboi.com > > > Mikko wrote: >> >> Hi, >> >> Thanks for this, how could I now tell what is the output artifact(s) >> produced by the project the embedder just executed? Am I able to query it >> some how from the embedder or do artifacts get attached to the original >> project? >> >> regards, >> Mikko >> >> >> Olivier Catteau wrote: >>> >>> Hi, >>> >>> I think there is no way to execute another plugin from your own plugin >>> by >>> using @execute. But you would have to use the execute method of the >>> MavenEmbedder class in your own mojo. It must be something like this : >>> >>> >>> /** >>> * The reactor projects in a multi-module build. >>> * >>> * @parameter expression="${reactorProjects}" >>> * @required >>> * @readonly >>> */ >>> private List reactorProjects; >>> ... >>> >>> MavenEmbedder embedder = new MavenEmbedder(); >>> embedder.setClassLoader(Thread.currentThread().getContextClassLoader()); >>> embedder.start(); >>> embedder.execute(reactorProjects, >>> Collections.singletonList("assembly:assembly"), >>> new DefaultEventMonitor(new PlexusLoggerAdapter( >>> embedder.getLogger())), >>> new ConsoleDownloadMonitor(), >>> null, >>> ((MavenProject)projects.get(0)) .getBasedir()); >>> >>> >>> I hope, it helps you. >>> Olivier >>> >>> >>> >>> 2006/9/19, Mikko <[EMAIL PROTECTED]>: >>>> >>>> >>>> Hi, >>>> >>>> Is there a way to run another plugin goal from my own plugin by using >>>> the >>>> @execute goal="" tag in my plugin. I would like to be able to run the >>>> assembly:assembly goal from my plugin. When I use @execute >>>> goal="assembly:assembly", the build process says that it can not be >>>> found. >>>> >>>> br, >>>> Mikko >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Executin-a-plugin-goal-from-another-plugin-tf2297411.html#a6383118 >>>> Sent from the Maven - Users mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Executin-a-plugin-goal-from-another-plugin-tf2297411.html#a6775019 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]