Re: Passing information between goals

2013-07-24 Thread Francesco Mari
Thank you all for the useful isnights. 2013/7/24 Stephen Connolly > getPluginContext() is the one you want. Use that to stash your info. > > > On 24 July 2013 15:15, Francesco Mari wrote: > > > Thank you for the link, but I don't need to coordinate multiple projects > in > > the same session.

Re: Passing information between goals

2013-07-24 Thread Stephen Connolly
getPluginContext() is the one you want. Use that to stash your info. On 24 July 2013 15:15, Francesco Mari wrote: > Thank you for the link, but I don't need to coordinate multiple projects in > the same session. My use case is only focused on one project. > > What about serializing the informat

Re: Passing information between goals

2013-07-24 Thread Francesco Mari
Thank you for the link, but I don't need to coordinate multiple projects in the same session. My use case is only focused on one project. What about serializing the information somewhere in the ${project.build.directory} folder? Are there any issues I should aware of if I implement this solution?

Re: Passing information between goals

2013-07-24 Thread Stephen Connolly
Ahh yes... that's the one... I spent 3-5 min searching for it. getPluginContext() is the map you want (unless you want to span modules... even then I think you can cheat slightly by doing some funky stuff) On 24 July 2013 14:20, Baptiste MATHUS wrote: > Hi, > > I remember doing that for build-

Re: Passing information between goals

2013-07-24 Thread Fred Cooke
2013 15:20:33 +0200 > > Subject: Re: Passing information between goals > > From: m...@batmat.net > > To: dev@maven.apache.org > > > > Hi, > > > > I remember doing that for build-helper. It was for many executions of the > > same mojo though, not sur

RE: Passing information between goals

2013-07-24 Thread Martin Gainty
can anyone reach the URL? Baptiste is it possible to repost comments for build-helper to pastebin? http://pastebin.com/ > Date: Wed, 24 Jul 2013 15:20:33 +0200 > Subject: Re: Passing information between goals > From: m...@batmat.net > To: dev@maven.apache.org > > Hi, >

Re: Passing information between goals

2013-07-24 Thread Baptiste MATHUS
Hi, I remember doing that for build-helper. It was for many executions of the same mojo though, not sure how it behaves with different mojos. See http://mojo.10943.n7.nabble.com/build-helper-m-p-thread-safety-issue-td39561.htmland the ReserveListenerPortMojo My 2 cents. Cheers Le 24 juil. 2013 1

Re: Passing information between goals

2013-07-24 Thread Stephen Connolly
This is generally a tad tricky. 1. Because of class unloading it may not be possible to use the Hack-type solution of stashing the data in a Class level static field. Though that solution will work as long as the field uses a collection type that allows for GC when the MavenProject that it is cach

Passing information between goals

2013-07-24 Thread Francesco Mari
Hi, I wrote some MOJOs which use common data. This data depends on the structure of the project and can't be changed at runtime. I would like to compute this information at the beginiing of the build process, and re-use it in each related goal. Ideally, the first goal should compute the data, and