You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tim Dysinger <ti...@supplychainge.com> on 2005/09/19 21:16:25 UTC

Site Branding?

I have a simple war project and I want to extend it by branding it for
each of our customers.  The "branded" projects is essentially the same
code as the main project with slightly over-ridden web content (jsps and
images).

What is the simplest way to do this in Maven?  I was thinking of making
a seperate project for each "brand" and having ant update the main
project's war file with the over-ridden web content.  How would one do
this effectively?

-Tim



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


Re: Site Branding?

Posted by Raphaël Piéroni <ra...@gmail.com>.
Tim Dysinger a écrit :

>I have a simple war project and I want to extend it by branding it for
>each of our customers.  The "branded" projects is essentially the same
>code as the main project with slightly over-ridden web content (jsps and
>images).
>
>What is the simplest way to do this in Maven?  I was thinking of making
>a seperate project for each "brand" and having ant update the main
>project's war file with the over-ridden web content.  How would one do
>this effectively?
>
>-Tim
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>  
>
This looks like a skin above your worker project.

Maybe you can acheive your goal by creating
one project for each "skin" holding the skin's flavor.

Each of those skin's flavor projects depends from the worker project.

Each of those projects have to create the war file using its own flavor,
the worker project artifact, all the dependencies artifact, the common
resources (the resources of the worker project).

The worker project's artifact has to become a pure jar (maybe with
common resources).

If the assembly of the flavored war file has the same behaviour with
each different skin, it will be usefull to create a plugin for that
behaviour (on which the skins projects depend) if the behaviour can
not be handled by the sole war plugin.

Wrapping project
+ parent project --------------- for pom common informations
+ worker project --------------- contains the workflow and any thing 
that make the work (can be split into smaller projects)
+ skins war plugin ------------- the maven plugin that creates a skinned 
artifact
+ skin 1 project --------------- holds the first skin behaviour
...

Raphaël

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


Re: Site Branding?

Posted by Rinku <ra...@gmail.com>.
Hi Tim,

We do something similar in the sense that we have 'patches' set up for 
different targeted environments  - integration/uat (customer specific 
patches in your case).

Basically we have a custom plugin that wraps around the commonly 
executed standard goals (war:war, jar:jar etc). We specify the target 
environment to the wrapped goal and it resolves the location to a 
resource 'patch' based on it.

So, for example if I were to patch some configuration files (say, 
log4j.properties) for integration environment while creating a war, I'd 
run something like this :
maven myplugin:war -Dtarget.env=integration

and, the plugin picks up the patches for 'integration' and overlays them 
over the web-app resources just prior to calling war:war goal. I think 
you can extend this to create patches for your web-content.

Alternatively, you can also do this with maven.xml and using pre/post 
goals to patch resources, but that will not be as reusable as a plugin

HTH,

Rahul




Tim Dysinger wrote:

>I have a simple war project and I want to extend it by branding it for
>each of our customers.  The "branded" projects is essentially the same
>code as the main project with slightly over-ridden web content (jsps and
>images).
>
>What is the simplest way to do this in Maven?  I was thinking of making
>a seperate project for each "brand" and having ant update the main
>project's war file with the over-ridden web content.  How would one do
>this effectively?
>
>-Tim
>
>
>
>---------------------------------------------------------------------
>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