maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Le Du <leduy...@yahoo.com>
Subject RE: [m2] Questions About Aggregating Documentation for Multiple Projects
Date Tue, 02 Aug 2005 08:11:00 GMT
Hi Bob,

Since I've been struggling with the same kind of issue, I can give you some
hints, but maybe the Maven team will give some precisions :)


1) To define correct inheritance between two projects P (parent) and M
(module), you need two things :
  * in M POM, add a <parent> pointing to P
  * in P POM <modules>, add a <module> pointing yo M
(see http://maven.apache.org/maven2/maven-model/maven.html for details)

In your case, you would have :
  * P = top-level / M = mid-level
then :
  * P = mid-level / M = individual
... just link correctly

Then, if you launch "m2 install" from your top-level project, it will :
  * install your top-level POM (no matter whether it produces artifacts or not)
  * parse the mid-level POMs and install them (no matter blah blah blah...)
  * parse the individual POMs, install them, and install the artifacts


2) An issue is in progress, see http://jira.codehaus.org/browse/MNG-661

Then you will just have to launch "m2 site:site" on your top-level project, it
will produce all the documentation tree (which it already does), with the links
between parent and modules.


3) Seems correct to me. In my case, I have only a two-level structure, but this
should work with three or more...


Hope this helps a bit,

Yann


--- "Allison, Bob" <robert.allison@qwest.com> a écrit :

> I am looking into Maven 2 to try to figure out how to reconfigure our
> current build environment when we upgrade from v1.0.2.  Our software
> product consists of a number of web applications, portlets, EJBs, and
> other jar files.  Out current build tree is set up as follows:
> 
> -- The top directory contains a project.xml file which contains
> product-wide information such as CVS location and a maven.xml file with
> a couple goals described below
> 
> -- A number of mid-level directories are in the top directory, one for
> each type of artifact (jar, ejb, web application, ...).  Each of these
> directories has a project.xml file which inherits from the top level and
> a maven.xml file which defines standardized goals which detail the steps
> to work with the artifact (for example, the web application's "install"
> goal attains goal "war:install" while the jar's "install" goal attains
> goal "jar:install") and any goals which are unique to the artifact type
> (for example, the web application has "load" and "unload" goals which
> load and unload the application from the server).
> 
> -- One or more individual project directories are in each mid-level
> directory.  Each of these projects is an independent project which
> inherits from the mid-level project.
> 
> 
> The two goals mentioned above in the top level are designed to build a
> complete documentation site and build a set of deployment artifacts.  I
> am mostly concerned right now with the documentation.  In the current
> setup, the documentation for the top level project contains navigation
> entries for each mid-level project; each mid-level project's
> documentation contains navigation entries for the individual projects
> which create artifacts.  The top-level documentation contains
> product-wide development information such as how to install tools such
> as Maven.  Each of the mid-level project's documentation contains
> information such as the goals specific to the type of artifact.
> 
> 
> My questions:
> 
> 1) Since the top-level and mid-level projects do not create any
> artifacts, their POMs are not installed into the local repository.  How
> do I define the inheritance for the individual projects so that they
> inherit the proper information from the two upper levels?
> 
> 2) How do I get the generated site to have the nested navigation
> (top-level has links to mid-level which has links to individual
> projects)?  Alternatively, can I have the top level have links directly
> to the mid-level documentation as well as the individual projects?
> 
> 3) For the purposes of inheritance and building documentation, should
> the build tree be flattened out to make the individual projects
> subdirectories of the top level or is it better to keep things the way
> they are at present?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 



	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

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


Mime
View raw message