One other aspect, why two separate plugins? As they seem to be tightly coupled I would argue for one plugin with two goals. It makes more sense having this tight coupling between two goals than between two plugins. You should then have a look at some plugins that does similar things (one goal preparing something for another goal). I *think* it is often solved by storing it in a file as Benson points out, but I also *think* I've seen plugins putting info in system properties for the next goal to consume. One plugin doing the latter is Mojo's RPM plugin. One plugin doing the former is the Maven Release plugin (prepare and perform goals).
/Anders On Sun, Dec 30, 2012 at 3:33 AM, Benson Margulies <[email protected]>wrote: > On Sat, Dec 29, 2012 at 8:25 PM, Henrik Eriksson > <[email protected]> wrote: > > I'm writing a plugin for bridging propertiary software with maven. So > > making a portable project is not an option here. The project will only be > > used in our own development. So the problem I have. I have one plugin > > setting up a property for the other plugin. They are in the same pom. And > > looks something like this. > > > > <build> > > ... > > <plugin> > > <groupId>com.acme</groupId> > > <artifactId>myplugin-maven-plugin<artifactId> > > <version>1.0</version> > > ... > > <phase>package</phase> > > <plugin> > > <plugin> > > <groupId>com.somecomp</groupId> > > <artifactId>somcomp-maven-plugin<artifactId> > > <version>1.1</version> > > <executions> > > <execution> > > <phase>package</phase> > > <configuration> > > <importantConfiguration>this is the one I want to set with > > myplugin-maven-plugin</importantConfiguration> > > ... > > </configration> > > ... > > </execution> > > </executions> > > </plugin> > > ... > > </build> > > > > I've tried with setting > > <importantConfiguration>${someproperty}</importantConfiguration> > > I've tried various things but no success. Perhaps setting it before the > > project is being built may solve setting it but makes the project alot > more > > complex. The thing is that somcomp-maven-plugin does a lot of wierd > stuff, > > ie not mavenish but I believe its trying to isolate things from the > > "normal" maven flow. Though our deployment/development environment has a > > lot of legacy and presents various issues by not doing this. > > > > TIA > > I can't make sense of this. What is happening? What don't you like > about what's happening? What do you want to have happen instead? Is > the bottom line that you want some information to flow from plugin (1) > to plugin (2)? In that case, you might have to write out a file in > (1), attach it to the build, and consume it in (2). > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
