I forgot to mention that I am trying to get this working in Maven 2

-----Original Message-----
From: Allison, Bob [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 06, 2005 23:53
To: dev@maven.apache.org
Subject: Question About Reactor Operation


(I was going to try to find the reactor code in my SVN tree before
asking this, but can't seem to find it :-(  )

General Info:  Our Maven 1.0.2 development tree consists of three
directory levels:  The top level has global goals and properties, the
mid-level directories are artifact-specific (portlet, webapp, library,
...) and contains goals and properties related to the particular type of
artifact being produced (this includes alias-type goals which allow the
developer to type "maven install" in any project and get the right goal
executed), the bottom-layer directories contain artifact-generating
projects.

I was wondering if there has been any thought towards being able to
optionally filter the projects that the reactor is going to run.  I have
three use cases that I have working to various degrees in Maven 1.0.2:

Use Case 1:  There are a number of project directories which do not
produce artifacts (the top level and all mid-level directories, for
example) as well as a few projects which are samples and should not be
included in the production deliverables.

Use Case 2:  When generating documentation, I need to include the top
level and mid-level directories in order to get the lower-level projects
documented.  I also want some of the samples to be included in the
product documentation.

Use Case 3:  Because of some constraints in the portal server we are
using, we need to combine a few of the portlets into a single web
application.  We would like to keep the portlets in individual projects
and be able to deploy the portlet either by itself or as part of a
combined web application.

In case 2, I filter the list of projects by replacing the
"multiproject:projects-init" goal with one that has all of the original
code plus some additional code to remove projects that do not have one
of the use case properties set to true (case 1 is
"productname.production", case 2 is "productname.document", case 3 is
"productname.one-app").  For the other two cases, I wrote my own search
goal and provide the reactor with a list of projects.

It would be really nice to be able to create a plugin which can contain
a method that the reactor calls after finding the project but before
starting to work on it; the method could return a true/false to indicate
whether or not the project passes the filter.  To make this transparent
to plugins that don't need this functionality, we would need a concrete
implementation of the method in AbstractMojo which always returns true
(unfortunately, this doesn't help those which choose to implement the
interface rather than extend the abstract base class).

I have not yet been able to spend the required amount of time to start
building a plugin, so I do not understand how things work well enough to
know if this is even a reasonable request.  If this is not feasible, I
understand and will do my best to rearrange how we are doing things (or
stick with 1.0.2 for a while longer).

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


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

Reply via email to