[Jsptest-svn-commits] SF.net SVN: jsptest: [206] tags
Status: Alpha
Brought to you by:
lkoskela
|
From: <lko...@us...> - 2008-04-09 17:55:55
|
Revision: 206
http://jsptest.svn.sourceforge.net/jsptest/?rev=206&view=rev
Author: lkoskela
Date: 2008-04-09 10:55:41 -0700 (Wed, 09 Apr 2008)
Log Message:
-----------
[maven-release-plugin] copy for tag jsptest-0.14
Added Paths:
-----------
tags/jsptest-0.14/
tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java
tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
tags/jsptest-0.14/jsptest-acceptance/pom.xml
tags/jsptest-0.14/jsptest-generic/
tags/jsptest-0.14/jsptest-generic/jsptest-common/pom.xml
tags/jsptest-0.14/jsptest-generic/jsptest-compiler-api/pom.xml
tags/jsptest-0.14/jsptest-generic/jsptest-framework/
tags/jsptest-0.14/jsptest-generic/jsptest-framework/pom.xml
tags/jsptest-0.14/jsptest-generic/jsptest-framework/src/
tags/jsptest-0.14/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java
tags/jsptest-0.14/jsptest-generic/pom.xml
tags/jsptest-0.14/jsptest-jsp12/pom.xml
tags/jsptest-0.14/jsptest-jsp20/pom.xml
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ClasspathTldLocator.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/MockTldLocationsCache.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldLocation.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldUriMappings.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/WebInfLibTldLocator.java
tags/jsptest-0.14/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/
tags/jsptest-0.14/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TestClasspathTldLocator.java
tags/jsptest-0.14/jsptest-jsp20/src/test/resources/META-INF/
tags/jsptest-0.14/jsptest-jsp21/pom.xml
tags/jsptest-0.14/pom.xml
Removed Paths:
-------------
tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java
tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
tags/jsptest-0.14/jsptest-acceptance/pom.xml
tags/jsptest-0.14/jsptest-generic/
tags/jsptest-0.14/jsptest-generic/jsptest-common/pom.xml
tags/jsptest-0.14/jsptest-generic/jsptest-compiler-api/pom.xml
tags/jsptest-0.14/jsptest-generic/jsptest-framework/
tags/jsptest-0.14/jsptest-generic/jsptest-framework/pom.xml
tags/jsptest-0.14/jsptest-generic/jsptest-framework/src/
tags/jsptest-0.14/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java
tags/jsptest-0.14/jsptest-generic/pom.xml
tags/jsptest-0.14/jsptest-jsp12/pom.xml
tags/jsptest-0.14/jsptest-jsp20/pom.xml
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockTldLocationsCache.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ClasspathTldLocator.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/MockTldLocationsCache.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldLocation.java
tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/WebInfLibTldLocator.java
tags/jsptest-0.14/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TestClasspathTldLocator.java
tags/jsptest-0.14/jsptest-jsp21/pom.xml
tags/jsptest-0.14/pom.xml
Copied: tags/jsptest-0.14 (from rev 199, trunk)
Deleted: tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-04-04 07:01:10 UTC (rev 199)
+++ tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<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">
- <parent>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-acceptance</artifactId>
- <version>0.14-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-acceptance-jsp12</artifactId>
- <packaging>jar</packaging>
- <name>Acceptance tests for the JspTest variant for the JSP 1.2 specification.</name>
- <description />
- <dependencies>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-jsp12</artifactId>
- </dependency>
- </dependencies>
-</project>
Copied: tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml (from rev 205, trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml)
===================================================================
--- tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml (rev 0)
+++ tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-acceptance</artifactId>
+ <version>0.14</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-acceptance-jsp12</artifactId>
+ <packaging>jar</packaging>
+ <name>Acceptance tests for the JspTest variant for the JSP 1.2 specification.</name>
+ <description />
+ <dependencies>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-jsp12</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Deleted: tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-04-04 07:01:10 UTC (rev 199)
+++ tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<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">
- <parent>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-acceptance</artifactId>
- <version>0.14-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-acceptance-jsp20</artifactId>
- <packaging>jar</packaging>
- <name>Acceptance tests for the JspTest variant for the JSP 2.0 specification.</name>
- <description />
- <dependencies>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-jsp20</artifactId>
- </dependency>
- </dependencies>
-</project>
Copied: tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml (from rev 205, trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml)
===================================================================
--- tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml (rev 0)
+++ tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-acceptance</artifactId>
+ <version>0.14</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-acceptance-jsp20</artifactId>
+ <packaging>jar</packaging>
+ <name>Acceptance tests for the JspTest variant for the JSP 2.0 specification.</name>
+ <description />
+ <dependencies>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-jsp20</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Deleted: tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java 2008-04-04 07:01:10 UTC (rev 199)
+++ tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,54 +0,0 @@
-/*
- * Copyright 2007 Lasse Koskela.
- *
- * 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 net.sf.jsptest.acceptance.jsp;
-
-import net.sf.jsptest.JspTestCase;
-
-/**
- * Unit testing JavaServer Pages has never been this easy!
- */
-public class RequestAndSessionAttributeTest extends JspTestCase {
-
- protected String getWebRoot() {
- return "src/test/resources/websrc";
- }
-
- public void testRequestAttributes() throws Exception {
- setRequestAttribute("Rn1", "Rv1");
- setRequestAttribute("Rn2", "Rv2");
- get("/echo_attributes.jsp");
- output().shouldContain("request attribute: 'Rn1'='Rv1'");
- output().shouldContain("request attribute: 'Rn2'='Rv2'");
- }
-
- public void testSessionAttributes() throws Exception {
- setSessionAttribute("Sn1", "Sv1");
- setSessionAttribute("Sn2", "Sv2");
- get("/echo_attributes.jsp");
- output().shouldContain("session attribute: 'Sn1'='Sv1'");
- output().shouldContain("session attribute: 'Sn2'='Sv2'");
- }
-
- public void testSessionAndRequestAttributesDontOverrideEachOther()
- throws Exception {
- setRequestAttribute("name", "request");
- setSessionAttribute("name", "session");
- get("/echo_attributes.jsp");
- output().shouldContain("request attribute: 'name'='request'");
- output().shouldContain("session attribute: 'name'='session'");
- }
-}
Copied: tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java (from rev 202, trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java)
===================================================================
--- tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java (rev 0)
+++ tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2007 Lasse Koskela.
+ *
+ * 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 net.sf.jsptest.acceptance.jsp;
+
+import net.sf.jsptest.JspTestCase;
+
+/**
+ * Unit testing JavaServer Pages has never been this easy!
+ */
+public class RequestAndSessionAttributeTest extends JspTestCase {
+
+ protected String getWebRoot() {
+ return "src/test/resources/websrc";
+ }
+
+ public void testRequestAttributes() throws Exception {
+ setRequestAttribute("Rn1", "Rv1");
+ setRequestAttribute("Rn2", "Rv2");
+ get("/echo_attributes.jsp");
+ output().shouldContain("request attribute: 'Rn1'='Rv1'");
+ output().shouldContain("request attribute: 'Rn2'='Rv2'");
+ }
+
+ public void testSessionAttributes() throws Exception {
+ setSessionAttribute("Sn1", "Sv1");
+ setSessionAttribute("Sn2", "Sv2");
+ get("/echo_attributes.jsp");
+ output().shouldContain("session attribute: 'Sn1'='Sv1'");
+ output().shouldContain("session attribute: 'Sn2'='Sv2'");
+ }
+
+ public void testRequestAndSessionAttributesCanBeObjects()
+ throws Exception {
+ setRequestAttribute("request", (Object) "1");
+ setSessionAttribute("session", (Object) new Integer(2));
+ get("/echo_attributes.jsp");
+ output().shouldContain("request attribute: 'request'='1'");
+ output().shouldContain("session attribute: 'session'='2'");
+ }
+
+ public void testSessionAndRequestAttributesDontOverrideEachOther()
+ throws Exception {
+ setRequestAttribute("name", "request");
+ setSessionAttribute("name", "session");
+ get("/echo_attributes.jsp");
+ output().shouldContain("request attribute: 'name'='request'");
+ output().shouldContain("session attribute: 'name'='session'");
+ }
+}
Deleted: tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-04-04 07:01:10 UTC (rev 199)
+++ tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<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">
- <parent>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-acceptance</artifactId>
- <version>0.14-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-acceptance-jsp21</artifactId>
- <version>0.13-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>Acceptance tests for the JspTest variant for the JSP 2.1 specification.</name>
- <description />
- <dependencies>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-jsp21</artifactId>
- </dependency>
- </dependencies>
-</project>
Copied: tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml (from rev 205, trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml)
===================================================================
--- tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml (rev 0)
+++ tags/jsptest-0.14/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-acceptance</artifactId>
+ <version>0.14</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-acceptance-jsp21</artifactId>
+ <version>0.14</version>
+ <packaging>jar</packaging>
+ <name>Acceptance tests for the JspTest variant for the JSP 2.1 specification.</name>
+ <description />
+ <dependencies>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-jsp21</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Deleted: tags/jsptest-0.14/jsptest-acceptance/pom.xml
===================================================================
--- trunk/jsptest-acceptance/pom.xml 2008-04-04 07:01:10 UTC (rev 199)
+++ tags/jsptest-0.14/jsptest-acceptance/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<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">
- <parent>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest</artifactId>
- <version>0.14-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-acceptance</artifactId>
- <name>JspTest root project for acceptance test modules</name>
- <description>This POM acts as a virtual root for the acceptance test projects for different JSP specification variants of JspTest.</description>
- <packaging>pom</packaging>
- <modules>
- <module>jsptest-acceptance-jsp12</module>
- <module>jsptest-acceptance-jsp20</module>
- <module>jsptest-acceptance-jsp21</module>
- </modules>
-</project>
Copied: tags/jsptest-0.14/jsptest-acceptance/pom.xml (from rev 205, trunk/jsptest-acceptance/pom.xml)
===================================================================
--- tags/jsptest-0.14/jsptest-acceptance/pom.xml (rev 0)
+++ tags/jsptest-0.14/jsptest-acceptance/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest</artifactId>
+ <version>0.14</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-acceptance</artifactId>
+ <name>JspTest root project for acceptance test modules</name>
+ <description>This POM acts as a virtual root for the acceptance test projects for different JSP specification variants of JspTest.</description>
+ <packaging>pom</packaging>
+ <modules>
+ <module>jsptest-acceptance-jsp12</module>
+ <module>jsptest-acceptance-jsp20</module>
+ <module>jsptest-acceptance-jsp21</module>
+ </modules>
+</project>
Copied: tags/jsptest-0.14/jsptest-generic (from rev 201, trunk/jsptest-generic)
Deleted: tags/jsptest-0.14/jsptest-generic/jsptest-common/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-common/pom.xml 2008-04-09 17:38:59 UTC (rev 201)
+++ tags/jsptest-0.14/jsptest-generic/jsptest-common/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,34 +0,0 @@
-<?xml version="1.0"?>
-<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">
- <parent>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-generic</artifactId>
- <version>0.14-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-common</artifactId>
- <version>0.14-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>Common utilities</name>
- <description>Common utilities for the components of JspTest, including the JSP version-specific compiler implementations.</description>
- <profiles>
- <profile>
- <id>default-tools.jar</id>
- <activation>
- <property>
- <name>java.vendor</name>
- <value>Sun Microsystems Inc.</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>1.4.2</version>
- <scope>system</scope>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-</project>
Copied: tags/jsptest-0.14/jsptest-generic/jsptest-common/pom.xml (from rev 205, trunk/jsptest-generic/jsptest-common/pom.xml)
===================================================================
--- tags/jsptest-0.14/jsptest-generic/jsptest-common/pom.xml (rev 0)
+++ tags/jsptest-0.14/jsptest-generic/jsptest-common/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-generic</artifactId>
+ <version>0.14</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-common</artifactId>
+ <version>0.14</version>
+ <packaging>jar</packaging>
+ <name>Common utilities</name>
+ <description>Common utilities for the components of JspTest, including the JSP version-specific compiler implementations.</description>
+ <profiles>
+ <profile>
+ <id>default-tools.jar</id>
+ <activation>
+ <property>
+ <name>java.vendor</name>
+ <value>Sun Microsystems Inc.</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.4.2</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+</project>
Deleted: tags/jsptest-0.14/jsptest-generic/jsptest-compiler-api/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2008-04-09 17:38:59 UTC (rev 201)
+++ tags/jsptest-0.14/jsptest-generic/jsptest-compiler-api/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<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">
- <parent>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-generic</artifactId>
- <version>0.14-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-compiler-api</artifactId>
- <version>0.14-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>Internal compiler API</name>
- <description>A common internal API for the different versions of JSP version-specific compilers.</description>
-</project>
Copied: tags/jsptest-0.14/jsptest-generic/jsptest-compiler-api/pom.xml (from rev 205, trunk/jsptest-generic/jsptest-compiler-api/pom.xml)
===================================================================
--- tags/jsptest-0.14/jsptest-generic/jsptest-compiler-api/pom.xml (rev 0)
+++ tags/jsptest-0.14/jsptest-generic/jsptest-compiler-api/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-generic</artifactId>
+ <version>0.14</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-compiler-api</artifactId>
+ <version>0.14</version>
+ <packaging>jar</packaging>
+ <name>Internal compiler API</name>
+ <description>A common internal API for the different versions of JSP version-specific compilers.</description>
+</project>
Copied: tags/jsptest-0.14/jsptest-generic/jsptest-framework (from rev 202, trunk/jsptest-generic/jsptest-framework)
Deleted: tags/jsptest-0.14/jsptest-generic/jsptest-framework/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-framework/pom.xml 2008-04-09 17:46:22 UTC (rev 202)
+++ tags/jsptest-0.14/jsptest-generic/jsptest-framework/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<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">
- <parent>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-generic</artifactId>
- <version>0.14-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-framework</artifactId>
- <version>0.14-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>Core framework</name>
- <description>The core framework functionality for JspTest.</description>
- <dependencies>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-compiler-api</artifactId>
- <version>0.14-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-common</artifactId>
- <version>0.14-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project>
Copied: tags/jsptest-0.14/jsptest-generic/jsptest-framework/pom.xml (from rev 205, trunk/jsptest-generic/jsptest-framework/pom.xml)
===================================================================
--- tags/jsptest-0.14/jsptest-generic/jsptest-framework/pom.xml (rev 0)
+++ tags/jsptest-0.14/jsptest-generic/jsptest-framework/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-generic</artifactId>
+ <version>0.14</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-framework</artifactId>
+ <version>0.14</version>
+ <packaging>jar</packaging>
+ <name>Core framework</name>
+ <description>The core framework functionality for JspTest.</description>
+ <dependencies>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-compiler-api</artifactId>
+ <version>0.14</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-common</artifactId>
+ <version>0.14</version>
+ </dependency>
+ </dependencies>
+</project>
Copied: tags/jsptest-0.14/jsptest-generic/jsptest-framework/src (from rev 201, trunk/jsptest-generic/jsptest-framework/src)
Deleted: tags/jsptest-0.14/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java 2008-04-09 17:38:59 UTC (rev 201)
+++ tags/jsptest-0.14/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,174 +0,0 @@
-/*
- * Copyright 2007 Lasse Koskela.
- *
- * 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 net.sf.jsptest;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-import junit.framework.TestCase;
-import net.sf.jsptest.assertion.OutputAssertion;
-import net.sf.jsptest.compiler.api.Jsp;
-import net.sf.jsptest.compiler.api.JspCompiler;
-import net.sf.jsptest.compiler.api.JspCompilerFactory;
-import net.sf.jsptest.compiler.api.JspExecution;
-import net.sf.jsptest.utils.IO;
-
-/**
- * An abstract base class to be extended by the user. The <tt>JspTestCase</tt>
- * class provides a facility for rendering a JSP and a set of assertion methods
- * for verifying that the JSP under test renders the expected kind of output.
- *
- * @author Lasse Koskela
- */
-public abstract class JspTestCase extends TestCase {
-
- private Logger log;
-
- private Map requestAttributes;
-
- private Map sessionAttributes;
-
- private Map substituteTaglibs;
-
- private JspExecution execution;
-
- public JspTestCase() {
- log = Logger.getLogger(getClass());
- }
-
- protected void setUp() throws Exception {
- requestAttributes = new HashMap();
- sessionAttributes = new HashMap();
- substituteTaglibs = new HashMap();
- }
-
- /**
- * Override this method to tell the JSP compiler where the "web" files are
- * located. Defaults to the current working directory.
- */
- protected String getWebRoot() {
- return ".";
- }
-
- /**
- * Sets a session attribute for the current session.
- *
- * @param attribute
- * Name of the attribute.
- * @param value
- * Value for the attribute.
- */
- protected void setSessionAttribute(String attribute, String value) {
- sessionAttributes.put(attribute, value);
- }
-
- /**
- * Sets a request attribute for the next request.
- *
- * @param attribute
- * Name of the attribute.
- * @param value
- * Value for the attribute.
- */
- protected void setRequestAttribute(String attribute, String value) {
- requestAttributes.put(attribute, value);
- }
-
- /**
- * Simulate a HTTP GET request to the specified JSP file.
- *
- * @param path
- * The JSP file to render. The path should start with a "/"
- * and is interpreted to be relative to the web root
- * specified by <tt>getWebRoot</tt>.
- */
- protected void get(String path) throws Exception {
- request(path, "GET");
- }
-
- /**
- * Simulate a HTTP POST request to the specified JSP file.
- *
- * @param path
- * The JSP file to render. The path should start with a "/"
- * and is interpreted to be relative to the web root
- * specified by <tt>getWebRoot</tt>.
- */
- protected void post(String path) throws Exception {
- request(path, "POST");
- }
-
- protected void request(String path, String httpMethod)
- throws Exception {
- validatePath(path);
- JspCompiler compiler = JspCompilerFactory.newInstance();
- log.debug("Using compiler " + compiler.getClass().getName()
- + " and webroot "
- + new File(getWebRoot()).getAbsolutePath());
- compiler.setWebRoot(getWebRoot());
- compiler.setOutputDirectory(getOutputDirectory());
- Jsp jsp = compiler.compile(path, substituteTaglibs);
- log.debug("Simulating a request to " + path);
- execution = jsp.request(httpMethod, requestAttributes,
- sessionAttributes);
- }
-
- private void validatePath(String path) {
- if (!path.startsWith("/")) {
- throw new IllegalArgumentException(
- "The JSP path must start with a \"/\"");
- }
- }
-
- private String getOutputDirectory() {
- return "target/jsptest";
- }
-
- protected File getRenderedResponse() {
- return execution.getRenderedResponse();
- }
-
- /**
- * Returns a handle for making assertions about the rendered content.
- */
- public OutputAssertion output() {
- try {
- return new OutputAssertion(IO
- .readToString(getRenderedResponse()));
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Invoke this method to substitute the specified taglib with the given
- * implementation.
- *
- * @param name
- * The name of the taglib to replace.
- * @param newImplementation
- * The new (substitute) implementation to use.
- */
- protected void substituteTaglib(String name,
- Class newImplementation) {
- substituteTaglibs.put(name, newImplementation);
- }
-}
Copied: tags/jsptest-0.14/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java (from rev 202, trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java)
===================================================================
--- tags/jsptest-0.14/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java (rev 0)
+++ tags/jsptest-0.14/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2007 Lasse Koskela.
+ *
+ * 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 net.sf.jsptest;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+
+import junit.framework.TestCase;
+import net.sf.jsptest.assertion.OutputAssertion;
+import net.sf.jsptest.compiler.api.Jsp;
+import net.sf.jsptest.compiler.api.JspCompiler;
+import net.sf.jsptest.compiler.api.JspCompilerFactory;
+import net.sf.jsptest.compiler.api.JspExecution;
+import net.sf.jsptest.utils.IO;
+
+/**
+ * An abstract base class to be extended by the user. The <tt>JspTestCase</tt>
+ * class provides a facility for rendering a JSP and a set of assertion methods
+ * for verifying that the JSP under test renders the expected kind of output.
+ *
+ * @author Lasse Koskela
+ */
+public abstract class JspTestCase extends TestCase {
+
+ private Logger log;
+
+ private Map requestAttributes;
+
+ private Map sessionAttributes;
+
+ private Map substituteTaglibs;
+
+ private JspExecution execution;
+
+ public JspTestCase() {
+ log = Logger.getLogger(getClass());
+ }
+
+ protected void setUp() throws Exception {
+ requestAttributes = new HashMap();
+ sessionAttributes = new HashMap();
+ substituteTaglibs = new HashMap();
+ }
+
+ /**
+ * Override this method to tell the JSP compiler where the "web" files are
+ * located. Defaults to the current working directory.
+ */
+ protected String getWebRoot() {
+ return ".";
+ }
+
+ /**
+ * Sets a session attribute for the current session.
+ *
+ * @param attribute
+ * Name of the attribute.
+ * @param value
+ * Value for the attribute.
+ */
+ protected void setSessionAttribute(String attribute, Object value) {
+ sessionAttributes.put(attribute, value);
+ }
+
+ /**
+ * Sets a request attribute for the next request.
+ *
+ * @param attribute
+ * Name of the attribute.
+ * @param value
+ * Value for the attribute.
+ */
+ protected void setRequestAttribute(String attribute, Object value) {
+ requestAttributes.put(attribute, value);
+ }
+
+ /**
+ * Simulate a HTTP GET request to the specified JSP file.
+ *
+ * @param path
+ * The JSP file to render. The path should start with a "/"
+ * and is interpreted to be relative to the web root
+ * specified by <tt>getWebRoot</tt>.
+ */
+ protected void get(String path) throws Exception {
+ request(path, "GET");
+ }
+
+ /**
+ * Simulate a HTTP POST request to the specified JSP file.
+ *
+ * @param path
+ * The JSP file to render. The path should start with a "/"
+ * and is interpreted to be relative to the web root
+ * specified by <tt>getWebRoot</tt>.
+ */
+ protected void post(String path) throws Exception {
+ request(path, "POST");
+ }
+
+ protected void request(String path, String httpMethod)
+ throws Exception {
+ validatePath(path);
+ JspCompiler compiler = JspCompilerFactory.newInstance();
+ log.debug("Using compiler " + compiler.getClass().getName()
+ + " and webroot "
+ + new File(getWebRoot()).getAbsolutePath());
+ compiler.setWebRoot(getWebRoot());
+ compiler.setOutputDirectory(getOutputDirectory());
+ Jsp jsp = compiler.compile(path, substituteTaglibs);
+ log.debug("Simulating a request to " + path);
+ execution = jsp.request(httpMethod, requestAttributes,
+ sessionAttributes);
+ }
+
+ private void validatePath(String path) {
+ if (!path.startsWith("/")) {
+ throw new IllegalArgumentException(
+ "The JSP path must start with a \"/\"");
+ }
+ }
+
+ private String getOutputDirectory() {
+ return "target/jsptest";
+ }
+
+ protected File getRenderedResponse() {
+ return execution.getRenderedResponse();
+ }
+
+ /**
+ * Returns a handle for making assertions about the rendered content.
+ */
+ public OutputAssertion output() {
+ try {
+ return new OutputAssertion(IO
+ .readToString(getRenderedResponse()));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Invoke this method to substitute the specified taglib with the given
+ * implementation.
+ *
+ * @param name
+ * The name of the taglib to replace.
+ * @param newImplementation
+ * The new (substitute) implementation to use.
+ */
+ protected void substituteTaglib(String name,
+ Class newImplementation) {
+ substituteTaglibs.put(name, newImplementation);
+ }
+}
Deleted: tags/jsptest-0.14/jsptest-generic/pom.xml
===================================================================
--- trunk/jsptest-generic/pom.xml 2008-04-09 17:38:59 UTC (rev 201)
+++ tags/jsptest-0.14/jsptest-generic/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<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">
- <parent>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest</artifactId>
- <version>0.14-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-generic</artifactId>
- <version>0.14-SNAPSHOT</version>
- <name>JspTest root project for the generic components</name>
- <description>This POM acts as a virtual root for the set of generic components that make up JspTest.</description>
- <packaging>pom</packaging>
- <modules>
- <module>jsptest-common</module>
- <module>jsptest-compiler-api</module>
- <module>jsptest-framework</module>
- </modules>
- <dependencies>
- <dependency>
- <groupId>jtidy</groupId>
- <artifactId>jtidy</artifactId>
- <version>4aug2000r7-dev</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.2</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.13</version>
- </dependency>
- <dependency>
- <groupId>jaxen</groupId>
- <artifactId>jaxen</artifactId>
- <version>1.1.1</version>
- </dependency>
- </dependencies>
-</project>
Copied: tags/jsptest-0.14/jsptest-generic/pom.xml (from rev 205, trunk/jsptest-generic/pom.xml)
===================================================================
--- tags/jsptest-0.14/jsptest-generic/pom.xml (rev 0)
+++ tags/jsptest-0.14/jsptest-generic/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest</artifactId>
+ <version>0.14</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-generic</artifactId>
+ <version>0.14</version>
+ <name>JspTest root project for the generic components</name>
+ <description>This POM acts as a virtual root for the set of generic components that make up JspTest.</description>
+ <packaging>pom</packaging>
+ <modules>
+ <module>jsptest-common</module>
+ <module>jsptest-compiler-api</module>
+ <module>jsptest-framework</module>
+ </modules>
+ <dependencies>
+ <dependency>
+ <groupId>jtidy</groupId>
+ <artifactId>jtidy</artifactId>
+ <version>4aug2000r7-dev</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ </dependency>
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ </dependencies>
+</project>
Deleted: tags/jsptest-0.14/jsptest-jsp12/pom.xml
===================================================================
--- trunk/jsptest-jsp12/pom.xml 2008-04-04 07:01:10 UTC (rev 199)
+++ tags/jsptest-0.14/jsptest-jsp12/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<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">
- <parent>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest</artifactId>
- <version>0.14-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-jsp12</artifactId>
- <packaging>jar</packaging>
- <name>JspTest for JSP 1.2</name>
- <description>JspTest variant suitable for testing JavaServer Pages that follow the JSP 1.2 specification.</description>
- <dependencies>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-framework</artifactId>
- </dependency>
-<!-- needed for JSTL/TLD configuration -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.0.2</version>
- </dependency>
- <dependency>
- <groupId>taglibs</groupId>
- <artifactId>standard</artifactId>
- <version>1.0.2</version>
- </dependency>
-<!-- Provides the Jasper JSP compiler -->
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler</artifactId>
- <version>4.1.30</version>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-runtime</artifactId>
- <version>4.1.30</version>
- </dependency>
- </dependencies>
-</project>
Copied: tags/jsptest-0.14/jsptest-jsp12/pom.xml (from rev 205, trunk/jsptest-jsp12/pom.xml)
===================================================================
--- tags/jsptest-0.14/jsptest-jsp12/pom.xml (rev 0)
+++ tags/jsptest-0.14/jsptest-jsp12/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest</artifactId>
+ <version>0.14</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-jsp12</artifactId>
+ <packaging>jar</packaging>
+ <name>JspTest for JSP 1.2</name>
+ <description>JspTest variant suitable for testing JavaServer Pages that follow the JSP 1.2 specification.</description>
+ <dependencies>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-framework</artifactId>
+ </dependency>
+<!-- needed for JSTL/TLD configuration -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>standard</artifactId>
+ <version>1.0.2</version>
+ </dependency>
+<!-- Provides the Jasper JSP compiler -->
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-compiler</artifactId>
+ <version>4.1.30</version>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-runtime</artifactId>
+ <version>4.1.30</version>
+ </dependency>
+ </dependencies>
+</project>
Deleted: tags/jsptest-0.14/jsptest-jsp20/pom.xml
===================================================================
--- trunk/jsptest-jsp20/pom.xml 2008-04-04 07:01:10 UTC (rev 199)
+++ tags/jsptest-0.14/jsptest-jsp20/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<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">
- <parent>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest</artifactId>
- <version>0.14-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-jsp20</artifactId>
- <packaging>jar</packaging>
- <name>JspTest for JSP 2.0</name>
- <description>JspTest variant suitable for testing JavaServer Pages that follow the JSP 2.0 specification.</description>
- <dependencies>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-framework</artifactId>
- </dependency>
-<!-- needed for JSTL/TLD configuration -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.1.2</version>
- </dependency>
- <dependency>
- <groupId>taglibs</groupId>
- <artifactId>standard</artifactId>
- <version>1.1.2</version>
- </dependency>
-<!-- Provides the Jasper JSP compiler -->
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler</artifactId>
- <version>5.5.15</version>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-runtime</artifactId>
- <version>5.5.15</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/bin.xml</descriptor>
- </descriptors>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
Copied: tags/jsptest-0.14/jsptest-jsp20/pom.xml (from rev 205, trunk/jsptest-jsp20/pom.xml)
===================================================================
--- tags/jsptest-0.14/jsptest-jsp20/pom.xml (rev 0)
+++ tags/jsptest-0.14/jsptest-jsp20/pom.xml 2008-04-09 17:55:41 UTC (rev 206)
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<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">
+ <parent>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest</artifactId>
+ <version>0.14</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-jsp20</artifactId>
+ <packaging>jar</packaging>
+ <name>JspTest for JSP 2.0</name>
+ <description>JspTest variant suitable for testing JavaServer Pages that follow the JSP 2.0 specification.</description>
+ <dependencies>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-framework</artifactId>
+ </dependency>
+<!-- needed for JSTL/TLD configuration -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>standard</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+<!-- Provides the Jasper JSP compiler -->
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-compiler</artifactId>
+ <version>5.5.15</version>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-runtime</artifactId>
+ <version>5.5.15</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/bin.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Deleted: tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java
===================================================================
--- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java 2008-04-04 07:01:10 UTC (rev 199)
+++ tags/jsptest-0.14/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java 2008-04-09 17:55:41 UTC (rev 206)
@@ -1,412 +0,0 @@
-/*
- * Copyright 2007 Lasse Koskela.
- *
- * 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 net.sf.jsptest.compiler.jsp20;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.jsp.tagext.TagInfo;
-
-import net.sf.jsptest.compiler.JspCompilationInfo;
-import net.sf.jsptest.compiler.java.CommandLineJavac;
-import net.sf.jsptest.compiler.java.JavaCompiler;
-import net.sf.jsptest.compiler.java.SunJavaC;
-import net.sf.jsptest.compiler.jsp20.mock.MockOptions;
-import net.sf.jsptest.compiler.jsp20.mock.MockServletConfig;
-import net.sf.jsptest.compiler.jsp20.mock.MockTagInfo;
-import net.sf.jsptest.utils.Path;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jasper.EmbeddedServletOptions;
-import org.apache.jasper.JasperException;
-import org.apache.jasper.JspCompilationContext;
-import org.apache.jasper.Options;
-import org.apache.jasper.compiler.AntCompiler;
-import org.apache.jasper.compiler.Compiler;
-import org.apache.jasper.compiler.JspRuntimeContext;
-import org.apache.jasper.compiler.ServletWriter;
-import org.apache.jasper.servlet.JspCServletContext;
-import org.apache.jasper.servlet.JspServletWrapper;
-
-/**
- * The <tt>JasperTestCase</tt> provides a facility for compiling JavaServer
- * Pages outside a real Servlet/JSP container.
- * <p>
- * It makes use of Jakarta Tomcat's Jasper JSP compiler to compile a JSP file
- * into Java source code, and then Sun's javac implementation to compile the
- * Java source code into Java bytecode.
- * <p>
- * The resulting .class file is written under a "WEB-INF/classes" directory
- * under the "web root" defined by concrete subclasses through the
- * implementation of <tt>getWebRoot()</tt>. If you want the .class files to
- * be generated somewhere else than under the web root, you can also override
- * <tt>getClassOutputBaseDir()</tt>, which specifies the root directory for
- * the compiled .class files.
- * <p>
- * The resulting Servlet class gets its package based on the
- * <tt>getJspPackageName()</tt> method which can be overridden if necessary.
- * The default is "jsp" which means that, for example, a JSP named
- * "front_page.jsp" would eventually be translated into a class file
- * "[webroot]/WEB-INF/classes/jsp/front_page_jsp.class" where "jsp/" is the JSP
- * package name and "front_page_jsp.class" the normalized class name derived
- * from the source JSP file's name.
- *
- * @author Lasse Koskela
- */
-public class JasperCompiler {
-
- private static final Log log = LogFactory
- .getLog(JasperCompiler.class);
-
- private static JavaCompiler COMPILER = determineJavaCompiler();
-
- private String webRoot;
-
- private String classOutputBaseDir;
-
- private String jspPackageName;
-
- public JasperCompiler() {
- webRoot = ".";
- classOutputBaseDir = ".";
- }
-
- /**
- * Sets the "web root", i.e. the root directory of your exploded J2EE web
- * application. In other words, this is the directory under which you should
- * have a subdirectory named "WEB-INF".
- */
- public void setWebRoot(String webRoot) {
- this.webRoot = webRoot;
- }
-
- /**
- * Sets the directory where generated .class file(s) should be written..
- */
- public void setClassOutputBaseDir(String directory) {
- this.classOutputBaseDir = directory;
- }
-
- /**
- * Compile the specified JSP source file into bytecode.
- *
- * @param mockTaglibs
- * Mapping of tagnames to tag handler classes
- * @param jspPath
- * The path to the JSP source file to compile, given relative
- * to the web root.
- */
- public JspCompilationInfo compile(String path, Map mockTaglibs)
- throws Exception {
- JspCompilationInfo info = createJspCompilationInfo(path,
- mockTaglibs);
- if (info.jspCompilationRequired()) {
- compileJsp(info);
- compileJavaToBytecode(info);
- } else {
- log.debug(" No compilation needed for "
- + info.getJspSource());
- }
- return info;
- }
-
- /**
- * Sets the package name for the generated Java classes. The default package
- * name is "jsp".
- */
- public void setJspPackageName(String packageName) {
- this.jspPackageName = packageName;
- }
-
- /**
- * Returns the package name for the generated Java class.
- */
- private String getJspPackageName() {
- if (jspPackageName != null) {
- return jspPackageName;
- } else {
- return "jsp";
- }
- }
-
- private JspCompilationInfo createJspCompilationInfo(String jsp,
- Map mockTaglibs) {
- JspCompilationInfo info = new JspCompilationInfo();
- info.setJspPath(jsp);
- info.setClassOutputDir(classOutputBaseDir);
- info.setJspSource(resolveJspSourceFile(jsp));
- info.setWebRoot(getWebRoot());
- info.setTaglibs(mockTaglibs);
- resolveJavaSourceFile(info);
- resolveClassFileLocation(info);
- resolveClassName(info);
- return info;
- }
-
- private String getWebRoot() {
- File root = new File(webRoot);
- if (root.exists() && root.isDirectory()) {
- return root.getAbsolutePath();
- } else {
- return resolveWebRootFromClassPath();
- }
- }
-
- private String resolveWebRootFromClassPath() {
- String path = webRoot;
- if (path.startsWith("./")) {
- path = path.substring(2);
- }
- URL url = getClass().getClassLoader().getResource(path);
- if (url == null) {
- return webRoot;
- }
- if (!url.toExternalForm().startsWith("file:")) {
- log
- .info("Web root referenced a non-filesystem resource: "
- + url);
- return webRoot;
- }
- return new File(url.toExternalForm().substring(
- "file:".length())).getAbsolutePath();
- }
-
- private void compileJsp(JspCompilationInfo info) throws Exception {
- assertTrue("Source file "
- + new File(info.getJspSource()).getAbsolutePath()
- + " does not exist", new File(info.getJspSource())
- .exists());
- PrintWriter logWriter = new PrintWriter(new StringWriter());
- URL baseUrl = new File(info.getWebRoot()).toURL();
- ServletContext sContext = new JspCServletContext(logWriter,
- baseUrl);
- ServletConfig sConfig = new MockServletConfig(sContext);
- Options options = createOptions(sContext, sConfig, info);
- JspRuntimeContext rtContext = new JspRuntimeContext(sContext,
- options);
- JspServletWrapper sWrapper = makeWrapper(sContext, options,
- rtContext);
- JspCompilationContext cContext = createJspCompilationContext(
- info, sContext, options, rtContext, sWrapper,
- new StringWriter());
- logCompilation(info.getJspSource(), info.getClassOutputDir());
- compileJspToJava(sWrapper, cContext);
- File javaFile = new File(info.getJavaSource());
- assertTrue("Failed to generate .java source code to "
- + javaFile.getAbsolutePath(), javaFile.exists());
- info.compilationWasSuccessful();
- }
-
- private void compileJspToJava(
- JspServletWrapper jspServletWrapper,
- JspCompilationContext jspCompilationContext)
- throws FileNotFoundException, JasperException, Exception {
- Compiler compiler = new AntCompiler();
- compiler.init(jspCompilationContext, jspServletWrapper);
...
[truncated message content] |