You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mr Rocks <tv...@yahoo.com> on 2010/12/31 16:39:58 UTC

Managing configuration with many environments and multiple modules

I have a Maven project organized like this:

parentProj
    supportingJar
    first-web-app-war
    second-web-app-war
    second-web-app-packaged-as-ear
    third-web-app

The 3 web applications are all deployed on different application servers and 
machines (2 Tomcat as war, 1 WebSphere as ear).

What has me confused is how to use "The Maven Way" to create appropriate 
artifacts for these many different environments.  I could use profiles, but 
there is no good way to build for a prod environment when production means 10 
different servers spead out over 3 distinct applications.

My first thought is that I should break out the web applications into their own 
projects and have the "supportingJar" be available in the local repository when 
it changes.  That way, I could have a specific profile for as many different 
environments as I needed (one for each destination server) and could still 
filter the files in src/main/resources appropriately.

My other thought is that I should simply use the assembly plugin to create a 
compressed file of all the configurations and then have the application server 
use the appropriate subset of those configuration files by adding it to the 
class path at runtime.  This is desirable because I would only need to generate 
a configuration-less war or ear that could be deployed across many servers.

Any suggestions are very much appreciated.

Thanks,

Kory 


      

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


Re: Managing configuration with many environments and multiple modules

Posted by Ron Wheeler <rw...@artifact-software.com>.
http://blog.artifact-software.com/tech/?p=58

This may help with the discussion about how to deal with the separation 
of deployment from development which is the key to solving a good chunk 
of your problem.


Ron



On 31/12/2010 10:39 AM, Mr Rocks wrote:
> I have a Maven project organized like this:
>
> parentProj
>      supportingJar
>      first-web-app-war
>      second-web-app-war
>      second-web-app-packaged-as-ear
>      third-web-app
>
> The 3 web applications are all deployed on different application servers and
> machines (2 Tomcat as war, 1 WebSphere as ear).
>
> What has me confused is how to use "The Maven Way" to create appropriate
> artifacts for these many different environments.  I could use profiles, but
> there is no good way to build for a prod environment when production means 10
> different servers spead out over 3 distinct applications.
>
> My first thought is that I should break out the web applications into their own
> projects and have the "supportingJar" be available in the local repository when
> it changes.  That way, I could have a specific profile for as many different
> environments as I needed (one for each destination server) and could still
> filter the files in src/main/resources appropriately.
>
> My other thought is that I should simply use the assembly plugin to create a
> compressed file of all the configurations and then have the application server
> use the appropriate subset of those configuration files by adding it to the
> class path at runtime.  This is desirable because I would only need to generate
> a configuration-less war or ear that could be deployed across many servers.
>
> Any suggestions are very much appreciated.
>
> Thanks,
>
> Kory
>
>
>
>
> ---------------------------------------------------------------------
> 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


Re: Managing configuration with many environments and multiple modules

Posted by Wayne Fay <wa...@gmail.com>.
> My other thought is that I should simply use the assembly plugin to create a
> compressed file of all the configurations and then have the application server
> use the appropriate subset of those configuration files by adding it to the
> class path at runtime.  This is desirable because I would only need to generate
> a configuration-less war or ear that could be deployed across many servers.

Do this, or a variant of it.

Wayne

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