Author: crossley Date: Sun Aug 24 00:43:51 2008 New Revision: 688459 URL: http://svn.apache.org/viewvc?rev=688459&view=rev Log: For the Ant "war" target, transform the cocoon.xconf to set the different location for the build/plugins directory, rather than maintaining a separate copy of the cocoon.xconf file. Issue: FOR-1093, FOR-955
Added: forrest/branches/update_cocoon_2.1.12-dev/main/var/fixWarXconf.xsl (with props) Removed: forrest/branches/update_cocoon_2.1.12-dev/main/webapp/WEB-INF/xconf/forrest-core-webapp.xconf Modified: forrest/branches/update_cocoon_2.1.12-dev/main/targets/webapp.xml Modified: forrest/branches/update_cocoon_2.1.12-dev/main/targets/webapp.xml URL: http://svn.apache.org/viewvc/forrest/branches/update_cocoon_2.1.12-dev/main/targets/webapp.xml?rev=688459&r1=688458&r2=688459&view=diff ============================================================================== --- forrest/branches/update_cocoon_2.1.12-dev/main/targets/webapp.xml (original) +++ forrest/branches/update_cocoon_2.1.12-dev/main/targets/webapp.xml Sun Aug 24 00:43:51 2008 @@ -158,7 +158,14 @@ =============================================================== --> <target name="war" depends="run-webapp" description="* Generates a dynamic servlet-based website (a packaged .war file)"> - <move file="${project.webapp}/WEB-INF/xconf/forrest-core-webapp.xconf" tofile="${project.webapp}/WEB-INF/xconf/forrest-core.xconf"/> + <xslt force="true" + in="${project.webapp}/WEB-INF/cocoon.xconf" + out="${project.webapp}/WEB-INF/cocoon.xconf2" + style="${forrest.core}/var/fixWarXconf.xsl"> + <outputproperty name="indent" value="yes"/> + </xslt> +<!-- FIXME: The xslt task did not like writing to the same file (Mac OS X?) --> + <move file="${project.webapp}/WEB-INF/cocoon.xconf2" tofile="${project.webapp}/WEB-INF/cocoon.xconf"/> <jar destfile="${project.war}"> <fileset dir="${project.webapp}"/> <fileset dir="${forrest.home}"> Added: forrest/branches/update_cocoon_2.1.12-dev/main/var/fixWarXconf.xsl URL: http://svn.apache.org/viewvc/forrest/branches/update_cocoon_2.1.12-dev/main/var/fixWarXconf.xsl?rev=688459&view=auto ============================================================================== --- forrest/branches/update_cocoon_2.1.12-dev/main/var/fixWarXconf.xsl (added) +++ forrest/branches/update_cocoon_2.1.12-dev/main/var/fixWarXconf.xsl Sun Aug 24 00:43:51 2008 @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:template match="forrest.plugins"> + <xsl:element name="forrest.plugins"> + <xsl:text>@context.home@/build/plugins</xsl:text> + </xsl:element> + </xsl:template> + <xsl:template match="@*|*|text()|processing-instruction()|comment()"> + <xsl:copy> + <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/> + </xsl:copy> + </xsl:template> +</xsl:stylesheet> Propchange: forrest/branches/update_cocoon_2.1.12-dev/main/var/fixWarXconf.xsl ------------------------------------------------------------------------------ svn:eol-style = native