Some people leverage the JNDI features of their container and insert
the proper values for the environment into JNDI. Then you don't
include environment-specific values in the jar/war/ear at all.

The other trouble you run into when you are trying to build an
environment-specific package is that you need to add a classifier or
adjust the artifactId to reflect which client/environment this
particular package is for. Otherwise you may end up with client1 ear
containing client2 war and client3 jar.

Most people end up using War overlays to solve some of these problems.
Take a look at them and see if that helps at all.

This is a complex issue and I can't recommend a specific best practice
that will solve it for all people in all environments with all builds
etc. Generally client- and environment-specific profiles and a shared
parent profile that contains common properties are involved, eg mvn
-Pdev,client1 package or mvn -Pprod,client3.

Wayne

On 4/30/08, ika <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> First of all; I', pretty new to maven so sorry if I've missed the big
> pictures....
>
> I'm working on a web project where we until now only have had one customer.
> We have been using profiles; development, test and production. The
> difference between the profiles are web service addresses, dbconnections
> etc. The profiles have filtered in the correct settings to the properties
> files.
>
> Now we got two other customers that want the same thing, but a few settings
> are changed (i.e the logo, heading etc). So now I would like to build the
> production profiles and then build 3 packages (one for each customer) and
> filter in the customer specific settings.
>
> I've been looking at the assembly plugin; but not sure it does what I want.
> I want to specify the filter to use for each customer and then filter the
> properties file. From what I understand the assembly plugin goes the
> opposite direction, one filter that can be applied on several files... :-/
>
> An alternative is to make three static properties-files and copy them into
> the project using assembly, but then all the common properties are
> duplicated in all the three properties-files.
>
> Any thoughts?
>
> Ivar
>
> --
> View this message in context: 
> http://www.nabble.com/Profiles-and-or-assemblies--tp16977056s177p16977056.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to