To be fair, my question is based on an implementation I have in mind for a
more abstract problem. If you will indulge me a moment I'll describe that
issue and maybe you will tell me my implementation is all wrong...

Consider the hypothetical project:
  myProject
  myProject/appserver
  myProject/database
  myProject/webapp

Let's assume I have created a plugin (org.tragus:appserver-plugin) which I
can specify in myProject/appserver/pom.xml. Further assume that if I do that
I then have a goal (org.tragus:appserver-plugin:configure-appserver) which
will configure my running appserver in some way (e.g. -- create connection
pools and datasources and such).

Similarly, pretend that I have a plugin (org.tragus:database-plugin) with a
goal (...:update-schema) which will bring my live schema up-to-date with
whatever recent changes I've made. This would, of course, be used by
myProject/database.

Finally, myProject/webapp may use org.tragus:appserver-plugin:deploy-war to
deploy a war to the running appserver.

These are all hypothetical plugins -- I know there exist some which already
do some of these things.

My question is this:
How can I invoke mvn at 'myProject' such that it will recurse into each
subproject and invoke the appropriate "update my live environment" goal for
each one? That is, how can I invoke mvn at the top-level and have it fire
org.tragus:appserver-plugin:configure-appserver within appserver,
org.tragus:database-plugin:update-schema within database and
org.tragus:appserver-plugin:deploy-war within webapp?

FWIW I've been using maven 1 since the 0.4 days and long ago solved this
with a pile of jelly-script there. I just can't seem to wrap my head around
the m2 way of solving this.

Now to the question in my subject line... It seems to me that if there was a
maven-plugin-invoker-plugin which would invoke a property-specified plugin
name my problem would be solved. I would simply set the
plugin-to-execute-property appropriately in each subproject's pom.xml and
then fire maven-plugin-invoker-plugin from the top level. Trouble is... I
cannot find a maven-plugin-invoker-plugin :-(

So, can anyone comment on my problem(s)? Am I missing something obvious and
making the whole thing harder than it really is?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to