You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mathew Kuppe <su...@hotmail.com> on 2005/12/12 12:18:10 UTC

How to organize of a set of interrelated projects for Maven 2.0

I am trying to create a set of new projects that are related as modules of a 
larger application however each module should produce its own independent 
artefact. The individual modules can be organized into different 
architectural layers and therefore could be considered part of a layer group 
of modules where layer groups have clearly defined dependencies to other 
layer groups. It is important that each module can be built individually and 
as part of an overall build of all modules.

I have read quite some material regarding Maven as a good tool for managing 
the build process for multiple related projects. I particularly like the way 
that Maven emphasises a consistent project structure across all projects.

I would appreciate suggestions regarding the following topics;

1.	How should I go about structuring my projects for use with Maven 2.0?
		- Should projects be in any hierarchy?
2.	How should I create each of the projects?
		- Where is the syntax defined for the action archetype:create?
- How should I use the groupId property?
- Is it important for the grouping of the projects using groupId?
- What does group mean in this context?
3.	How should I configure/enhance an archetype for standardizing the build 
for each of my individual module projects?
- For example I would like to automatically produce eclipse project files 
for each module
- I would also like to be able to run the Maven builds from within eclipse
4.	How should I configure/use a repository for my build artefacts for use 
within a development team of 10?
- What is a typical lifecycle of an artefact in the context of a development 
team where there is a continuous build, nightly build and builds by each 
developer being conducted?
- Where lies the responsibility for releasing the artefact to a public 
(internal) repository

I think perhaps what would be useful is a set of reference projects that 
would demonstrate how different project scenarios are addressed for use with 
Maven using maven best practices. Does anyone have such a list of 
references?

Thanks for your assistance in advance.

Mathew Kuppe

_________________________________________________________________
Over 100,000 new beginnings at Australia's #1 job site.  
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2F&_t=752315885&_r=HM_EndText&_m=EXT


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


Re: How to organize of a set of interrelated projects for Maven 2.0

Posted by Nik Gonzalez <ng...@exist.com>.
Hi Mathew,

Please see my inline comments below... thanks!

Nik
Mathew Kuppe wrote:

> I am trying to create a set of new projects that are related as 
> modules of a larger application however each module should produce its 
> own independent artefact. The individual modules can be organized into 
> different architectural layers and therefore could be considered part 
> of a layer group of modules where layer groups have clearly defined 
> dependencies to other layer groups. It is important that each module 
> can be built individually and as part of an overall build of all modules.
>
> I have read quite some material regarding Maven as a good tool for 
> managing the build process for multiple related projects. I 
> particularly like the way that Maven emphasises a consistent project 
> structure across all projects.
>
> I would appreciate suggestions regarding the following topics;
>
> 1.    How should I go about structuring my projects for use with Maven 
> 2.0?
>         - Should projects be in any hierarchy?

It is good practice to arrange your projects in a hierarchy (i.e. child 
projects directly placed under the parent's base directory).   There are 
a number of projects that use maven2.   I suggest looking at other 
existing projects so you can get ideas on how to structure your own 
multimodule projects (http://maven.apache.org/powered-by-m2.html).

> 2.    How should I create each of the projects?
>         - Where is the syntax defined for the action archetype:create?

mvn archetype:create -DarchetypeGroupId=<archetype-groupId> -DarchetypeArtifactId=<archetype-artifactId> -DarchetypeVersion=<archetype-version> -DgroupId=<my.groupid> -DartifactId=<my-artifactId>
for more on archetypes, visit http://maven.apache.org/guides/mini/guide-creating-archetypes.html.

> - How should I use the groupId property?

http://maven.apache.org/guides/mini/guide-naming-conventions.html

> - Is it important for the grouping of the projects using groupId?
> - What does group mean in this context?
> 3.    How should I configure/enhance an archetype for standardizing 
> the build for each of my individual module projects?
> - For example I would like to automatically produce eclipse project 
> files for each module
> - I would also like to be able to run the Maven builds from within eclipse

You can use the eclipse plugin to create eclipse project files for your 
project.  From the command line, go to the base directory of your 
project and call mvn eclipse:eclipse.  For more info: 
http://maven.apache.org/guides/mini/guide-ide-eclipse.html.

> 4.    How should I configure/use a repository for my build artefacts 
> for use within a development team of 10?
> - What is a typical lifecycle of an artefact in the context of a 
> development team where there is a continuous build, nightly build and 
> builds by each developer being conducted?
> - Where lies the responsibility for releasing the artefact to a public 
> (internal) repository
>
> I think perhaps what would be useful is a set of reference projects 
> that would demonstrate how different project scenarios are addressed 
> for use with Maven using maven best practices. Does anyone have such a 
> list of references?
>
> Thanks for your assistance in advance.
>
> Mathew Kuppe
>
> _________________________________________________________________
> Over 100,000 new beginnings at Australia's #1 job site.  
> http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2F&_t=752315885&_r=HM_EndText&_m=EXT 
>
>
>
> ---------------------------------------------------------------------
> 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