maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Polet <guillaume.po...@agilebirds.com>
Subject Re: Multimodule distribution
Date Mon, 11 Jul 2011 08:49:18 GMT
Hi,

I have set up this kind of project by using Multi-module project; 
packages are built with the assembly plugin. The thing is that I have 
two main branches in my multi-module project:
1) for all the jars of code: this branch configures all the general 
presets for all jars of the application.
2) for all the different packages I want to create: this branch 
configures all the general presets for all packages I want to have.

The Maven project structure looks like this:

Root
\---JARS
|   \---Core
|   \---Component A (Deps: Core)
|   \---Component B (Deps: Core)
|   \--- ...
\---PACKAGES
     \--- PACKAGE 1 (Deps: Component A, Component B)
     \--- PACKAGE 2 (Deps: Component B, Component ...)
     \--- ...

In the pom of PACKAGES, I have attached the maven assembly plugin to the 
build process (e.g. attached to the "package" phase).  In each packages, 
I declare the "correct" dependencies that needs to be embedded in each 
package. The key for you will be to create a proper assembly descriptor 
file.

Then if I use ´mvn clean install´ on the root pom and it builds all jars 
and then all packages. The bonus I get from such configuration is that I 
can use the "Package" pom's to create "Launch configurations" in 
development and I am then sure that it matches exactly what will be in 
each different package.

Guillaume
Le 11/07/2011 8:47, Ivan a écrit :
> Hello, guys!
> We have a project consisting of a main module (we call it core) and several
> configurable plugin modules (we call it component). By the application
> design each module is highly customizable and depends on one or more
> configuration files. When the application starts the "conf" folder is
> scanned and application configuration is constructed from all conf-files
> located in that folder. Depending on the usage scenario several combinations
> of configuration files may be used
>
> The basic aim we want to achieve is:
> 1) Have all possible configuration files stored in some folder of a module,
> e.g. for component A we have Aconf1.xml, Aconf2.xml and for component B
> Bconf1.xml and Bconf2.xml
> 2) For each target usage scenario we want to predefine a set of
> configuration files in a pom file that will build a distribution. E.g. for
> Scenario1 we should use Aconf1.xml and Bconf2.xml, but for Scenario2 we
> should use Aconf2.xml and Bconf1.xml
> 3) The resulting layout should look like ./lib - all *.jar files (core and
> components used) and ./conf - subset of configuration files specified in a
> distribution pom file.
>
> Can you suggest how this goal can be achieved with maven and distribution or
> assembly plugin?
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Multimodule-distribution-tp4574067p4574067.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message