On 15 March 2010 06:46, Jörg Schaible <joerg.schai...@gmx.de> wrote:
> Phil Housley wrote at Sonntag, 14. März 2010 22:41:
>
>> On 11 March 2010 16:49, Phil Housley <undeconstruc...@gmail.com> wrote:
>>> Hi,
>>>
>>> I am (yet again) trying to subvert Maven with a custom plugin and
>>> finding that the special cases in the core are causing problems.  What
>>> I'm aiming for is the ability to have a project which combines a
>>> couple of modules as a single "release", and then deploys their
>>> artifacts together, along with some metafiles.  The modules also have
>>> custom packaging types, and the deployment means a custom process over
>>> some webservices.
>>>
>>> The issue is that only pom package projects are allowed to have
>>> modules, and the pom lifecycle includes the standard install and
>>> deploy plugin, which will fail as there is no distributionManagement
>>> section.  Is it possible to either completely inhibit the plugins in
>>> the pom lifecycle, or to create another packaging type which allows
>>> multi-module?
>>
>> To partly answer my own question, it seems that the checks for multi
>> module and parent allowed are coded as simply if
>> ("pom".equals(project.getPackaging()), so it doesn't look like I can
>> use another packaging type there.  I'm still looking into a way to get
>> the install and deploy plugins out of the pom lifecycle, but without
>> too much hope.  I guess I will have to resort to specifying a specific
>> goal and ignoring the lifecycle altogether...
>
> Why do you want this deployment happening at the parent? Just create another
> modules with your custom packaging and declare all the other modules as
> dependencies.

It's for convenience of the users mostly.  Hopefully people will be
able to create these projects from an archetype, and then run deploy
from the root to push several modules together as a release.  Using a
separate meta module is extra work for the users, but is the plan I'm
currently working at.

The main problem is that if the modules are not in the reactor when
"deploy" is run, I have to add an install phase to be able to pick
them up (which doesn't make much sense for the custom packaging I'm
using); while to get them into reactor, I would need to run "mvn
deploy" from the root, which would invoke the standard deploy plugin
on the root pom.

I'm thinking currently of a goal "custom-stuff:deploy" which can be
invoked on the root, will force a "package" phase in each module, and
then when invoked (automatically) on each module will ignore all those
without some special packaging type.  This adds a requirement for a
new meta project with dependencies on the others, but that isn't too
much overhead to my mind - will have to see how it goes down with
others.

Thanks for your input.

> - Jörg
>

-- 
Phil Housley

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to