[pkg-java] r10878 - in trunk/libspring-2.5-java/debian: . patches
Damien Raude-Morvan
drazzib at alioth.debian.org
Sat Oct 24 18:56:07 UTC 2009
Author: drazzib
Date: 2009-10-24 18:56:07 +0000 (Sat, 24 Oct 2009)
New Revision: 10878
Added:
trunk/libspring-2.5-java/debian/patches/13_tiles_22.dpatch
Modified:
trunk/libspring-2.5-java/debian/README.Debian
trunk/libspring-2.5-java/debian/changelog
trunk/libspring-2.5-java/debian/classpath-debian
trunk/libspring-2.5-java/debian/control
trunk/libspring-2.5-java/debian/patches/00list
Log:
* New 13_tiles_22 patch for compatibility with Tiles 2.2
- Describe this change in README.Debian
- Bump Build-Depends on libtiles-java (>= 2.2.0)
* Also bump Build-Depends on aspectj (>= 1.6.4)
* Remove unneeded Build-Depends on libservlet2.4-java
Modified: trunk/libspring-2.5-java/debian/README.Debian
===================================================================
--- trunk/libspring-2.5-java/debian/README.Debian 2009-10-24 18:55:56 UTC (rev 10877)
+++ trunk/libspring-2.5-java/debian/README.Debian 2009-10-24 18:56:07 UTC (rev 10878)
@@ -71,4 +71,7 @@
AspectJ 1.6.4 instead of AspectJ 1.4
see debian/patches/12_aspectj_164.dpatch in debian diff
+Tiles 2.2 instead of Tiles 2.0
+ see debian/patches/13_tiles_22.dpatch in debian diff
+
-- Damien Raude-Morvan <drazzib at debian.org> Wed, 23 Sep 2009 20:30:00 +0200
Modified: trunk/libspring-2.5-java/debian/changelog
===================================================================
--- trunk/libspring-2.5-java/debian/changelog 2009-10-24 18:55:56 UTC (rev 10877)
+++ trunk/libspring-2.5-java/debian/changelog 2009-10-24 18:56:07 UTC (rev 10878)
@@ -1,3 +1,13 @@
+libspring-2.5-java (2.5.6.SEC01-6) unstable; urgency=low
+
+ * New 13_tiles_22 patch for compatibility with Tiles 2.2
+ - Describe this change in README.Debian
+ - Bump Build-Depends on libtiles-java (>= 2.2.0)
+ * Also bump Build-Depends on aspectj (>= 1.6.4)
+ * Remove unneeded Build-Depends on libservlet2.4-java
+
+ -- Damien Raude-Morvan <drazzib at debian.org> Sat, 24 Oct 2009 20:46:45 +0200
+
libspring-2.5-java (2.5.6.SEC01-5) unstable; urgency=low
* cglib2.1 (2.1.3) to cglib (2.2) transition:
Modified: trunk/libspring-2.5-java/debian/classpath-debian
===================================================================
--- trunk/libspring-2.5-java/debian/classpath-debian 2009-10-24 18:55:56 UTC (rev 10877)
+++ trunk/libspring-2.5-java/debian/classpath-debian 2009-10-24 18:56:07 UTC (rev 10878)
@@ -35,7 +35,7 @@
usr/share/java/quartz-all.jar
usr/share/java/tiles-api.jar
usr/share/java/tiles-core.jar
-usr/share/java/tiles-core.jar
+usr/share/java/tiles-servlet.jar
usr/share/java/tiles-jsp.jar
usr/share/java/velocity-tools-view.jar
usr/share/java/hibernate3.jar
Modified: trunk/libspring-2.5-java/debian/control
===================================================================
--- trunk/libspring-2.5-java/debian/control 2009-10-24 18:55:56 UTC (rev 10877)
+++ trunk/libspring-2.5-java/debian/control 2009-10-24 18:56:07 UTC (rev 10878)
@@ -6,13 +6,13 @@
Build-Depends: dpatch, debhelper (>= 5), ant, openjdk-6-jdk
Build-Depends-Indep: libcommons-logging-java, libcommons-attributes-java (>= 2.2-4), libaopalliance-java,
libjamon-java, libcommons-pool-java, libcommons-collections3-java, libbackport-util-concurrent-java, libasm2-java,
- libc3p0-java, libgnumail-java, libservlet2.4-java, libjdo-api-java, libcommons-httpclient-java, libaxis-java, groovy,
+ libc3p0-java, libgnumail-java, libjdo-api-java, libcommons-httpclient-java, libaxis-java, groovy,
jruby1.2, libfreemarker-java, velocity, liblog4j1.2-java, libcommons-fileupload-java,
libjakarta-poi-java, libjexcelapi-java, libitext-java, libstruts1.2-java, libdom4j-java,
libcglib-java, bsh, glassfish-javaee, glassfish-appserv, libqdox-java, libjarjar-java,
libhibernate3-java, libhibernate-commons-annotations-java, libhibernate-annotations-java,
- libehcache-java, libibatis-java, libquartz-java, libxapool-java, libtiles-java, libvelocity-tools-java,
- glassfish-toplink-essentials, libtomcat6-java, junit4 (>= 4.5), testng, aspectj, libjasperreports-java
+ libehcache-java, libibatis-java, libquartz-java, libxapool-java, libtiles-java (>= 2.2.0), libvelocity-tools-java,
+ glassfish-toplink-essentials, libtomcat6-java, junit4 (>= 4.5), testng, aspectj (>= 1.6.4), libjasperreports-java
Standards-Version: 3.8.3
Homepage: http://springframework.org/about
Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/libspring-2.5-java/
Modified: trunk/libspring-2.5-java/debian/patches/00list
===================================================================
--- trunk/libspring-2.5-java/debian/patches/00list 2009-10-24 18:55:56 UTC (rev 10877)
+++ trunk/libspring-2.5-java/debian/patches/00list 2009-10-24 18:56:07 UTC (rev 10878)
@@ -4,10 +4,10 @@
04_remove_oc4j_weaving
05_remove_glassfish_weaving
06_no_jsf
-#07_no_aspectj
08_use_glasshfish_toplink
09_junit_45
10_jruby_11
11_servlet_jsp_api
12_aspectj_164
+13_tiles_22
Added: trunk/libspring-2.5-java/debian/patches/13_tiles_22.dpatch
===================================================================
--- trunk/libspring-2.5-java/debian/patches/13_tiles_22.dpatch (rev 0)
+++ trunk/libspring-2.5-java/debian/patches/13_tiles_22.dpatch 2009-10-24 18:56:07 UTC (rev 10878)
@@ -0,0 +1,281 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 13_tiles_22.dpatch by Damien Raude-Morvan <drazzib at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Tiles 2.2 compatibility patch.
+## DP: from SpringFramework 3.0
+## DP: <https://fisheye.springsource.org/changelog/spring-framework?cs=1488>
+
+ at DPATCH@
+diff -urNad libspring-2.5-java~/src/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java libspring-2.5-java/src/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java
+--- libspring-2.5-java~/src/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java 2009-10-22 23:59:37.013231035 +0200
++++ libspring-2.5-java/src/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java 2009-10-23 00:06:34.149730481 +0200
+@@ -17,12 +17,13 @@
+ package org.springframework.web.servlet.view.tiles2;
+
+ import javax.servlet.ServletRequest;
++import javax.servlet.ServletContext;
+
+ import org.apache.tiles.TilesException;
+ import org.apache.tiles.context.TilesRequestContext;
+ import org.apache.tiles.preparer.PreparerFactory;
+ import org.apache.tiles.preparer.ViewPreparer;
+-import org.apache.tiles.servlet.context.ServletTilesApplicationContext;
++import org.apache.tiles.servlet.context.ServletTilesRequestContext;
+
+ import org.springframework.web.context.WebApplicationContext;
+ import org.springframework.web.servlet.support.RequestContextUtils;
+@@ -45,16 +46,16 @@
+ if (context.getRequest() instanceof ServletRequest) {
+ servletRequest = (ServletRequest) context.getRequest();
+ }
+- ServletTilesApplicationContext tilesApplicationContext = null;
+- if (context instanceof ServletTilesApplicationContext) {
+- tilesApplicationContext = (ServletTilesApplicationContext) context;
++ ServletTilesRequestContext tilesApplicationContext = null;
++ if (context instanceof ServletTilesRequestContext) {
++ tilesApplicationContext = (ServletTilesRequestContext) context;
+ }
+ if (servletRequest == null && tilesApplicationContext == null) {
+ throw new IllegalStateException("SpringBeanPreparerFactory requires either a " +
+- "ServletRequest or a ServletTilesApplicationContext to operate on");
++ "ServletRequest or a ServletTilesRequestContext to operate on");
+ }
+ WebApplicationContext webApplicationContext = RequestContextUtils.getWebApplicationContext(
+- servletRequest, tilesApplicationContext.getServletContext());
++ servletRequest, (ServletContext) tilesApplicationContext.getContext());
+ return getPreparer(name, webApplicationContext);
+ }
+
+diff -urNad libspring-2.5-java~/src/org/springframework/web/servlet/view/tiles2/SpringLocaleResolver.java libspring-2.5-java/src/org/springframework/web/servlet/view/tiles2/SpringLocaleResolver.java
+--- libspring-2.5-java~/src/org/springframework/web/servlet/view/tiles2/SpringLocaleResolver.java 2009-10-22 23:59:37.013231035 +0200
++++ libspring-2.5-java/src/org/springframework/web/servlet/view/tiles2/SpringLocaleResolver.java 2009-10-22 23:59:38.945231027 +0200
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright 2002-2007 the original author or authors.
++ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+@@ -17,11 +17,13 @@
+ package org.springframework.web.servlet.view.tiles2;
+
+ import java.util.Locale;
+-
+ import javax.servlet.http.HttpServletRequest;
++import javax.servlet.jsp.PageContext;
+
+ import org.apache.tiles.context.TilesRequestContext;
++import org.apache.tiles.jsp.context.JspTilesRequestContext;
+ import org.apache.tiles.locale.impl.DefaultLocaleResolver;
++import org.apache.tiles.servlet.context.ServletTilesRequestContext;
+
+ import org.springframework.web.servlet.support.RequestContextUtils;
+
+@@ -41,8 +43,12 @@
+ public class SpringLocaleResolver extends DefaultLocaleResolver {
+
+ public Locale resolveLocale(TilesRequestContext context) {
+- if (context.getRequest() instanceof HttpServletRequest) {
+- return RequestContextUtils.getLocale((HttpServletRequest) context.getRequest());
++ if (context instanceof ServletTilesRequestContext) {
++ return RequestContextUtils.getLocale(((ServletTilesRequestContext) context).getRequest());
++ }
++ else if (context instanceof JspTilesRequestContext) {
++ PageContext pc = ((JspTilesRequestContext) context).getPageContext();
++ return RequestContextUtils.getLocale((HttpServletRequest) pc.getRequest());
+ }
+ else {
+ return super.resolveLocale(context);
+diff -urNad libspring-2.5-java~/src/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java libspring-2.5-java/src/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java
+--- libspring-2.5-java~/src/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java 2009-10-22 23:59:37.013231035 +0200
++++ libspring-2.5-java/src/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java 2009-10-22 23:59:38.945231027 +0200
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright 2002-2007 the original author or authors.
++ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+@@ -18,23 +18,23 @@
+
+ import java.util.Enumeration;
+ import java.util.Properties;
+-
+ import javax.servlet.ServletConfig;
+ import javax.servlet.ServletContext;
+
+ import org.apache.commons.logging.Log;
+ import org.apache.commons.logging.LogFactory;
+-import org.apache.tiles.TilesContainer;
+ import org.apache.tiles.TilesException;
+-import org.apache.tiles.access.TilesAccess;
+-import org.apache.tiles.context.ChainedTilesContextFactory;
+-import org.apache.tiles.definition.UrlDefinitionsFactory;
++import org.apache.tiles.context.AbstractTilesApplicationContextFactory;
++import org.apache.tiles.definition.DefinitionsFactory;
+ import org.apache.tiles.definition.digester.DigesterDefinitionsReader;
++import org.apache.tiles.evaluator.el.ELAttributeEvaluator;
+ import org.apache.tiles.factory.TilesContainerFactory;
+-import org.apache.tiles.impl.BasicTilesContainer;
+-import org.apache.tiles.jsp.context.JspTilesContextFactory;
+ import org.apache.tiles.preparer.BasicPreparerFactory;
+-import org.apache.tiles.servlet.context.ServletTilesContextFactory;
++import org.apache.tiles.servlet.context.ServletTilesApplicationContext;
++import org.apache.tiles.servlet.context.ServletUtil;
++import org.apache.tiles.servlet.context.wildcard.WildcardServletTilesApplicationContextFactory;
++import org.apache.tiles.startup.BasicTilesInitializer;
++import org.apache.tiles.startup.TilesInitializer;
+ import org.apache.tiles.web.util.ServletContextAdapter;
+
+ import org.springframework.beans.factory.DisposableBean;
+@@ -48,15 +48,15 @@
+ * <a href="http://tiles.apache.org">http://tiles.apache.org</a>
+ * for more information about Tiles, which basically is a templating
+ * mechanism for JSP-based web applications.
++ * <b>Note: Spring 3.0 requires Tiles 2.1.2 or above.</b>
+ *
+- * <p>The TilesConfigurer simply configures a TilesContainer using a set
+- * of files containing definitions, to be accessed by {@link TilesView}
+- * instances.
++ * <p>The TilesConfigurer simply configures a TilesContainer using a set of files
++ * containing definitions, to be accessed by {@link TilesView} instances. This is a
++ * Spring-based alternative (for usage in Spring configuration) to the Tiles-provided
++ * {@link org.apache.tiles.web.startup.TilesListener} (for usage in <code>web.xml</code>).
+ *
+ * <p>TilesViews can be managed by any {@link org.springframework.web.servlet.ViewResolver}.
+- * For simple convention-based view resolution, consider using
+- * {@link org.springframework.web.servlet.view.UrlBasedViewResolver} with the
+- * "viewClass" property set to "org.springframework.web.servlet.view.tiles2.TilesView".
++ * For simple convention-based view resolution, consider using {@link TilesViewResolver}.
+ *
+ * <p>A typical TilesConfigurer bean definition looks as follows:
+ *
+@@ -73,12 +73,12 @@
+ * </property>
+ * </bean></pre>
+ *
+- * The values in the list are the actual files containing the definitions.
++ * The values in the list are the actual Tiles XML files containing the definitions.
+ *
+ * @author Juergen Hoeller
+ * @since 2.5
+ * @see TilesView
+- * @see org.springframework.web.servlet.view.UrlBasedViewResolver
++ * @see TilesViewResolver
+ */
+ public class TilesConfigurer implements ServletContextAware, InitializingBean, DisposableBean {
+
+@@ -90,24 +90,16 @@
+
+
+ public TilesConfigurer() {
+- this.tilesPropertyMap.put(
+- TilesContainerFactory.CONTAINER_FACTORY_INIT_PARAM,
+- TilesContainerFactory.class.getName());
+- this.tilesPropertyMap.put(
+- TilesContainerFactory.CONTEXT_FACTORY_INIT_PARAM,
+- ChainedTilesContextFactory.class.getName());
+- this.tilesPropertyMap.put(
+- TilesContainerFactory.DEFINITIONS_FACTORY_INIT_PARAM,
+- UrlDefinitionsFactory.class.getName());
+- this.tilesPropertyMap.put(
+- TilesContainerFactory.PREPARER_FACTORY_INIT_PARAM,
++ this.tilesPropertyMap.put(AbstractTilesApplicationContextFactory.APPLICATION_CONTEXT_FACTORY_INIT_PARAM,
++ WildcardServletTilesApplicationContextFactory.class.getName());
++ this.tilesPropertyMap.put(TilesContainerFactory.PREPARER_FACTORY_INIT_PARAM,
+ BasicPreparerFactory.class.getName());
+- this.tilesPropertyMap.put(
+- ChainedTilesContextFactory.FACTORY_CLASS_NAMES,
+- ServletTilesContextFactory.class.getName() + "," + JspTilesContextFactory.class.getName());
+- this.tilesPropertyMap.put(
+- UrlDefinitionsFactory.LOCALE_RESOLVER_IMPL_PROPERTY,
++ this.tilesPropertyMap.put(DefinitionsFactory.LOCALE_RESOLVER_IMPL_PROPERTY,
+ SpringLocaleResolver.class.getName());
++ this.tilesPropertyMap.put(TilesContainerFactory.ATTRIBUTE_EVALUATOR_INIT_PARAM,
++ ELAttributeEvaluator.class.getName());
++ this.tilesPropertyMap.put(TilesContainerFactory.CONTAINER_FACTORY_MUTABLE_INIT_PARAM,
++ Boolean.toString(false));
+ }
+
+
+@@ -121,7 +113,7 @@
+ if (logger.isInfoEnabled()) {
+ logger.info("TilesConfigurer: adding definitions [" + defs + "]");
+ }
+- this.tilesPropertyMap.put(BasicTilesContainer.DEFINITIONS_CONFIG, defs);
++ this.tilesPropertyMap.put(DefinitionsFactory.DEFINITIONS_CONFIG, defs);
+ }
+ }
+
+@@ -194,24 +186,23 @@
+
+
+ /**
+- * Creates and exposes a TilesContainer for this web application.
++ * Creates and exposes a TilesContainer for this web application,
++ * delegating to the TilesInitializer.
+ * @throws TilesException in case of setup failure
++ * @see #createTilesInitializer()
+ */
+ public void afterPropertiesSet() throws TilesException {
+- TilesContainer container = createTilesContainer(this.servletContext);
+- TilesAccess.setContainer(this.servletContext, container);
++ ServletContextAdapter adaptedContext = new ServletContextAdapter(new DelegatingServletConfig());
++ createTilesInitializer().initialize(new ServletTilesApplicationContext(adaptedContext));
+ }
+
+ /**
+- * Create a TilesContainer for this web application.
+- * @param context this web application's ServletContext
+- * @return the TilesContainer to expose
+- * @throws TilesException in case of setup failure
++ * Creates a new instance of {@link org.apache.tiles.startup.BasicTilesInitializer}.
++ * Override it to use a different initializer.
++ * @see org.apache.tiles.web.startup.TilesListener#createTilesInitializer()
+ */
+- protected TilesContainer createTilesContainer(ServletContext context) throws TilesException {
+- ServletContextAdapter adaptedContext = new ServletContextAdapter(new DelegatingServletConfig());
+- TilesContainerFactory factory = TilesContainerFactory.getFactory(adaptedContext);
+- return factory.createContainer(adaptedContext);
++ protected TilesInitializer createTilesInitializer() {
++ return new BasicTilesInitializer();
+ }
+
+ /**
+@@ -219,7 +210,7 @@
+ * @throws TilesException in case of cleanup failure
+ */
+ public void destroy() throws TilesException {
+- TilesAccess.setContainer(this.servletContext, null);
++ ServletUtil.setContainer(this.servletContext, null);
+ }
+
+
+diff -urNad libspring-2.5-java~/src/org/springframework/web/servlet/view/tiles2/TilesView.java libspring-2.5-java/src/org/springframework/web/servlet/view/tiles2/TilesView.java
+--- libspring-2.5-java~/src/org/springframework/web/servlet/view/tiles2/TilesView.java 2009-10-22 23:59:37.013231035 +0200
++++ libspring-2.5-java/src/org/springframework/web/servlet/view/tiles2/TilesView.java 2009-10-22 23:59:38.945231027 +0200
+@@ -23,8 +23,13 @@
+ import javax.servlet.http.HttpServletRequest;
+ import javax.servlet.http.HttpServletResponse;
+
++import org.apache.tiles.TilesApplicationContext;
+ import org.apache.tiles.TilesContainer;
+-import org.apache.tiles.access.TilesAccess;
++import org.apache.tiles.context.TilesRequestContext;
++import org.apache.tiles.impl.BasicTilesContainer;
++import org.apache.tiles.servlet.context.ServletTilesApplicationContext;
++import org.apache.tiles.servlet.context.ServletTilesRequestContext;
++import org.apache.tiles.servlet.context.ServletUtil;
+
+ import org.springframework.web.servlet.support.JstlUtils;
+ import org.springframework.web.servlet.support.RequestContext;
+@@ -53,7 +58,7 @@
+ throws Exception {
+
+ ServletContext servletContext = getServletContext();
+- TilesContainer container = TilesAccess.getContainer(servletContext);
++ TilesContainer container = ServletUtil.getContainer(servletContext);
+ if (container == null) {
+ throw new ServletException("Tiles container is not initialized. " +
+ "Have you added a TilesConfigurer to your web application context?");
Property changes on: trunk/libspring-2.5-java/debian/patches/13_tiles_22.dpatch
___________________________________________________________________
Added: svn:executable
+ *
More information about the pkg-java-commits
mailing list