Personally I would use resource filtering and profiles to customize a
project for different customers/environments. You specifically
mentioned that you are already using profiles and find them
insufficient, so I'm wondering what specifically is not working for
you, as we've found ways to implement just about everything we need
using just Maven2, no Ant scripts.

Here's what we're doing on one of my projects:
mvn compile -P dev
mvn package -P qe
etc

Each profile has different variable values for the various filtered
files. So for your HTML image issue, perhaps you could use:
/resources/clientA/header.jpg
/resources/clientB/header.jpg

Then in the HTML file itself, filter it and use:
${client}/header.jpg

Similar thing for ejb-jar.xml and other configuration resources. Just
externalize all properties that change across profiles into a variable
and declare the proper value for each profile/environment/client.

We are currently using something similar today and it works great.

Wayne


On 3/27/06, Siegmann Daniel, NY <[EMAIL PROTECTED]> wrote:
> I do not know of any easy was in which Maven can support customizing a
> project for different customers/environments, though perhaps someone else
> will. If not, you can probably use an Ant script. It probably wouldn't be
> too hard - you could just maintain separate directories with resources, and
> have the script copy the appropriate ones into the main resources directory.
>
> Alternatively, you might consider maintaining a separate branch in your
> repository for each customer. That would eliminate the need for any special
> handling in your build environment, at the cost of compilicating your
> repository.
>
> --
> Daniel Siegmann
> FJA-US, Inc.
> (212) 840-2618 ext. 139
>
> > -----Original Message-----
> > From: Marcus Eberts [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 27, 2006 10:58 AM
> > To: [email protected]
> > Subject: project customization
> >
> >
> > Hi Guys,
> >
> > is it possible to customize a project for different
> > customers/environments?
> >
> > For example to use for one customer the image/content A, for a second
> > customer image/content B and a default image/content if it's for a
> > presentation. The same for environment configuration files (web.xml,
> > data-sources.xml, ...).
> >
> > Does Maven provide a way to cover customizations? I tried
> > using profiles
> > and build configurations in the POM files, but that only worked for
> > resource files and not for content.
> >
> > If possible please provide an example of your solution.
> >
> > Thanks
> > Marcus
> >
> >
> > ---------------------------------------------------------------------
> > 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