You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/06/23 17:52:02 UTC
svn commit: r416749 - in /lenya/trunk/src:
impl/java/org/apache/lenya/cms/module/
java/org/apache/lenya/cms/cocoon/source/ java/org/apache/lenya/cms/module/
modules/sitetree/xslt/navigation/ resources/build/ targets/
Author: andreas
Date: Fri Jun 23 08:52:01 2006
New Revision: 416749
URL: http://svn.apache.org/viewvc?rev=416749&view=rev
Log:
Added ModuleManager, added option not to copy modules during the build
Added:
lenya/trunk/src/impl/java/org/apache/lenya/cms/module/
lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java
lenya/trunk/src/java/org/apache/lenya/cms/module/
lenya/trunk/src/java/org/apache/lenya/cms/module/ModuleException.java
lenya/trunk/src/java/org/apache/lenya/cms/module/ModuleManager.java
lenya/trunk/src/resources/build/modules2patch.xsl
lenya/trunk/src/resources/build/util.xsl
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/TemplateFallbackSourceFactory.java
lenya/trunk/src/modules/sitetree/xslt/navigation/search.xsl
lenya/trunk/src/resources/build/modules2build.xsl
lenya/trunk/src/targets/modules-build.xml
Added: lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java?rev=416749&view=auto
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java (added)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java Fri Jun 23 08:52:01 2006
@@ -0,0 +1,67 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ */
+package org.apache.lenya.cms.module;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.avalon.framework.thread.ThreadSafe;
+
+/**
+ * Module manager implementation.
+ */
+public class ModuleManagerImpl extends AbstractLogEnabled implements ModuleManager, ThreadSafe,
+ Configurable {
+
+ public String getBaseURI(String shortcut) throws ModuleException {
+ if (!this.module2src.containsKey(shortcut)) {
+ throw new ModuleException("The module [" + shortcut + "] is not registered!");
+ }
+
+ String baseUri;
+ if (this.modulesCopied) {
+ baseUri = "context://lenya/modules/" + shortcut;
+ }
+ else {
+ String path = (String) this.module2src.get(shortcut);
+ baseUri = new File(path).toURI().toString();
+ }
+ return baseUri;
+ }
+
+ private boolean modulesCopied = false;
+ private Map module2src = new HashMap();
+
+ public void configure(Configuration config) throws ConfigurationException {
+ Configuration modulesConfig = config.getChild("modules");
+ this.modulesCopied = modulesConfig.getAttributeAsBoolean("copy");
+
+ Configuration[] modules = modulesConfig.getChildren("module");
+ for (int i = 0; i < modules.length; i++) {
+ String shortcut = modules[i].getAttribute("shortcut");
+ String src = modules[i].getAttribute("src");
+ this.module2src.put(shortcut, src);
+ }
+
+ }
+
+}
Modified: lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java?rev=416749&r1=416748&r2=416749&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java Fri Jun 23 08:52:01 2006
@@ -36,6 +36,7 @@
import org.apache.excalibur.source.SourceResolver;
import org.apache.excalibur.source.SourceUtil;
import org.apache.excalibur.source.URIAbsolutizer;
+import org.apache.lenya.cms.module.ModuleManager;
import org.apache.lenya.cms.publication.Publication;
import org.apache.lenya.cms.publication.PublicationManager;
import org.apache.lenya.cms.publication.URLInformation;
@@ -47,8 +48,8 @@
*
* @version $Id$
*/
-public class FallbackSourceFactory extends AbstractLogEnabled implements SourceFactory, Serviceable,
- Contextualizable, URIAbsolutizer {
+public class FallbackSourceFactory extends AbstractLogEnabled implements SourceFactory,
+ Serviceable, Contextualizable, URIAbsolutizer {
/**
* Ctor.
@@ -58,8 +59,7 @@
}
/**
- * @see org.apache.excalibur.source.SourceFactory#getSource(java.lang.String,
- * java.util.Map)
+ * @see org.apache.excalibur.source.SourceFactory#getSource(java.lang.String, java.util.Map)
*/
public Source getSource(final String location, Map parameters) throws IOException,
MalformedURLException {
@@ -93,13 +93,12 @@
Source source;
try {
sourceResolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-
- templateManager = (PublicationTemplateManager) this.manager
- .lookup(PublicationTemplateManager.ROLE);
+
+ templateManager = (PublicationTemplateManager) this.manager.lookup(PublicationTemplateManager.ROLE);
Request request = ContextHelper.getRequest(this.context);
String webappUrl = request.getRequestURI().substring(request.getContextPath().length());
-
+
URLInformation info = new URLInformation(webappUrl);
String publicationId = info.getPublicationId();
@@ -116,8 +115,23 @@
}
if (resolvedUri == null) {
- final String contextUri = "context://" + location.substring("fallback://".length());
- resolvedUri = contextUri;
+ if (path.startsWith("lenya/modules/")) {
+ ModuleManager moduleMgr = null;
+ try {
+ moduleMgr = (ModuleManager) this.manager.lookup(ModuleManager.ROLE);
+ final String moduleShortcut = path.split("/")[2];
+ String baseUri = moduleMgr.getBaseURI(moduleShortcut);
+ final String modulePath = path.substring(("lenya/modules/" + moduleShortcut).length());
+ resolvedUri = baseUri + modulePath;
+ } finally {
+ if (moduleMgr != null) {
+ this.manager.release(moduleMgr);
+ }
+ }
+ } else {
+ String contextUri = "context://" + path;
+ resolvedUri = contextUri;
+ }
}
source = sourceResolver.resolveURI(resolvedUri);
Modified: lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/TemplateFallbackSourceFactory.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/TemplateFallbackSourceFactory.java?rev=416749&r1=416748&r2=416749&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/TemplateFallbackSourceFactory.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/TemplateFallbackSourceFactory.java Fri Jun 23 08:52:01 2006
@@ -36,6 +36,7 @@
import org.apache.excalibur.source.SourceResolver;
import org.apache.excalibur.source.SourceUtil;
import org.apache.excalibur.source.URIAbsolutizer;
+import org.apache.lenya.cms.module.ModuleManager;
import org.apache.lenya.cms.publication.Publication;
import org.apache.lenya.cms.publication.PublicationManager;
import org.apache.lenya.cms.publication.URLInformation;
@@ -47,8 +48,8 @@
*
* @version $Id: FallbackSourceFactory.java 264153 2005-08-29 15:11:14Z andreas $
*/
-public class TemplateFallbackSourceFactory extends AbstractLogEnabled implements SourceFactory, Serviceable,
- Contextualizable, URIAbsolutizer {
+public class TemplateFallbackSourceFactory extends AbstractLogEnabled implements SourceFactory,
+ Serviceable, Contextualizable, URIAbsolutizer {
/**
* Ctor.
@@ -58,8 +59,7 @@
}
/**
- * @see org.apache.excalibur.source.SourceFactory#getSource(java.lang.String,
- * java.util.Map)
+ * @see org.apache.excalibur.source.SourceFactory#getSource(java.lang.String, java.util.Map)
*/
public Source getSource(final String location, Map parameters) throws IOException,
MalformedURLException {
@@ -93,27 +93,25 @@
Source source;
try {
sourceResolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-
- templateManager = (PublicationTemplateManager) this.manager
- .lookup(PublicationTemplateManager.ROLE);
+
+ templateManager = (PublicationTemplateManager) this.manager.lookup(PublicationTemplateManager.ROLE);
Request request = ContextHelper.getRequest(this.context);
String webappUrl = request.getRequestURI().substring(request.getContextPath().length());
-
+
URLInformation info = new URLInformation(webappUrl);
String publicationId = info.getPublicationId();
pubMgr = (PublicationManager) this.manager.lookup(PublicationManager.ROLE);
Publication pub = pubMgr.getPublication(publicationId);
-
- //Get the template publication
- String pubTemplateId = pub.getTemplateIds()[0];
- if (pubTemplateId.length() > 0)
- pub = pubMgr.getPublication(pubTemplateId);
- if (pub.exists()) {
+ // Get the template publication
+ if (pub.getTemplateIds().length > 0) {
+ String pubTemplateId = pub.getTemplateIds()[0];
+ Publication template = pubMgr.getPublication(pubTemplateId);
+
ExistingSourceResolver resolver = new ExistingSourceResolver();
- templateManager.visit(pub, path, resolver);
+ templateManager.visit(template, path, resolver);
resolvedUri = resolver.getURI();
}
@@ -122,8 +120,23 @@
}
if (resolvedUri == null) {
- final String contextUri = "context://" + location.substring("fallback://".length());
- resolvedUri = contextUri;
+ if (path.startsWith("lenya/modules/")) {
+ ModuleManager moduleMgr = null;
+ try {
+ moduleMgr = (ModuleManager) this.manager.lookup(ModuleManager.ROLE);
+ final String moduleShortcut = path.split("/")[2];
+ String baseUri = moduleMgr.getBaseURI(moduleShortcut);
+ final String modulePath = path.substring(("lenya/modules/" + moduleShortcut).length());
+ resolvedUri = baseUri + modulePath;
+ } finally {
+ if (moduleMgr != null) {
+ this.manager.release(moduleMgr);
+ }
+ }
+ } else {
+ String contextUri = "context://" + path;
+ resolvedUri = contextUri;
+ }
}
source = sourceResolver.resolveURI(resolvedUri);
Added: lenya/trunk/src/java/org/apache/lenya/cms/module/ModuleException.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/module/ModuleException.java?rev=416749&view=auto
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/module/ModuleException.java (added)
+++ lenya/trunk/src/java/org/apache/lenya/cms/module/ModuleException.java Fri Jun 23 08:52:01 2006
@@ -0,0 +1,53 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ */
+package org.apache.lenya.cms.module;
+
+/**
+ * Module exception.
+ */
+public class ModuleException extends Exception {
+
+ /**
+ *
+ */
+ public ModuleException() {
+ super();
+ }
+
+ /**
+ * @param arg0
+ * @param arg1
+ */
+ public ModuleException(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ }
+
+ /**
+ * @param arg0
+ */
+ public ModuleException(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * @param arg0
+ */
+ public ModuleException(Throwable arg0) {
+ super(arg0);
+ }
+
+}
Added: lenya/trunk/src/java/org/apache/lenya/cms/module/ModuleManager.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/module/ModuleManager.java?rev=416749&view=auto
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/module/ModuleManager.java (added)
+++ lenya/trunk/src/java/org/apache/lenya/cms/module/ModuleManager.java Fri Jun 23 08:52:01 2006
@@ -0,0 +1,37 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ */
+package org.apache.lenya.cms.module;
+
+/**
+ * Module manager.
+ */
+public interface ModuleManager {
+
+ /**
+ * The Avalon role.
+ */
+ String ROLE = ModuleManager.class.getName();
+
+ /**
+ * Returns the base URI of a module directory.
+ * @param moduleShortcut The module shortcut.
+ * @return A string.
+ * @throws ModuleException if there is no module for this shortcut.
+ */
+ String getBaseURI(String moduleShortcut) throws ModuleException;
+
+}
Modified: lenya/trunk/src/modules/sitetree/xslt/navigation/search.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/xslt/navigation/search.xsl?rev=416749&r1=416748&r2=416749&view=diff
==============================================================================
--- lenya/trunk/src/modules/sitetree/xslt/navigation/search.xsl (original)
+++ lenya/trunk/src/modules/sitetree/xslt/navigation/search.xsl Fri Jun 23 08:52:01 2006
@@ -25,15 +25,13 @@
exclude-result-prefixes="nav"
>
+ <xsl:param name="root"/>
+
<xsl:template match="nav:site">
<div id="search">
- <form action="?" id="form-search">
+ <form action="{$root}search.html" id="form-search">
<p>
<input class="searchfield" type="text" name="queryString" alt="Search field"/>
- <select name="lenya.usecase">
- <option selected="true" value="lucene.search">Internal</option>
- <option value="lucene.externalOpensearch">External</option>
- </select>
<input type="hidden" value="20" name="pageLength"/>
<input class="searchsubmit" type="submit" value="Go" name="input-go"/>
</p>
Modified: lenya/trunk/src/resources/build/modules2build.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/resources/build/modules2build.xsl?rev=416749&r1=416748&r2=416749&view=diff
==============================================================================
--- lenya/trunk/src/resources/build/modules2build.xsl (original)
+++ lenya/trunk/src/resources/build/modules2build.xsl Fri Jun 23 08:52:01 2006
@@ -1,13 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: global-sitemap.xmap 393761 2006-04-13 08:38:00Z michi $ -->
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:mod="http://apache.org/lenya/module/1.0"
xmlns:list="http://apache.org/lenya/module-list/1.0">
+ <xsl:import href="util.xsl"/>
+
<xsl:output indent="yes"/>
<xsl:param name="cocoon-xconf"/>
<xsl:param name="module-schema"/>
-
+ <xsl:param name="copy-modules"/>
+
<xsl:template match="list:modules">
<project name="lenya-modules">
@@ -134,21 +155,23 @@
</xsl:variable>
<target name="copy-module-{$id}">
- <xsl:variable name="todir">${build.webapp}/lenya/modules/<xsl:value-of select="$dirName"/></xsl:variable>
- <copy
- todir="{$todir}"
- flatten="false">
- <fileset dir="{$src}">
- <exclude name="java/**"/>
- <exclude name="*/java/**"/>
- <exclude name="config/cocoon-xconf/**"/>
- <exclude name="*/config/cocoon-xconf/**"/>
- <exclude name="config/lenya-roles/**"/>
- <exclude name="*/config/lenya-roles/**"/>
- <exclude name="config/sitemap/**"/>
- <exclude name="*/config/sitemap/**"/>
- </fileset>
- </copy>
+ <xsl:if test="$copy-modules = 'true'">
+ <xsl:variable name="todir">${build.webapp}/lenya/modules/<xsl:value-of select="$dirName"/></xsl:variable>
+ <copy
+ todir="{$todir}"
+ flatten="false">
+ <fileset dir="{$src}">
+ <exclude name="java/**"/>
+ <exclude name="*/java/**"/>
+ <exclude name="config/cocoon-xconf/**"/>
+ <exclude name="*/config/cocoon-xconf/**"/>
+ <exclude name="config/lenya-roles/**"/>
+ <exclude name="*/config/lenya-roles/**"/>
+ <exclude name="config/sitemap/**"/>
+ <exclude name="*/config/sitemap/**"/>
+ </fileset>
+ </copy>
+ </xsl:if>
</target>
<target name="patch-module-{$id}">
@@ -182,19 +205,5 @@
</xsl:template>
-
- <xsl:template name="lastStep">
- <xsl:param name="path"/>
- <xsl:choose>
- <xsl:when test="contains($path, '/')">
- <xsl:call-template name="lastStep">
- <xsl:with-param name="path" select="substring-after($path, '/')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$path"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
</xsl:stylesheet>
Added: lenya/trunk/src/resources/build/modules2patch.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/resources/build/modules2patch.xsl?rev=416749&view=auto
==============================================================================
--- lenya/trunk/src/resources/build/modules2patch.xsl (added)
+++ lenya/trunk/src/resources/build/modules2patch.xsl Fri Jun 23 08:52:01 2006
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: global-sitemap.xmap 393761 2006-04-13 08:38:00Z michi $ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:mod="http://apache.org/lenya/module/1.0"
+ xmlns:list="http://apache.org/lenya/module-list/1.0">
+
+ <xsl:import href="util.xsl"/>
+
+ <xsl:output indent="yes"/>
+
+ <xsl:param name="copy-modules"/>
+
+ <xsl:template match="list:modules">
+
+ <xconf xpath="/cocoon" remove="/cocoon/component[@role = 'org.apache.lenya.cms.module.ModuleManager']">
+
+ <component
+ role="org.apache.lenya.cms.module.ModuleManager"
+ class="org.apache.lenya.cms.module.ModuleManagerImpl">
+ <modules copy="{$copy-modules}">
+ <xsl:apply-templates select="list:module"/>
+ </modules>
+ </component>
+ </xconf>
+
+ </xsl:template>
+
+
+ <xsl:template match="list:module">
+ <xsl:variable name="shortcut">
+ <xsl:call-template name="lastStep">
+ <xsl:with-param name="path" select="@src"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <module src="{@src}" shortcut="{$shortcut}"/>
+
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: lenya/trunk/src/resources/build/util.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/resources/build/util.xsl?rev=416749&view=auto
==============================================================================
--- lenya/trunk/src/resources/build/util.xsl (added)
+++ lenya/trunk/src/resources/build/util.xsl Fri Jun 23 08:52:01 2006
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed 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.
+-->
+
+<!-- $Id: global-sitemap.xmap 393761 2006-04-13 08:38:00Z michi $ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:template name="lastStep">
+ <xsl:param name="path"/>
+ <xsl:choose>
+ <xsl:when test="contains($path, '/')">
+ <xsl:call-template name="lastStep">
+ <xsl:with-param name="path" select="substring-after($path, '/')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$path"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Modified: lenya/trunk/src/targets/modules-build.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/targets/modules-build.xml?rev=416749&r1=416748&r2=416749&view=diff
==============================================================================
--- lenya/trunk/src/targets/modules-build.xml (original)
+++ lenya/trunk/src/targets/modules-build.xml Fri Jun 23 08:52:01 2006
@@ -25,6 +25,7 @@
<property name="modules.root.dirs" value=""/>
<property name="build.modules" value="${build.webapp}/lenya/modules"/>
+ <property name="modules.copy" value="false"/>
<target name="deploy-modules" depends="init-tasks">
@@ -41,8 +42,21 @@
style="${src.resource.dir}/build/modules2build.xsl">
<param name="cocoon-xconf" expression="${cocoon.xconf}" />
<param name="module-schema" expression="${src.resource.dir}/build/module.rng"/>
+ <param name="copy-modules" expression="${modules.copy}"/>
</xslt>
+ <xslt
+ in="${build.dir}/temp/modules.xml"
+ out="${build.dir}/temp/modules.xconf"
+ style="${src.resource.dir}/build/modules2patch.xsl">
+ <param name="copy-modules" expression="${modules.copy}"/>
+ </xslt>
+
+ <xpatch addComments="false"
+ includes="modules.xconf"
+ srcdir="${build.dir}/temp/"
+ file="build/lenya/webapp/WEB-INF/cocoon.xconf"/>
+
<ant antfile="${build.dir}/temp/modules-build.xml"
inheritall="true"
inheritrefs="true"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org