You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brian Cochran <co...@gmail.com> on 2005/02/02 19:40:21 UTC

Reactor Tag Idea

Forgive me if someone has already discussed this but I thought it was
important to volunteer an idea.


Suppose you set up projects using a flat, not hierarchal directory
structure. In this case I want to rely on the project.xml dependency
structures only to designate parent and child projects. We use this
structure to obtain an m to n mapping between "deliverable projects
(zips, ears, wars, etc.) and component projects (jars, wars, etc.)
thus encouraging more project Independence.

Here is an example of how we would set up a couple different J2EE projects.

projects/
           /core-jar-project
           /ejb-jar project
           /war-one-project
           /ear-one-project
           /war-two-project
           /database-one-project (this may produce a zip file that can
be extracted and run on  a database)
           /database-two-project

           /deployable-one-project (maybe this is a zip of the ear-one
and database-one)
           /deployable-two-project

The two deliverable projects "one" and "two" above are relying on a
core set of components, but are not separated by folder structure. The
hierarchy is described completely in the project.xml's dependencies,
not the folder hierarchy. This of course also means that each
developer can organize the projects in his or her development
environment however he feels necessary. Adding a new project is also
easier. For example, creating a project "three" would not involve
duplicating the hierarchy of the individual components.

Of course the problem arises when one wants to do a multi project
build for a specific deliverable. In the above example, this is very
difficult as doing a regular multi project reactor based build will
build project "one" and project "two" even though I am only working on
project "one".

To address this issue, we built a new tag based on the reactor tag
called reconcile. This tag behaves very similarly to the reactor tag,
but instead of finding the relationships between all projects. It only
searches dependent projects from the current project. For example, I
execute the following command to build all components (that I have
checked out) relating to project one.

projects/deployable-one-project> maven reconcile:install 

This would cause all projects in the dependency chain of project one
to build, but not project two.



If anyone is interested in this, please let me know.

Thanks,
Brian

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


Re: Reactor Tag Idea

Posted by Brett Porter <br...@gmail.com>.
Brian,

Sorry for not responding but usually long mails like this require some
thought before responding. Posting it for a 3rd time won't help :)

- Brett


On Wed, 2 Feb 2005 13:40:21 -0500, Brian Cochran
<co...@gmail.com> wrote:
> Forgive me if someone has already discussed this but I thought it was
> important to volunteer an idea.
> 
> Suppose you set up projects using a flat, not hierarchal directory
> structure. In this case I want to rely on the project.xml dependency
> structures only to designate parent and child projects. We use this
> structure to obtain an m to n mapping between "deliverable projects
> (zips, ears, wars, etc.) and component projects (jars, wars, etc.)
> thus encouraging more project Independence.
> 
> Here is an example of how we would set up a couple different J2EE projects.
> 
> projects/
>            /core-jar-project
>            /ejb-jar project
>            /war-one-project
>            /ear-one-project
>            /war-two-project
>            /database-one-project (this may produce a zip file that can
> be extracted and run on  a database)
>            /database-two-project
> 
>            /deployable-one-project (maybe this is a zip of the ear-one
> and database-one)
>            /deployable-two-project
> 
> The two deliverable projects "one" and "two" above are relying on a
> core set of components, but are not separated by folder structure. The
> hierarchy is described completely in the project.xml's dependencies,
> not the folder hierarchy. This of course also means that each
> developer can organize the projects in his or her development
> environment however he feels necessary. Adding a new project is also
> easier. For example, creating a project "three" would not involve
> duplicating the hierarchy of the individual components.
> 
> Of course the problem arises when one wants to do a multi project
> build for a specific deliverable. In the above example, this is very
> difficult as doing a regular multi project reactor based build will
> build project "one" and project "two" even though I am only working on
> project "one".
> 
> To address this issue, we built a new tag based on the reactor tag
> called reconcile. This tag behaves very similarly to the reactor tag,
> but instead of finding the relationships between all projects. It only
> searches dependent projects from the current project. For example, I
> execute the following command to build all components (that I have
> checked out) relating to project one.
> 
> projects/deployable-one-project> maven reconcile:install
> 
> This would cause all projects in the dependency chain of project one
> to build, but not project two.
> 
> If anyone is interested in this, please let me know.
> 
> Thanks,
> Brian
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

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