There was some talk about making this easier to do...
On 3.1.2 I do this (these settings may have changed in 3.2 though):
Edit: /uportal-impl/src/main/resources/properties/portal.properties
Set XSLT caching off:
org.jasig.portal.utils.XSLT.stylesheet_set_caching=off
org.jasig.portal.utils.XSLT.stylesheet_root_caching=off
Edit: /uportal-war/src/main/webapp/WEB-INF/web.xml
Turn off JS/CSS caching, without doing this JS/CSS changes require a app
server restart.
Comment or delete the following sections:
<filter>
<filter-name>pageCachingFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetFilterLifecycle</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>pageCachingFilter</filter-name>
<url-pattern>*.js</url-pattern>
<url-pattern>*.css</url-pattern>
</filter-mapping>
To make it easier to deploy updates I added these targets to build.xml
<target name="css.directInject" description="Directly inject css files
to deploy location and overwrites *.min.css files">
<!-- Copy all skins files -->
<copy toDir="${server.webapps}/ROOT/media/skins" verbose="true">
<fileset dir="uportal-war/src/main/webapp/media/skins">
<include name="**/*" />
</fileset>
</copy>
<!-- Overwrite *.min.css files with uncompressed files -->
<copy toDir="${server.webapps}/ROOT/media/skins" verbose="true">
<fileset dir="uportal-war/src/main/webapp/media/skins">
<include name="**/*.css" />
</fileset>
<globmapper from="*.css" to="*.min.css" />
</copy>
</target>
<target name="xsl.directInject" description="Directly inject xsl theme
files to deploy location">
<!-- Copy all skins files -->
<copy
toDir="${server.webapps}/ROOT/WEB-INF/classes/layout/theme/universality"
verbose="true">
<fileset dir="uportal-war/src/main/resources/layout/theme/universality">
<include name="**/*.xsl" />
</fileset>
</copy>
</target>
Your workflow should now just be to edit XSL or CSS files and then run
ant xsl.directInject or css.directInject
I think the user session still caches XSL, so you may have to logout and
log back in for an XSL change. Better than having to restart the server
though. Maybe there's a way to disable the user's session from caching
XSL so you can just click refresh instead of relogging?
-Arlo
On 05/27/2010 09:45 AM, Robert R. Miller II wrote:
Hey there uPortal community.
I am new to the uPortal development effort so please forgive me for having to
ask the newbie questions. We are attempting a development effort centered
around front-end theme and skin work, starting from the
uPortal-3.2.1-quick-start-dev tarball, and need to know how to effectively
disable the caching in order to increase productivity. We have had no success
with the following 3.1 instruction set
(http://www.ja-sig.org/wiki/display/UPM31/20+Developing+in+the+Themes+and+Skins+Areas+of+uPortal)
and am, at this point, reaching out to the community for some assistance.
Any and all responses to this general inquiry would be greatly appreciated.
Thanks in advance to those who do respond.
~R
Robert R Miller II
Lead Programmer/Analyst
Integrated Web Services
Cornell Information Technologies
Cornell University
(607) 254-5196
"Become the change you seek in the world!"
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/uportal-dev