On Fri, 2003-05-30 at 16:35, Sonnek, Ryan wrote:
> 
> Placing the root files in a subproject seems to be a pretty good idea.  Will
> the Reactor still perform as it should?  This is the project layout that
> you're suggesting right?
> 
> +MyProject
> |--+common subproject
>   |--project.xml (extends ../root subproject/project.xml)
>   |--maven.xml
> |--+ejb subproject
>   |--project.xml (extends ../root subproject/project.xml)
>   |--maven.xml
> |--+root subproject
>   |--project.xml (main project.xml defining dependencies, etc)
>   |--maven.xml
> 
> so, no files exist outside of a subproject?  Does this seem like a good
> solution or more of a hack?

I think it's a good solution, but I've been using it myself for quite a
while so I'm probably biased :-)

I've worked on projects that had a strictly hierarchical
project/sub-project layout, but found that eventually the hierarchy
would become inflexible. The usual rationale for a hierarchical project
layout is that the top-level project definition specifies some sort of
grouping of sub-projects from which a distribution can be built. This
kind of assumes that a single project (and its sub-projects) has a
single artifact that can be produced as the result of a build.

Instead I've adopted an approach where you have some projects that build
common artifacts (like jar files, for example) and other projects that
simply aggregate these artifacts with appropriate configuration files
for a particular distribution. By doing this you can easily accommodate
different target environments, such as the
development/test/qa/production distinctions that many shops use, or
client and server parts of a system.

Generally speaking, this works pretty well with maven - the reactor is
just as happy when you invoke it like this:

    <maven:reactor
      basedir="${basedir}/.."
      includes="*/project.xml"
      excludes="root/project.xml"
      goals="site:deploy"
      ignoreFailures="false"
    />

-Mark.


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

Reply via email to