Question

due to the modular nature of some of our current applications, we have a need to understand how to setup Maven to produces mutliple configurations of the same artifact (in our case a WAR file), combinations of BOTH deployment level (dev, test, production) AND localised (gb, fr, es etc.)? We're looking for something like:

artifact-gb-dev.war
OR
artifact-fr-test.war (etc., etc.)

We've been made aware of Maven 'build profiles', which seem to fit the deployment environment criteria, and the 'maven-assembly-plugin', which might address the country/internationalisation issues BUT is it possible to combine the two (i.e. integrate French-language resources files into a production-level build)?

An example of our current directory structure might be:

..\gb
     \dev
     \test
     \production  
..\fr
     \dev
     \test
     \production  
..\es
     \dev
     \test
     \production

where a build might require a (one) French development release (fr/dev) OR all production releases (gb-fr-es-etc/prod), for example.

We're new to Maven and have decided to try it due to the quick ramp-up offered by pre-configured Maven archetypes and its dependency management. Until now we've used Ant for our builds.

Thanks

Richard

Was it helpful?

Solution

Have a look at the maven war overlay mechanism. It basically allows you to have a generic pom and put overlays (for each country for example) on top of it to build any number of wars.

I've used this in the past to create a website (platform) for multiple countries with small differences per country.

See: http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top