You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Näcker, Stephan (UIT)" <St...@union-investment.de> on 2010/04/23 09:32:40 UTC
Maven project organization
Hey,
I 'm thinking about the appropriate project structure for a coming multi module web application project. I would like to have it separated something like that:
root-application
webapp
module1-web
module1
module2-web
module2
The root-application is the root-project (Surprise!!!), the webapp contains any web application wide source files, like the web.xml for example. Most of the source files are contained by the module projects. Any module has a web-project and the module project itself. Now I would like to have the webapp source files of the modules' web projects copied into the single destination WAR.
Is there something like a "best practice"? What kind of packaging do I have to choose for the module-web projects?
Thanks,
Stephan
Re: Maven project organization
Posted by Francis Lalonde <fr...@ca.inter.net>.
Stephan, I'm not sure I understand what you want to do... How many war
files do you want to build? How many jar files? What are the
dependencies between the projects? When you speak of source files, is
that java? Maybe one or two ascii graphs would help.
Some rules of thumb (for me) are :
1-you should have (at least) as many packaging "war" projects as you
want warfiles
2- use should have as many packaging "jar" projects as you want jarfiles
3- build the jars first, then the wars
3- the root project is of packaging "pom" should contain a <modules>
list and shared properties/dependencies
4- all projects inherit from the root using <parent>
5- only the parent declares a version
My folders look a bit like that :
- root
- jars
-jar1
-jar2
-wars
-war1
-war2
If you have stuff that is shared between multiple wars, you can put it
in a separate war that the others derive from (i think this is called
war overloading)
Francis
On 23/04/2010 3:32 AM, "Näcker, Stephan (UIT)" wrote:
> Hey,
>
> I 'm thinking about the appropriate project structure for a coming multi module web application project. I would like to have it separated something like that:
>
> root-application
> webapp
> module1-web
> module1
> module2-web
> module2
>
> The root-application is the root-project (Surprise!!!), the webapp contains any web application wide source files, like the web.xml for example. Most of the source files are contained by the module projects. Any module has a web-project and the module project itself. Now I would like to have the webapp source files of the modules' web projects copied into the single destination WAR.
>
> Is there something like a "best practice"? What kind of packaging do I have to choose for the module-web projects?
>
> Thanks,
> Stephan
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org