portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ate Douma <...@douma.nu>
Subject Re: Extending Maven Plugins?
Date Mon, 23 Feb 2009 15:34:09 GMT
Hi Randy,

See further below.

Randy Watler wrote:
> All,
> Quick question. I need to edit or have alternate versions of jetspeed 
> context.xml and spring-filter.properties for JPA. I have a very cursory 
> understanding of the maven plugins and how they are configured. Where 
> should logic that munges or selects alternate versions of these files go?

This should preferably be integrated in the custom deployment configuration of a jetspeed
portal, for instance similar to the 

> In a nutshell, I have to conditionally add an additional Resource tag in 
> context.xml and modify the 'default' property setting in 
> spring-filter.properties file. It might even be reasonable to do this at 
> artifact build time, but that seems awkward at best. So, I am looking 
> for some advice on how to proceed.
For the jetspeed-demo portal deployment we already provide an example for modifying the 'default'
spring-filter.properties usage.
Take a look at the deploy-dbpsml profile therein.
DBPSML requires a different 'default' spring-filter.properties key selection ('portal.dbPageManager'
instead of just 'portal').
In jetspeed-demo/src/etc/dbpsml we provide a spring-filter-key.properties file which provides
this "override" of the default key and in the 
deploy-dbpsml we simply copy that file to the WEB-INF/conf folder and it will automatically
be picked up by jetspeed then.

For modifying the default context.xml we do not have an example, but it should be easy enough
to provide an alternate context.xml and copy 
(and filter) that one instead of the default context.xml.
The processing/deployment of the default context.xml for jetspeed-demo is as follows (see
for example the deploy profile):
   1) extracted from the jetspeed-portal-resources.jar by the jetspeed-unpack-maven-plugin
into target/tomcat/context.xml
   2) processed by by the maven-resources-plugin (to ensure embedded variables are filtered)
into target/resources/tomcat/context.xml
      (note: this uses specific configuration of the <build><resources><resource>...
elements inside the profile)
   3) copied to the portal deployment environment using the jetspeed-deploy-maven-plugin

For starters, I would suggest just adding an additional tomcat/JPA-context.xml to the jetspeed-portal-resources
and extract that one instead 
to target/tomcat/context.xml and probably you're done then already.



> Thanks,
> Randy
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org

To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org

View raw message