You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by re...@apache.org on 2008/02/22 09:02:37 UTC
svn commit: r630114 - in /cocoon/trunk/tools/cocoon-maven-plugin: ./
src/changes/ src/main/java/org/apache/cocoon/maven/rcl/
src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/
src/main/resources/org/apache/cocoon/maven/rcl/profiles/ src/main/resou...
Author: reinhard
Date: Fri Feb 22 00:02:35 2008
New Revision: 630114
URL: http://svn.apache.org/viewvc?rev=630114&view=rev
Log:
<action dev="reinhard" type="add">
Introduce the configuration parameter 'webappProfile'. For now two values are supported: 'cocoon-22' (default) and
'ssf'. 'cocoon-22' creates a Cocoon 2.2 web application, 'ssf' a web application that only makes use of the Servlet-Service
Framework.
</action>
<action dev="reinhard" type="add">
Introduce the configuration parameter 'customWebappDirectory'. If it is set, the content of the referenced
directory is added to the prepared web application.
</action>
<action dev="reinhard" type="update">
Rename the goal 'cocoon:rcl' to the less obscure name 'cocoon:prepare'. This is closer
to the actual meaning because the purpose of this goal is creating a web application that
wraps the current block. 'cocooon:rcl' is still supported but deprecated and will be removed
in future versions of the plugin.
</action>
Added:
cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/PrepareWebappMojo.java
- copied, changed from r628338, cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/ReloadingWebappMojo.java
cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/RCLMojo.java (with props)
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/
- copied from r616425, cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/applicationContext.xml
- copied, changed from r630113, cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/applicationContext.xml
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/log4j.xml
- copied unchanged from r630113, cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/log4j.xml
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/web.xml
- copied, changed from r630113, cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/web.xml
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/applicationContext.xml (with props)
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/log4j.xml (with props)
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/web.xml (with props)
Removed:
cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/ReloadingWebappMojo.java
cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/
Modified:
cocoon/trunk/tools/cocoon-maven-plugin/pom.xml
cocoon/trunk/tools/cocoon-maven-plugin/src/changes/changes.xml
cocoon/trunk/tools/cocoon-maven-plugin/src/test/java/org/apache/cocoon/maven/rcl/RwmPropertiesTest.java
Modified: cocoon/trunk/tools/cocoon-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/pom.xml?rev=630114&r1=630113&r2=630114&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/pom.xml (original)
+++ cocoon/trunk/tools/cocoon-maven-plugin/pom.xml Fri Feb 22 00:02:35 2008
@@ -17,9 +17,7 @@
specific language governing permissions and limitations
under the License.
-->
-<!--+
- | @version $Id$
- +-->
+<!-- @version $Id$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
Modified: cocoon/trunk/tools/cocoon-maven-plugin/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/changes/changes.xml?rev=630114&r1=630113&r2=630114&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/changes/changes.xml (original)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/changes/changes.xml Fri Feb 22 00:02:35 2008
@@ -18,17 +18,40 @@
under the License.
-->
<!--+
- | Find usage details at http://maven.apache.org/plugins/maven-changes-plugin/usage.html
- |
- | @version $Id$
- +-->
- <document>
- <body>
- <release version="1.0.0-M1" date="2007-??-??" description="unreleased">
- <action dev="reinhard" type="add">
- Initial creation.
- </action>
- </release>
- </body>
- </document>
-
+ - Find usage details at http://maven.apache.org/plugins/maven-changes-plugin/usage.html
+ - $Id$
+ -->
+<document>
+ <body>
+ <release version="1.0.0-M2" date="2008-??-??" description="unreleased">
+ <action dev="reinhard" type="add">
+ Introduce the configuration parameter 'webappProfile'. For now two values are supported: 'cocoon-22' (default) and
+ 'ssf'. 'cocoon-22' creates a Cocoon 2.2 web application, 'ssf' a web application that only makes use of the Servlet-Service
+ Framework.
+ </action>
+ <action dev="reinhard" type="add">
+ Introduce the configuration parameter 'customWebappDirectory'. If it is set, the content of the referenced
+ directory is added to the prepared web application.
+ </action>
+ <action dev="reinhard" type="update">
+ Rename the goal 'cocoon:rcl' to the less obscure name 'cocoon:prepare'. This is closer
+ to the actual meaning because the purpose of this goal is creating a web application that
+ wraps the current block. 'cocooon:rcl' is still supported but deprecated and will be removed
+ in future versions of the plugin.
+ </action>
+ <action dev="reinhard" type="add">
+ Add a configuration parameter 'reloadingClassLoaderEnabled' that controlls the usage
+ of the reloading classloader. If it is set to false, a URLClassLoader is used.
+ </action>
+ <action dev="reinhard" type="add">
+ Show CREATED messages in console only after the first DELETE or UPDATE message was sent.
+ This prevents users from being flooded by CREATED messages during startup.
+ </action>
+ </release>
+ <release version="1.0.0-M1" date="2007-07-02" description="released">
+ <action dev="reinhard" type="add">
+ Initial creation.
+ </action>
+ </release>
+ </body>
+</document>
Copied: cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/PrepareWebappMojo.java (from r628338, cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/ReloadingWebappMojo.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/PrepareWebappMojo.java?p2=cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/PrepareWebappMojo.java&p1=cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/ReloadingWebappMojo.java&r1=628338&r2=630114&rev=630114&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/ReloadingWebappMojo.java (original)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/PrepareWebappMojo.java Fri Feb 22 00:02:35 2008
@@ -67,13 +67,13 @@
/**
* The ReloadingWebappMojo creates a web application environment for a Cocoon block.
*
- * @goal rcl
+ * @goal prepare
* @requiresProject true
* @requiresDependencyResolution runtime
* @execute phase="process-classes"
* @version $Id$
*/
-public class ReloadingWebappMojo extends AbstractMojo {
+public class PrepareWebappMojo extends AbstractMojo {
private static final String LIB_VERSION_WRAPPER = "1.0.0-RC1-SNAPSHOT";
@@ -115,14 +115,14 @@
/**
* Logging: Use socket appender?
*
- * @parameter expression="${cocoon.rcl.log4j.useSocketAppender}"
+ * @parameter
*/
private boolean useSocketAppender = false;
/**
* Logging: Use console appender?
*
- * @parameter expression="${cocoon.rcl.log4j.useConsoleAppender}"
+ * @parameter
*/
private boolean useConsoleAppender = false;
@@ -130,7 +130,7 @@
* Enable reloading of the Spring application context. Note: The reload of the
* application context doesn't work properly if it contains beans which are based
* on proxies with interfaces which are loaded by the reloading class loader. As a
- * workaround you can put all those interfaces into a seperate module which is NOT
+ * workaround you can put all those interfaces into a separate module which is NOT
* loaded by the reloading class loader.
*
* @parameter
@@ -145,13 +145,30 @@
private boolean reloadingClassLoaderEnabled = true;
/**
- * Logging: Use a custom log4j xml configuration file=
+ * Logging: Use a custom log4j xml configuration file.
*
- * @parameter expression="${cocoon.rcl.log4j.conf}"
+ * @parameter
*/
private String customLog4jXconf;
/**
+ * Use a custom web application directory.
+ *
+ * @parameter
+ */
+ private File customWebappDirectory;
+
+ /**
+ * This goal prepares a minimal Cocoon web application using the default
+ * profile 'cocoon-22' that can be used to run a block. Alternatively a
+ * 'ssf' (servlet-service framework) profile is supported, which creates a
+ * web application that want to use the servlet-service framework only.
+ *
+ * @parameter
+ */
+ private String webappProfile = "cocoon-22";
+
+ /**
* Artifact factory, needed to download source jars for inclusion in classpath.
*
* @component role="org.apache.maven.artifact.factory.ArtifactFactory"
@@ -207,16 +224,21 @@
public void execute() throws MojoExecutionException {
// check if this plugin is useful at all
- if(!project.getPackaging().equals("jar") ||
- !(new File(project.getBasedir(), "src/main/resources/COB-INF").exists()) ||
- !rclPropertiesFile.exists()) {
- getLog().info("Don't execute the Cocoon RCL plugin becaues either its packaging " +
- "type is not 'jar' or it doesn't have a directory 'src/main/resources/COB-INF' or " +
- "there is no rcl.properties file in the block's base directory.");
+ if (!project.getPackaging().equals("jar") || !rclPropertiesFile.exists()) {
+ getLog().info("Don't execute the Cocoon RCL plugin becaues either its packaging "
+ + "type is not 'jar' or "
+ + "there is no rcl.properties file in the block's base directory.");
return;
}
- getLog().info("Creating a reloading Cocoon web application.");
+ // check profile
+ if ("cocoon-22".equals(this.webappProfile)) {
+ getLog().info("Preparing a Cocoon web application.");
+ } else if ("ssf".equals(this.webappProfile)) {
+ getLog().info("Preparing a Servlet-Service web application.");
+ } else {
+ throw new MojoExecutionException("Only the profiles 'cocoon-22' and 'ssf' are supported.");
+ }
// create web application containing all necessary files (web.xml, applicationContext.xml, log4j.xconf)
File webAppBaseDir = new File(target, "webapp");
@@ -226,6 +248,9 @@
createPath(new File(webAppBaseDir, WEB_INF_APP_CONTEXT)));
writeLog4jXml(webAppBaseDir);
+ // copy the content of a custom webapp context directory to the prepared web application.
+ copyCustomWebappDirectory(webAppBaseDir);
+
// copy rcl webapp wrapper and all its dependencies to WEB-INF/lib
copyRclWrapperLibs(webAppBaseDir);
@@ -295,7 +320,7 @@
Set artifacts = project.getArtifacts();
ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_RUNTIME);
- // add the Spring reloader lib
+ // add the Spring reloader libraries
Set springReloaderArtifacts = getDependencies("org.apache.cocoon", "cocoon-rcl-spring-reloader",
LIB_VERSION_SPRING_RELOADER, "jar");
artifacts.addAll(springReloaderArtifacts);
@@ -339,7 +364,7 @@
}
protected void copyRclWrapperLibs(File webAppBaseDir) throws MojoExecutionException {
- Set rclWebappDependencies = getDependencies("org.apache.cocoon", "cocoon-rcl-webapp-wrapper", LIB_VERSION_WRAPPER, "jar");
+ Set rclWebappDependencies = getDependencies("org.apache.cocoon", "cocoon-rcl-webapp-wrapper", LIB_VERSION_WRAPPER, "jar");
for (Iterator rclIt = rclWebappDependencies.iterator(); rclIt.hasNext();) {
Artifact artifact = (Artifact) rclIt.next();
try {
@@ -371,8 +396,27 @@
writeStringTemplateToFile(webAppBaseDir, WEB_INF_LOG4J, customLog4jXconf, log4jTemplateMap);
}
+ protected void copyCustomWebappDirectory(File webAppBaseDir) throws MojoExecutionException {
+ if (this.customWebappDirectory == null) {
+ return;
+ }
+ if (!this.customWebappDirectory.exists()) {
+ throw new MojoExecutionException("The custom web application directory does not exist.");
+ }
+ if (!this.customWebappDirectory.isDirectory()) {
+ throw new MojoExecutionException(
+ "The value of the parameter 'customWebappDirectory' doesn't point to a directory.");
+ }
+
+ try {
+ FileUtils.copyDirectory(this.customWebappDirectory, webAppBaseDir);
+ } catch (IOException e) {
+ throw new MojoExecutionException("Can't copy custom webapp files (directory: '" + this.customWebappDirectory
+ + ") to the web application in preparation.");
+ }
+ }
- private void applyXpatchFiles(File webAppBaseDir, RwmProperties props) throws MojoExecutionException {
+ protected void applyXpatchFiles(File webAppBaseDir, RwmProperties props) throws MojoExecutionException {
// find all xpatch files in all configured blocks
Set classesDirs = props.getClassesDirs();
File[] allXPatchFiles = new File[0];
@@ -412,12 +456,11 @@
WebXmlRewriter webXmlRewriter = new WebXmlRewriter(
"org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServlet",
"org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener",
- "org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter",
- false);
- if ( webXmlRewriter.rewrite(webXmlDocument) ) {
+ "org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter", false);
+ if (webXmlRewriter.rewrite(webXmlDocument)) {
// save web.xml
try {
- if ( this.getLog().isDebugEnabled() ) {
+ if (this.getLog().isDebugEnabled()) {
this.getLog().debug("Rewriting web.xml: " + webXml);
}
XMLUtils.write(webXmlDocument, new FileOutputStream(webXml));
@@ -508,8 +551,9 @@
}
protected InputStream readResourceFromClassloader(String fileName) {
- String resource = ReloadingWebappMojo.class.getPackage().getName().replace('.', '/') + "/" + fileName;
- return ReloadingWebappMojo.class.getClassLoader().getResourceAsStream(resource);
+ String resource = PrepareWebappMojo.class.getPackage().getName().replace('.', '/') + "/profiles/"
+ + this.webappProfile + "/" + fileName;
+ return PrepareWebappMojo.class.getClassLoader().getResourceAsStream(resource);
}
protected static File createPath(File file) {
Added: cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/RCLMojo.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/RCLMojo.java?rev=630114&view=auto
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/RCLMojo.java (added)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/RCLMojo.java Fri Feb 22 00:02:35 2008
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.maven.rcl;
+
+import org.apache.maven.plugin.MojoExecutionException;
+
+/**
+ * The ReloadingWebappMojo creates a web application environment for a Cocoon
+ * block.
+ *
+ * @goal rcl
+ * @requiresProject true
+ * @requiresDependencyResolution runtime
+ * @execute phase="process-classes"
+ * @version $Id$
+ * @deprecated Use {@link PrepareWebappMojo} instead.
+ */
+public class RCLMojo extends PrepareWebappMojo {
+
+ public void execute() throws MojoExecutionException {
+ this.getLog().warn(
+ "The 'rcl' goal has been deprecated. "
+ + "Use the 'prepare' goal to create a web application wrapper for a block instead.");
+ super.execute();
+ }
+
+}
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/RCLMojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/RCLMojo.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/RCLMojo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/applicationContext.xml (from r630113, cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/applicationContext.xml)
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/applicationContext.xml?p2=cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/applicationContext.xml&p1=cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/applicationContext.xml&r1=630113&r2=630114&rev=630114&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/applicationContext.xml (original)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/applicationContext.xml Fri Feb 22 00:02:35 2008
@@ -21,8 +21,8 @@
xmlns:util="http://www.springframework.org/schema/util"
xmlns:configurator="http://cocoon.apache.org/schema/configurator"
xmlns:avalon="http://cocoon.apache.org/schema/avalon"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd
http://cocoon.apache.org/schema/avalon http://cocoon.apache.org/schema/avalon/cocoon-avalon-1.0.xsd">
Copied: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/web.xml (from r630113, cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/web.xml)
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/web.xml?p2=cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/web.xml&p1=cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/web.xml&r1=630113&r2=630114&rev=630114&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/WEB-INF/web.xml (original)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/cocoon-22/WEB-INF/web.xml Fri Feb 22 00:02:35 2008
@@ -30,15 +30,15 @@
<filter-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingSpringFilter</filter-class>
</filter>
<filter>
- <description>Multipart MIME handling filter for Cocoon</description>
- <display-name>Cocoon multipart filter</display-name>
<filter-name>CocoonMultipartFilter</filter-name>
+ <display-name>Cocoon multipart filter</display-name>
+ <description>Multipart MIME handling filter for Cocoon</description>
<filter-class>org.apache.cocoon.servlet.multipart.MultipartFilter</filter-class>
</filter>
<filter>
- <description>Log debug information about each request</description>
- <display-name>Cocoon debug filter</display-name>
<filter-name>CocoonDebugFilter</filter-name>
+ <display-name>Cocoon debug filter</display-name>
+ <description>Log debug information about each request</description>
<filter-class>org.apache.cocoon.servlet.DebugFilter</filter-class>
</filter>
@@ -63,9 +63,9 @@
</listener>
<servlet>
- <description>Cocoon blocks dispatcher</description>
- <display-name>DispatcherServlet</display-name>
<servlet-name>DispatcherServlet</servlet-name>
+ <display-name>DispatcherServlet</display-name>
+ <description>Cocoon blocks dispatcher</description>
<servlet-class>org.apache.cocoon.servletservice.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
@@ -112,4 +112,5 @@
<extension>grm</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
+
</web-app>
Added: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/applicationContext.xml?rev=630114&view=auto
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/applicationContext.xml (added)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/applicationContext.xml Fri Feb 22 00:02:35 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!-- @version $Id$ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:configurator="http://cocoon.apache.org/schema/configurator"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+ http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">
+
+ <!-- Activate Cocoon Spring Configurator -->
+ <configurator:settings/>
+
+ <!-- Configure Log4j -->
+ <bean name="org.apache.cocoon.spring.configurator.log4j"
+ class="org.apache.cocoon.spring.configurator.log4j.Log4JConfigurator"
+ scope="singleton">
+ <property name="settings" ref="org.apache.cocoon.configuration.Settings"/>
+ <property name="resource" value="/WEB-INF/log4j.xml"/>
+ </bean>
+
+</beans>
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/applicationContext.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/applicationContext.xml
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/applicationContext.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/log4j.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/log4j.xml?rev=630114&view=auto
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/log4j.xml (added)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/log4j.xml Fri Feb 22 00:02:35 2008
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+ <!--
+ - This is a sample configuration for log4j.
+ - It simply just logs everything into a single log file.
+ - Note, that you can use properties for value substitution.
+ -->
+ <appender name="CORE" class="org.apache.log4j.FileAppender">
+ <param name="File" value="./target/work/log/log4j.log"/>
+ <param name="Append" value="true"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %t %-5p %c{2} - %m%n"/>
+ </layout>
+ </appender>
+
+ $if(useConsoleAppender)$
+ <appender name="CORE_CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p %t %c - %m%n"/>
+ </layout>
+ </appender>
+
+ $endif$
+ $if(useSocketAppender)$
+ <appender name="CORE_SOCKET" class="org.apache.log4j.SocketAppender">
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p %t %c - %m%n"/>
+ </layout>
+ </appender>
+
+ $endif$
+ <root>
+ <priority value="\${org.apache.cocoon.log4j.loglevel}"/>
+ <appender-ref ref="CORE" />
+ $if(useConsoleAppender)$
+ <appender-ref ref="CORE_CONSOLE"/>
+ $endif$
+ $if(useConsoleAppender)$
+ <appender-ref ref="CORE_SOCKET"/>
+ $endif$
+ </root>
+</log4j:configuration>
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/log4j.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/log4j.xml
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/log4j.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/web.xml?rev=630114&view=auto
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/web.xml (added)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/web.xml Fri Feb 22 00:02:35 2008
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+
+ <context-param>
+ <param-name>contextClass</param-name>
+ <param-value>org.apache.cocoon.tools.rcl.springreloader.SynchronizedConfigureableWebApplicationContext</param-value>
+ </context-param>
+
+ <filter>
+ <filter-name>ReloadingSpringFilter</filter-name>
+ <display-name>ReloadingSpringFilter</display-name>
+ <description>Reloads the Spring application context if a classloader change was detected.</description>
+ <filter-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingSpringFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>ReloadingSpringFilter</filter-name>
+ <servlet-name>DispatcherServlet</servlet-name>
+ </filter-mapping>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>DispatcherServlet</servlet-name>
+ <display-name>DispatcherServlet</display-name>
+ <description>Cocoon blocks dispatcher</description>
+ <servlet-class>org.apache.cocoon.servletservice.DispatcherServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>DispatcherServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>DispatcherServlet</servlet-name>
+ <url-pattern>*.jsp</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>DispatcherServlet</servlet-name>
+ <url-pattern>*.html</url-pattern>
+ </servlet-mapping>
+
+ <!-- various MIME type mappings ====================================== -->
+ <mime-mapping>
+ <extension>css</extension>
+ <mime-type>text/css</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xml</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xsl</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xmap</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ent</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>grm</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+
+</web-app>
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/trunk/tools/cocoon-maven-plugin/src/main/resources/org/apache/cocoon/maven/rcl/profiles/ssf/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: cocoon/trunk/tools/cocoon-maven-plugin/src/test/java/org/apache/cocoon/maven/rcl/RwmPropertiesTest.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/test/java/org/apache/cocoon/maven/rcl/RwmPropertiesTest.java?rev=630114&r1=630113&r2=630114&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/src/test/java/org/apache/cocoon/maven/rcl/RwmPropertiesTest.java (original)
+++ cocoon/trunk/tools/cocoon-maven-plugin/src/test/java/org/apache/cocoon/maven/rcl/RwmPropertiesTest.java Fri Feb 22 00:02:35 2008
@@ -95,7 +95,7 @@
protected InputStream readResourceFromClassloader(String fileName) {
String resource = RwmPropertiesTest.class.getPackage().getName().replace('.', '/') + "/" + fileName;
- return ReloadingWebappMojo.class.getClassLoader().getResourceAsStream(resource);
+ return PrepareWebappMojo.class.getClassLoader().getResourceAsStream(resource);
}
}