You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by dr...@apache.org on 2009/12/30 08:40:29 UTC
svn commit: r894554 - in
/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test: app6/
app6/WEB-INF/ java/org/apache/tapestry5/integration/ java/org/example/
java/org/example/pages/ java/org/example/services/ resources/org/example/
resources/o...
Author: drobiazko
Date: Wed Dec 30 07:40:28 2009
New Revision: 894554
URL: http://svn.apache.org/viewvc?rev=894554&view=rev
Log:
Added new Integration App with a root package that doesn not start with org.apache. This app will be used to prove that the fix for static classpath resources in classpath is working
Added:
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/AssetProtectionDemo.tml
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/Index.tml
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/WEB-INF/
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/WEB-INF/web.xml (with props)
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/CutomAppPackageIntegrationTests.java (with props)
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/AssetProtectionDemo.java (with props)
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/Index.java (with props)
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/services/
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/services/AppModule.java (with props)
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/resources/org/example/
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/resources/org/example/pages/
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/resources/org/example/pages/style.css (with props)
Added: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/AssetProtectionDemo.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/AssetProtectionDemo.tml?rev=894554&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/AssetProtectionDemo.tml (added)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/AssetProtectionDemo.tml Wed Dec 30 07:40:28 2009
@@ -0,0 +1,5 @@
+<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
+ <body>
+ <a href="${style}">Show CSS</a>
+ </body>
+</html>
Added: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/Index.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/Index.tml?rev=894554&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/Index.tml (added)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/Index.tml Wed Dec 30 07:40:28 2009
@@ -0,0 +1,11 @@
+<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+ <head>
+ <title>Index</title>
+ </head>
+ <body>
+ <h1>Index</h1>
+ <p>
+ <t:pagelink page="assetprotectiondemo">Asset Protection Demo</t:pagelink>
+ </p>
+ </body>
+</html>
\ No newline at end of file
Added: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/WEB-INF/web.xml?rev=894554&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/WEB-INF/web.xml (added)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/WEB-INF/web.xml Wed Dec 30 07:40:28 2009
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2009 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.
+-->
+
+<!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>
+ <display-name>Integration Test App 6</display-name>
+ <context-param>
+ <param-name>tapestry.app-package</param-name>
+ <param-value>org.example</param-value>
+ </context-param>
+ <filter>
+ <filter-name>app</filter-name>
+ <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>app</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+</web-app>
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app6/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/CutomAppPackageIntegrationTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/CutomAppPackageIntegrationTests.java?rev=894554&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/CutomAppPackageIntegrationTests.java (added)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/CutomAppPackageIntegrationTests.java Wed Dec 30 07:40:28 2009
@@ -0,0 +1,42 @@
+// Copyright 2007, 2008 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.tapestry5.integration;
+
+import org.apache.tapestry5.test.AbstractIntegrationTestSuite;
+import org.testng.annotations.Test;
+
+/**
+ * Additional integration tests that do not fit with the main group due to the need for special configuration.
+ */
+@Test(timeOut = 50000, sequential = true, groups = {"integration"})
+public class CutomAppPackageIntegrationTests extends AbstractIntegrationTestSuite
+{
+
+ public CutomAppPackageIntegrationTests()
+ {
+ super("src/test/app6");
+ }
+
+
+ /** TAP5-815 */
+ @Test
+ public void asset_protection()
+ {
+ start("Asset Protection Demo");
+ clickAndWait("link=Show CSS");
+ assertTextPresent("//Some CSS");
+ }
+
+}
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/CutomAppPackageIntegrationTests.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/CutomAppPackageIntegrationTests.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/AssetProtectionDemo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/AssetProtectionDemo.java?rev=894554&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/AssetProtectionDemo.java (added)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/AssetProtectionDemo.java Wed Dec 30 07:40:28 2009
@@ -0,0 +1,28 @@
+// Copyright 2009 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.example.pages;
+
+import org.apache.tapestry5.Asset;
+import org.apache.tapestry5.annotations.Path;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.ioc.annotations.Inject;
+
+public class AssetProtectionDemo
+{
+ @Inject
+ @Path("style.css")
+ @Property
+ private Asset style;
+}
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/AssetProtectionDemo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/AssetProtectionDemo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/Index.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/Index.java?rev=894554&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/Index.java (added)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/Index.java Wed Dec 30 07:40:28 2009
@@ -0,0 +1,10 @@
+/**
+ *
+ */
+package org.example.pages;
+
+
+public class Index
+{
+
+}
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/Index.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/pages/Index.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/services/AppModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/services/AppModule.java?rev=894554&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/services/AppModule.java (added)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/services/AppModule.java Wed Dec 30 07:40:28 2009
@@ -0,0 +1,34 @@
+// Copyright 2009 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.example.services;
+
+import org.apache.tapestry5.internal.InternalConstants;
+import org.apache.tapestry5.ioc.Configuration;
+import org.apache.tapestry5.ioc.annotations.Symbol;
+
+public class AppModule
+{
+
+ public void contributeRegexAuthorizer(final Configuration<String> regex,
+ @Symbol(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM)
+ final String appPackageName)
+ {
+
+ final String pattern = "([^/.]+/)*[^/.]+\\.((css)|(js)|(jpg)|(jpeg)|(png)|(gif))$";
+
+ regex.add("^" + appPackageName.replace(".", "/") + "/" + pattern);
+
+ }
+}
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/services/AppModule.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/example/services/AppModule.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/resources/org/example/pages/style.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/resources/org/example/pages/style.css?rev=894554&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/resources/org/example/pages/style.css (added)
+++ tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/resources/org/example/pages/style.css Wed Dec 30 07:40:28 2009
@@ -0,0 +1 @@
+//Some CSS
\ No newline at end of file
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/resources/org/example/pages/style.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/resources/org/example/pages/style.css
------------------------------------------------------------------------------
svn:mime-type = text/plain