jsptest-svn-commits Mailing List for JspTest
Status: Alpha
Brought to you by:
lkoskela
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
(38) |
May
(1) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(17) |
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <lko...@us...> - 2012-05-07 12:27:47
|
Revision: 276
http://jsptest.svn.sourceforge.net/jsptest/?rev=276&view=rev
Author: lkoskela
Date: 2012-05-07 10:25:03 +0000 (Mon, 07 May 2012)
Log Message:
-----------
Upgrade a bunch of Maven plugins and make plugin versions explicit in POM.
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
+++ trunk/pom.xml 2012-05-07 10:25:03 UTC (rev 276)
@@ -120,6 +120,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
+ <version>2.4</version>
<configuration>
<fork>true</fork>
<source>1.4</source>
@@ -129,6 +130,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
@@ -138,6 +140,7 @@
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8.1</version>
<configuration>
<minmemory>128m</minmemory>
<maxmemory>256m</maxmemory>
@@ -155,6 +158,7 @@
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
@@ -167,10 +171,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
+ <version>3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
+ <version>2.2.2</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<preparationGoals>clean install</preparationGoals>
@@ -178,6 +184,7 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
+ <version>2.3</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/jsp12.xml</descriptor>
@@ -202,13 +209,14 @@
</configuration>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>surefire-report-maven-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.12</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
- <version>2.0</version>
+ <version>2.5.1</version>
</plugin>
</plugins>
</build>
@@ -217,6 +225,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.4</version>
<reportSets>
<reportSet>
<reports>
@@ -233,15 +242,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8.1</version>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>surefire-report-maven-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.12</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
- <version>2.0</version>
+ <version>2.5.1</version>
</plugin>
</plugins>
</reporting>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2012-05-04 11:39:59
|
Revision: 275
http://jsptest.svn.sourceforge.net/jsptest/?rev=275&view=rev
Author: lkoskela
Date: 2012-05-04 11:39:48 +0000 (Fri, 04 May 2012)
Log Message:
-----------
[maven-release-plugin] prepare for next development iteration
Modified Paths:
--------------
trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
trunk/jsptest-acceptance/pom.xml
trunk/jsptest-generic/jsptest-common/pom.xml
trunk/jsptest-generic/jsptest-compiler-api/pom.xml
trunk/jsptest-generic/jsptest-framework/pom.xml
trunk/jsptest-generic/pom.xml
trunk/jsptest-jsp12/pom.xml
trunk/jsptest-jsp20/pom.xml
trunk/jsptest-jsp21/pom.xml
trunk/pom.xml
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp12</artifactId>
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp20</artifactId>
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp21</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
<packaging>jar</packaging>
<name>
Acceptance tests for the JspTest variant for the JSP 2.1
Modified: trunk/jsptest-acceptance/pom.xml
===================================================================
--- trunk/jsptest-acceptance/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-acceptance/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -3,7 +3,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance</artifactId>
Modified: trunk/jsptest-generic/jsptest-common/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-common/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-generic/jsptest-common/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-common</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Common utilities</name>
<description>
Modified: trunk/jsptest-generic/jsptest-compiler-api/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-compiler-api</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Internal compiler API</name>
<description>
Modified: trunk/jsptest-generic/jsptest-framework/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-framework/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-generic/jsptest-framework/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-framework</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Core framework</name>
<description>
@@ -16,12 +16,12 @@
<dependency>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-compiler-api</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-common</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/jsptest-generic/pom.xml
===================================================================
--- trunk/jsptest-generic/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-generic/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -3,11 +3,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-generic</artifactId>
- <version>0.20</version>
+ <version>0.21-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>
Modified: trunk/jsptest-jsp12/pom.xml
===================================================================
--- trunk/jsptest-jsp12/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-jsp12/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp12</artifactId>
Modified: trunk/jsptest-jsp20/pom.xml
===================================================================
--- trunk/jsptest-jsp20/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-jsp20/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp20</artifactId>
Modified: trunk/jsptest-jsp21/pom.xml
===================================================================
--- trunk/jsptest-jsp21/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/jsptest-jsp21/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp21</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-05-04 11:39:19 UTC (rev 274)
+++ trunk/pom.xml 2012-05-04 11:39:48 UTC (rev 275)
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20</version>
+ <version>0.21-SNAPSHOT</version>
<name>JspTest root project</name>
<description>This POM acts as a virtual root for the set of JSP version-specific combinations of the contained subprojects.</description>
<packaging>pom</packaging>
@@ -32,9 +32,9 @@
</repository>
</distributionManagement>
<scm>
- <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.20</connection>
- <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.20</developerConnection>
- <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.20</url>
+ <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</connection>
+ <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</developerConnection>
+ <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/trunk</url>
</scm>
<mailingLists />
<developers>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2012-05-04 11:39:28
|
Revision: 274
http://jsptest.svn.sourceforge.net/jsptest/?rev=274&view=rev
Author: lkoskela
Date: 2012-05-04 11:39:19 +0000 (Fri, 04 May 2012)
Log Message:
-----------
[maven-release-plugin] copy for tag jsptest-0.20
Added Paths:
-----------
tags/jsptest-0.20/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2012-05-04 11:38:41
|
Revision: 273
http://jsptest.svn.sourceforge.net/jsptest/?rev=273&view=rev
Author: lkoskela
Date: 2012-05-04 11:38:35 +0000 (Fri, 04 May 2012)
Log Message:
-----------
[maven-release-plugin] prepare release jsptest-0.20
Modified Paths:
--------------
trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
trunk/jsptest-acceptance/pom.xml
trunk/jsptest-generic/jsptest-common/pom.xml
trunk/jsptest-generic/jsptest-compiler-api/pom.xml
trunk/jsptest-generic/jsptest-framework/pom.xml
trunk/jsptest-generic/pom.xml
trunk/jsptest-jsp12/pom.xml
trunk/jsptest-jsp20/pom.xml
trunk/jsptest-jsp21/pom.xml
trunk/pom.xml
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp12</artifactId>
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp20</artifactId>
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp21</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
<packaging>jar</packaging>
<name>
Acceptance tests for the JspTest variant for the JSP 2.1
Modified: trunk/jsptest-acceptance/pom.xml
===================================================================
--- trunk/jsptest-acceptance/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-acceptance/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -3,7 +3,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance</artifactId>
Modified: trunk/jsptest-generic/jsptest-common/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-common/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-generic/jsptest-common/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-common</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
<packaging>jar</packaging>
<name>Common utilities</name>
<description>
Modified: trunk/jsptest-generic/jsptest-compiler-api/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-compiler-api</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
<packaging>jar</packaging>
<name>Internal compiler API</name>
<description>
Modified: trunk/jsptest-generic/jsptest-framework/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-framework/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-generic/jsptest-framework/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-framework</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
<packaging>jar</packaging>
<name>Core framework</name>
<description>
@@ -16,12 +16,12 @@
<dependency>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-compiler-api</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</dependency>
<dependency>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-common</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/jsptest-generic/pom.xml
===================================================================
--- trunk/jsptest-generic/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-generic/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -3,11 +3,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-generic</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</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>
Modified: trunk/jsptest-jsp12/pom.xml
===================================================================
--- trunk/jsptest-jsp12/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-jsp12/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp12</artifactId>
Modified: trunk/jsptest-jsp20/pom.xml
===================================================================
--- trunk/jsptest-jsp20/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-jsp20/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp20</artifactId>
Modified: trunk/jsptest-jsp21/pom.xml
===================================================================
--- trunk/jsptest-jsp21/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/jsptest-jsp21/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp21</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-05-04 10:56:29 UTC (rev 272)
+++ trunk/pom.xml 2012-05-04 11:38:35 UTC (rev 273)
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.20-SNAPSHOT</version>
+ <version>0.20</version>
<name>JspTest root project</name>
<description>This POM acts as a virtual root for the set of JSP version-specific combinations of the contained subprojects.</description>
<packaging>pom</packaging>
@@ -32,11 +32,11 @@
</repository>
</distributionManagement>
<scm>
- <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</connection>
- <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</developerConnection>
- <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/trunk</url>
+ <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.20</connection>
+ <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.20</developerConnection>
+ <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.20</url>
</scm>
- <mailingLists/>
+ <mailingLists />
<developers>
<developer>
<name>Lasse Koskela</name>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2012-05-04 10:56:41
|
Revision: 272
http://jsptest.svn.sourceforge.net/jsptest/?rev=272&view=rev
Author: lkoskela
Date: 2012-05-04 10:56:29 +0000 (Fri, 04 May 2012)
Log Message:
-----------
Add tests for the MockHttpServletRequest implementation (and fix some flaws along the way)
Modified Paths:
--------------
trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java
trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletRequest.java
trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletResponse.java
Added Paths:
-----------
trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/TestMockHttpServletRequest.java
Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java
===================================================================
--- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java 2012-04-12 17:40:41 UTC (rev 271)
+++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java 2012-05-04 10:56:29 UTC (rev 272)
@@ -1,6 +1,7 @@
package net.sf.jsptest.compiler.jsp20;
import java.util.Map;
+
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServlet;
@@ -8,6 +9,7 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.jsp.JspFactory;
+
import net.sf.jsptest.compiler.api.Jsp;
import net.sf.jsptest.compiler.api.JspExecution;
import net.sf.jsptest.compiler.jsp20.mock.MockHttpServletRequest;
@@ -18,6 +20,7 @@
import net.sf.jsptest.compiler.jsp20.mock.MockPageContext;
import net.sf.jsptest.compiler.jsp20.mock.MockServletConfig;
import net.sf.jsptest.compiler.jsp20.mock.MockServletContext;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -27,61 +30,85 @@
*/
public class JspImpl implements Jsp {
- private static final Log log = LogFactory.getLog(JspImpl.class);
- private final Class servletClass;
- private MockPageContext pageContext;
+ private static final Log log = LogFactory.getLog(JspImpl.class);
+ private final Class servletClass;
+ private MockPageContext pageContext;
- public JspImpl(Class servletClass) {
- this.servletClass = servletClass;
- }
+ public JspImpl(Class servletClass) {
+ this.servletClass = servletClass;
+ }
- public JspExecution request(String httpMethod, Map requestAttributes, Map sessionAttributes, Map requestParameters) {
- ServletContext servletContext = new MockServletContext();
- ServletConfig servletConfig = new MockServletConfig(servletContext);
- MockHttpSession httpSession = new MockHttpSession();
- httpSession.setAttributes(sessionAttributes);
- MockHttpServletRequest request = new MockHttpServletRequest();
- request.setSession(httpSession);
- request.setMethod(httpMethod);
- request.setAttributes(requestAttributes);
- request.setParameters(requestParameters);
- MockHttpServletResponse response = new MockHttpServletResponse();
- MockJspWriter jspWriter = configureJspFactory(servletContext, request, httpSession);
- initializeAndInvokeJsp(servletClass, servletConfig, request, response);
- return createExecutionResult(jspWriter.getContents());
- }
+ public JspExecution request(String httpMethod, Map requestAttributes,
+ Map sessionAttributes, Map requestParameters) {
+ ServletContext servletContext = new MockServletContext();
+ ServletConfig servletConfig = new MockServletConfig(servletContext);
+ MockHttpSession session = configureHttpSession(sessionAttributes);
+ MockHttpServletRequest request = configureHttpServletRequest(
+ httpMethod, requestAttributes, requestParameters, session);
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ MockJspWriter jspWriter = configureJspFactory(servletContext, request,
+ session);
+ initializeAndInvokeJsp(servletClass, servletConfig, request, response);
+ return createExecutionResult(jspWriter.getContents());
+ }
- protected MockJspWriter configureJspFactory(ServletContext httpContext,
- HttpServletRequest httpRequest, HttpSession httpSession) {
- pageContext = new MockPageContext();
- pageContext.setRequest(httpRequest);
- pageContext.setServletContext(httpContext);
- pageContext.setSession(httpSession);
- MockJspWriter jspWriter = new MockJspWriter();
- pageContext.setJspWriter(jspWriter);
- JspFactory.setDefaultFactory(new MockJspFactory(pageContext));
- return jspWriter;
- }
+ private MockHttpSession configureHttpSession(Map sessionAttributes) {
+ MockHttpSession httpSession = new MockHttpSession();
+ httpSession.setAttributes(sessionAttributes);
+ return httpSession;
+ }
- protected void initializeAndInvokeJsp(Class jspClass, ServletConfig servletConfig,
- HttpServletRequest request, HttpServletResponse response) {
- try {
- log.debug("Instantiating Servlet: " + jspClass.getName());
- HttpServlet servlet = (HttpServlet) jspClass.newInstance();
- log.debug("Initializing Servlet: " + jspClass.getName());
- servlet.init(servletConfig);
- log.debug("Invoking Servlet: " + jspClass.getName());
- servlet.service(request, response);
- if (pageContext.getException() != null) {
- log.debug("An exception was stored into PageContext. Rethrowing it...");
- throw new RuntimeException(pageContext.getException());
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
+ private MockHttpServletRequest configureHttpServletRequest(
+ String httpMethod, Map requestAttributes, Map requestParameters,
+ MockHttpSession session) {
+ MockHttpServletRequest request = new MockHttpServletRequest();
+ request.setSession(session);
+ request.setMethod(httpMethod);
+ request.setAttributes(requestAttributes);
+ request.setParameters(requestParameters);
+ return request;
+ }
- protected JspExecution createExecutionResult(String output) {
- return new JspExecutionImpl(output);
- }
+ protected MockJspWriter configureJspFactory(ServletContext httpContext,
+ HttpServletRequest httpRequest, HttpSession httpSession) {
+ MockJspWriter jspWriter = new MockJspWriter();
+ pageContext = configurePageContext(httpContext, httpRequest,
+ httpSession, jspWriter);
+ JspFactory.setDefaultFactory(new MockJspFactory(pageContext));
+ return jspWriter;
+ }
+
+ private MockPageContext configurePageContext(ServletContext httpContext,
+ HttpServletRequest httpRequest, HttpSession httpSession,
+ MockJspWriter jspWriter) {
+ MockPageContext pageContext = new MockPageContext();
+ pageContext.setRequest(httpRequest);
+ pageContext.setServletContext(httpContext);
+ pageContext.setSession(httpSession);
+ pageContext.setJspWriter(jspWriter);
+ return pageContext;
+ }
+
+ protected void initializeAndInvokeJsp(Class jspClass,
+ ServletConfig servletConfig, HttpServletRequest request,
+ HttpServletResponse response) {
+ try {
+ log.debug("Instantiating Servlet: " + jspClass.getName());
+ HttpServlet servlet = (HttpServlet) jspClass.newInstance();
+ log.debug("Initializing Servlet: " + jspClass.getName());
+ servlet.init(servletConfig);
+ log.debug("Invoking Servlet: " + jspClass.getName());
+ servlet.service(request, response);
+ if (pageContext.getException() != null) {
+ log.debug("An exception was stored into PageContext. Rethrowing it...");
+ throw new RuntimeException(pageContext.getException());
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected JspExecution createExecutionResult(String output) {
+ return new JspExecutionImpl(output);
+ }
}
Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletRequest.java
===================================================================
--- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletRequest.java 2012-04-12 17:40:41 UTC (rev 271)
+++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletRequest.java 2012-05-04 10:56:29 UTC (rev 272)
@@ -16,18 +16,27 @@
package net.sf.jsptest.compiler.jsp20.mock;
import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.security.Principal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Vector;
+
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
@@ -37,318 +46,564 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
/**
* @author Lasse Koskela
*/
public class MockHttpServletRequest implements HttpServletRequest {
- private Map headers = new HashMap();
- private Map parameters = new HashMap();
- private Map attributes = new HashMap();
- private MockHttpSession httpSession = null;
- private byte[] body;
- private String httpMethod;
- private String characterEncoding;
+ private static final String LOCALHOST = "127.0.0.1";
+ private static final Log log = LogFactory
+ .getLog(MockHttpServletRequest.class);
+ private Map headers = new HashMap();
+ private Map parameters = new HashMap();
+ private Map attributes = new HashMap();
+ private MockHttpSession httpSession = null;
+ private byte[] body;
+ private String httpMethod;
+ private String characterEncoding;
+ private boolean hasAlreadyReadBody;
+ private String queryString;
+ private String scheme;
+ private String contextPath;
+ private int serverPort;
+ private String serverName;
+ private String servletPath;
+ private String requestURI;
+ static final SimpleDateFormat RFC2616 = new SimpleDateFormat(
+ "EEE, dd MMM yyyy HH:mm:ss z");
- public MockHttpServletRequest() {
- this((MockHttpSession) null);
- }
+ public MockHttpServletRequest() {
+ this((MockHttpSession) null);
+ }
- public MockHttpServletRequest(MockHttpSession httpSession) {
- setSession(httpSession);
- }
+ public MockHttpServletRequest(byte[] body) {
+ this((MockHttpSession) null, body);
+ }
- public MockHttpServletRequest(byte[] body) {
- this.body = body;
- characterEncoding = "UTF-8";
- this.headers.put("Content-type", "multipart/form-data; boundary=XXXBOUNDARYXXX");
- }
+ public MockHttpServletRequest(MockHttpSession httpSession) {
+ this(httpSession, null);
+ }
- public String getAuthType() {
- return null;
- }
+ public MockHttpServletRequest(MockHttpSession httpSession, byte[] body) {
+ setSession(httpSession);
+ setScheme("http");
+ setContextPath("");
+ setServletPath("");
+ setServerPort(8080);
+ setServerName("localhost");
+ setCharacterEncoding("ISO-8859-1");
+ setMethod("GET");
+ setHeader("Content-type",
+ "multipart/form-data; boundary=XXXBOUNDARYXXX");
+ setBody(body);
+ }
- public Cookie[] getCookies() {
- return new Cookie[0];
- }
+ public String getAuthType() {
+ return null;
+ }
- public long getDateHeader(String s) {
- try {
- // TODO: use the HTTP date format pattern
- return new SimpleDateFormat().parse((String) headers.get(s)).getTime();
- } catch (ParseException e) {
- return 0;
- }
- }
+ public Cookie[] getCookies() {
+ return new Cookie[0];
+ }
- public String getHeader(String reference) {
- return (String) headers.get(reference);
- }
+ public long getDateHeader(String name) {
+ String value = (String) getHeader(name);
+ if (value == null) {
+ return -1;
+ }
+ try {
+ return RFC2616.parse(value).getTime();
+ } catch (ParseException e) {
+ log.warn("Could not parse date header '" + name + "': " + value, e);
+ throw new IllegalArgumentException("Invalid date: " + value);
+ }
+ }
- public Enumeration getHeaders(String s) {
- return new Vector().elements();
- }
+ public void setHeader(String name, String value) {
+ String headerName = resolveHeaderName(name);
+ List values = (List) headers.get(headerName);
+ if (values == null) {
+ values = new ArrayList();
+ }
+ values.add(value);
+ headers.put(headerName, values);
+ }
- public Enumeration getHeaderNames() {
- return new Vector(headers.keySet()).elements();
- }
+ public void setHeader(String name, Date value) {
+ setHeader(name, RFC2616.format(value));
+ }
- public int getIntHeader(String s) {
- return Integer.parseInt(getHeader(s));
- }
+ public void setHeader(String name, int value) {
+ setHeader(name, String.valueOf(value));
+ }
- public void setMethod(String httpMethod) {
- this.httpMethod = httpMethod;
- }
+ public String getHeader(String name) {
+ List values = (List) headers.get(resolveHeaderName(name));
+ if (values == null) {
+ return null;
+ }
+ return (String) values.get(0);
+ }
- public String getMethod() {
- return httpMethod;
- }
+ private String resolveHeaderName(String name) {
+ Iterator headerNames = headers.keySet().iterator();
+ while (headerNames.hasNext()) {
+ String headerName = (String) headerNames.next();
+ if (headerName.equalsIgnoreCase(name)) {
+ return headerName;
+ }
+ }
+ return name;
+ }
- public String getPathInfo() {
- return "/";
- }
+ public Enumeration getHeaders(String name) {
+ Vector vector = new Vector();
+ List values = (List) headers.get(resolveHeaderName(name));
+ if (values != null) {
+ vector.addAll(values);
+ }
+ return vector.elements();
+ }
- public String getPathTranslated() {
- return "/";
- }
+ public Enumeration getHeaderNames() {
+ return new Vector(headers.keySet()).elements();
+ }
- public String getContextPath() {
- return "/";
- }
+ public int getIntHeader(String name) {
+ String value = getHeader(name);
+ if (value == null) {
+ return -1;
+ }
+ return Integer.parseInt(value);
+ }
- public String getQueryString() {
- return null;
- }
+ public void setMethod(String httpMethod) {
+ this.httpMethod = httpMethod;
+ }
- public String getRemoteUser() {
- return null;
- }
+ public String getMethod() {
+ return httpMethod;
+ }
- public boolean isUserInRole(String s) {
- return false;
- }
+ public String getPathInfo() {
+ return "/";
+ }
- public Principal getUserPrincipal() {
- return null;
- }
+ public String getPathTranslated() {
+ return "/";
+ }
- public String getRequestedSessionId() {
- return "JSPTESTSESSIONID";
- }
+ public String getContextPath() {
+ return contextPath;
+ }
- public String getRequestURI() {
- return "/";
- }
+ public void setContextPath(String path) {
+ if (requestURI != null && !requestURI.startsWith(path)) {
+ throw new IllegalArgumentException("Context path " + path
+ + " does not match the request URI " + requestURI);
+ }
+ this.contextPath = path;
+ }
- public StringBuffer getRequestURL() {
- return new StringBuffer("/");
- }
+ public String getQueryString() {
+ if (hasQueryString()) {
+ return queryString;
+ }
+ if (isGetRequest() && !parameters.isEmpty()) {
+ StringBuffer s = new StringBuffer();
+ Iterator parameterNames = parameters.keySet().iterator();
+ while (parameterNames.hasNext()) {
+ String name = (String) parameterNames.next();
+ String[] values = (String[]) parameters.get(name);
+ for (int i = 0; i < values.length; i++) {
+ if (s.length() > 0) {
+ s.append("&");
+ }
+ s.append(name).append("=").append(values[i]);
+ }
+ }
+ return s.toString();
+ }
+ return null;
+ }
- public String getServletPath() {
- return "/";
- }
+ public void setQueryString(String queryStringWithoutLeadingQuestionMark) {
+ this.queryString = queryStringWithoutLeadingQuestionMark;
+ }
- public HttpSession getSession(boolean flag) {
- if (flag && httpSession == null) {
- httpSession = new MockHttpSession();
- }
- return httpSession;
- }
+ public String getRemoteUser() {
+ return null;
+ }
- public HttpSession getSession() {
- return httpSession;
- }
+ public boolean isUserInRole(String role) {
+ return false;
+ }
- public boolean isRequestedSessionIdValid() {
- return true;
- }
+ public Principal getUserPrincipal() {
+ return null;
+ }
- public boolean isRequestedSessionIdFromCookie() {
- return true;
- }
+ public String getRequestedSessionId() {
+ return "JSPTESTSESSIONID";
+ }
- public boolean isRequestedSessionIdFromURL() {
- return false;
- }
+ public void setRequestURI(String uri) {
+ if (contextPath != null && !uri.startsWith(contextPath)) {
+ throw new IllegalArgumentException("Request URI " + requestURI
+ + " does not match the Context path " + contextPath);
+ }
+ this.requestURI = uri;
+ }
- public boolean isRequestedSessionIdFromUrl() {
- return false;
- }
+ public String getRequestURI() {
+ if (requestURI != null) {
+ return requestURI;
+ }
+ return getContextPath() + getServletPath();
+ }
- public Object getAttribute(String name) {
- return attributes.get(name);
- }
+ public void setRequestURL(String requestUrl) {
+ try {
+ URL url = new URL(requestUrl);
+ setScheme(url.getProtocol());
+ setServerName(url.getHost());
+ setServerPort(url.getPort());
+ setRequestURI(url.getPath());
+ } catch (MalformedURLException e) {
+ throw new RuntimeException(e);
+ }
+ }
- public Enumeration getAttributeNames() {
- return new Vector(attributes.keySet()).elements();
- }
+ public StringBuffer getRequestURL() {
+ StringBuffer url = new StringBuffer();
+ url.append(getScheme()).append("://");
+ url.append(getServerName());
+ if (getServerPort() != 80) {
+ url.append(":").append(getServerPort());
+ }
+ url.append(getRequestURI());
+ return url;
+ }
- public String getCharacterEncoding() {
- return characterEncoding;
- }
+ public void setServletPath(String path) {
+ this.servletPath = path;
+ }
- public void setCharacterEncoding(String env) {
- characterEncoding = env;
- }
+ public String getServletPath() {
+ return servletPath;
+ }
- public int getContentLength() {
- return body.length;
- }
+ public HttpSession getSession(boolean createNewSession) {
+ if (createNewSession && httpSession == null) {
+ httpSession = new MockHttpSession();
+ }
+ return httpSession;
+ }
- public String getContentType() {
- return "multipart/form-data; boundary=xxx";
- }
+ public HttpSession getSession() {
+ return httpSession;
+ }
- public ServletInputStream getInputStream() throws IOException {
- return new MockServletInputStream(body);
- }
+ public void setSession(MockHttpSession session) {
+ this.httpSession = session;
+ }
- public String getParameter(String name) {
- String values[] = (String[]) parameters.get(name);
- if (values != null) {
- return (values[0]);
- } else {
- return (null);
- }
- }
+ public boolean isRequestedSessionIdValid() {
+ return true;
+ }
- public Map getParameterMap() {
- return parameters;
- }
+ public boolean isRequestedSessionIdFromCookie() {
+ return true;
+ }
- public String getProtocol() {
- return "http";
- }
+ public boolean isRequestedSessionIdFromURL() {
+ return isRequestedSessionIdFromUrl();
+ }
- public String getScheme() {
- return "http://";
- }
+ public boolean isRequestedSessionIdFromUrl() {
+ return false;
+ }
- public String getServerName() {
- return "servername";
- }
+ public void setBody(byte[] body) {
+ this.body = body;
+ }
- public int getServerPort() {
- return 8080;
- }
+ public String getCharacterEncoding() {
+ return characterEncoding;
+ }
- public BufferedReader getReader() throws IOException {
- return null;
- }
+ public void setCharacterEncoding(String encoding) {
+ characterEncoding = encoding;
+ }
- public String getRemoteAddr() {
- return null;
- }
+ public int getContentLength() {
+ return body.length;
+ }
- public String getRemoteHost() {
- return null;
- }
+ public String getContentType() {
+ return "multipart/form-data; boundary=xxx";
+ }
- public void setAttributes(Map attributes) {
- this.attributes.putAll(attributes);
- }
+ public ServletInputStream getInputStream() throws IOException {
+ checkForEarlierAccessToRequestBody();
+ return new MockServletInputStream(body);
+ }
- public void setAttribute(String name, Object o) {
- attributes.put(name, o);
- }
+ public BufferedReader getReader() throws IOException {
+ checkForEarlierAccessToRequestBody();
+ return new BufferedReader(new InputStreamReader(
+ new ByteArrayInputStream(body), characterEncoding));
+ }
- public void removeAttribute(String name) {
- attributes.remove(name);
- }
+ private void checkForEarlierAccessToRequestBody() throws IOException {
+ if (hasAlreadyReadBody) {
+ throw new IOException("You've read the request body already!");
+ }
+ hasAlreadyReadBody = true;
+ }
- public Locale getLocale() {
- return Locale.getDefault();
- }
+ public String getProtocol() {
+ return "HTTP/1.1";
+ }
- public Enumeration getLocales() {
- return new Vector(Arrays.asList(Locale.getAvailableLocales())).elements();
- }
+ public String getScheme() {
+ return scheme;
+ }
- public boolean isSecure() {
- return false;
- }
+ public void setScheme(String scheme) {
+ this.scheme = scheme;
+ }
- public RequestDispatcher getRequestDispatcher(String s) {
- return new RequestDispatcher() {
+ public boolean isSecure() {
+ return getProtocol().equals("https");
+ }
- public void forward(ServletRequest request, ServletResponse response)
- throws ServletException, IOException {
- }
+ public void setServerName(String name) {
+ this.serverName = name;
+ }
- public void include(ServletRequest request, ServletResponse response)
- throws ServletException, IOException {
- }
- };
- }
+ public String getServerName() {
+ return serverName;
+ }
- public String getRealPath(String s) {
- File tmpDir = new File(System.getProperty("java.io.tmpdir"));
- File jsptestTmpDir = new File(tmpDir, "jsptest");
- return new File(jsptestTmpDir, s).getAbsolutePath();
- }
+ public void setServerPort(int port) {
+ this.serverPort = port;
+ }
- public int getRemotePort() {
- return 11111;
- }
+ public int getServerPort() {
+ return serverPort;
+ }
- public String getLocalName() {
- return null;
- }
+ public String getRemoteAddr() {
+ return LOCALHOST;
+ }
- public String getLocalAddr() {
- return null;
- }
+ public String getRemoteHost() {
+ return "localhost";
+ }
- public int getLocalPort() {
- return 22222;
- }
+ public int getRemotePort() {
+ return 11111;
+ }
- public void addParameter(String name, String values[]) {
- parameters.put(name, values);
- }
+ public int getLocalPort() {
+ return 22222;
+ }
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(getClass().getName()).append("{");
- Enumeration enumeration = getParameterNames();
- while (enumeration.hasMoreElements()) {
- String key = (String) enumeration.nextElement();
- String[] values = getParameterValues(key);
- buffer.append("parameter:");
- buffer.append(key);
- buffer.append("=[");
- for (int i = 0; i < values.length; i++) {
- String value = values[i];
- buffer.append(value);
- if (i < values.length - 1) {
- buffer.append(",");
- }
- }
- buffer.append("]\n");
- }
- buffer.append("}");
- return buffer.toString();
- }
+ public String getLocalName() {
+ return LOCALHOST;
+ }
- public Enumeration getParameterNames() {
- return new Vector(parameters.keySet()).elements();
- }
+ public String getLocalAddr() {
+ return LOCALHOST;
+ }
- public String[] getParameterValues(String name) {
- return (String[]) parameters.get(name);
- }
-
- public void setParameters(Map requestParameters) {
- Iterator parameterNames = requestParameters.keySet().iterator();
- while (parameterNames.hasNext()) {
- String name = (String) parameterNames.next();
- String[] values = (String[]) requestParameters.get(name);
- parameters.put(name, values);
- }
- }
+ public Object getAttribute(String name) {
+ return attributes.get(name);
+ }
- public void setSession(MockHttpSession session) {
- this.httpSession = session;
- }
+ public Enumeration getAttributeNames() {
+ return new Vector(attributes.keySet()).elements();
+ }
+
+ public void setAttributes(Map attributes) {
+ this.attributes.putAll(attributes);
+ }
+
+ public void setAttribute(String name, Object value) {
+ attributes.put(name, value);
+ }
+
+ public void removeAttribute(String name) {
+ attributes.remove(name);
+ }
+
+ public Enumeration getParameterNames() {
+ return new Vector(getParameterMap().keySet()).elements();
+ }
+
+ public Map getParameterMap() {
+ if (isGetRequest() && hasQueryString()) {
+ return getQueryStringParameterMap();
+ }
+ if (isPostRequest() && hasQueryString()) {
+ return join(parameters, getQueryStringParameterMap());
+ }
+ return new HashMap(parameters);
+ }
+
+ public String[] getParameterValues(String name) {
+ return (String[]) getParameterMap().get(name);
+ }
+
+ public String getParameter(String name) {
+ String values[] = (String[]) getParameterMap().get(name);
+ if (values != null) {
+ return values[0];
+ }
+ return null;
+ }
+
+ public void addParameter(String name, String[] values) {
+ String[] oldValues = (String[]) parameters.get(name);
+ if (oldValues != null) {
+ values = join(oldValues, values);
+ }
+ parameters.put(name, values);
+ }
+
+ public void addParameter(String name, String value) {
+ addParameter(name, new String[] { value });
+ }
+
+ public void setParameters(Map requestParameters) {
+ Iterator parameterNames = requestParameters.keySet().iterator();
+ while (parameterNames.hasNext()) {
+ String name = (String) parameterNames.next();
+ String[] values = (String[]) requestParameters.get(name);
+ parameters.put(name, values);
+ }
+ }
+
+ public void setParameter(String name, String value) {
+ setParameter(name, new String[] { value });
+ }
+
+ public void setParameter(String name, String[] values) {
+ parameters.put(name, values);
+ }
+
+ public Locale getLocale() {
+ return Locale.getDefault();
+ }
+
+ public Enumeration getLocales() {
+ List locales = Arrays.asList(Locale.getAvailableLocales());
+ return new Vector(locales).elements();
+ }
+
+ public RequestDispatcher getRequestDispatcher(String path) {
+ return new RequestDispatcher() {
+
+ public void forward(ServletRequest request, ServletResponse response)
+ throws ServletException, IOException {
+ }
+
+ public void include(ServletRequest request, ServletResponse response)
+ throws ServletException, IOException {
+ }
+ };
+ }
+
+ public String getRealPath(String path) {
+ File tmpDir = new File(System.getProperty("java.io.tmpdir"));
+ File jsptestTmpDir = new File(tmpDir, "jsptest");
+ return new File(jsptestTmpDir, path).getAbsolutePath();
+ }
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(getClass().getName()).append("{");
+ Enumeration enumeration = getParameterNames();
+ while (enumeration.hasMoreElements()) {
+ String key = (String) enumeration.nextElement();
+ String[] values = getParameterValues(key);
+ buffer.append("parameter:");
+ buffer.append(key);
+ buffer.append("=[");
+ for (int i = 0; i < values.length; i++) {
+ buffer.append(values[i]);
+ if (i < values.length - 1) {
+ buffer.append(",");
+ }
+ }
+ buffer.append("]\n");
+ }
+ buffer.append("}");
+ return buffer.toString();
+ }
+
+ private String[] join(String[] array, String[] anotherArray) {
+ List joined = new ArrayList();
+ if (array != null) {
+ joined.addAll(Arrays.asList(array));
+ }
+ if (anotherArray != null) {
+ joined.addAll(Arrays.asList(anotherArray));
+ }
+ return (String[]) joined.toArray(new String[joined.size()]);
+ }
+
+ private Map join(Map map, Map anotherMap) {
+ Map joined = new HashMap();
+ Collection keys = join(map.keySet(), anotherMap.keySet());
+ Iterator allKeys = keys.iterator();
+ while (allKeys.hasNext()) {
+ String key = (String) allKeys.next();
+ String[] values1 = (String[]) map.get(key);
+ String[] values2 = (String[]) anotherMap.get(key);
+ joined.put(key, join(values1, values2));
+ }
+ return joined;
+ }
+
+ private Collection join(Collection collection, Collection anotherCollection) {
+ Collection joined = new ArrayList();
+ if (collection != null) {
+ joined.addAll(collection);
+ }
+ if (anotherCollection != null) {
+ joined.addAll(anotherCollection);
+ }
+ return joined;
+ }
+
+ private Map getQueryStringParameterMap() {
+ Map parameters = new HashMap();
+ String[] pairs = queryString.split("&");
+ for (int i = 0; i < pairs.length; i++) {
+ String[] nameAndValue = pairs[i].split("=", 2);
+ String name = nameAndValue[0];
+ String value = nameAndValue[1];
+ String[] existingValues = (String[]) parameters.get(name);
+ String[] newValues = join(existingValues, new String[] { value });
+ parameters.put(name, newValues);
+ }
+ return parameters;
+ }
+
+ private boolean hasQueryString() {
+ return queryString != null;
+ }
+
+ private boolean isGetRequest() {
+ return "GET".equals(getMethod());
+ }
+
+ private boolean isPostRequest() {
+ return "POST".equals(getMethod());
+ }
}
Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletResponse.java
===================================================================
--- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletResponse.java 2012-04-12 17:40:41 UTC (rev 271)
+++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletResponse.java 2012-05-04 10:56:29 UTC (rev 272)
@@ -33,142 +33,153 @@
*/
public class MockHttpServletResponse implements HttpServletResponse {
- private ServletOutputStream servletOutputStream;
- private String description;
- private PrintWriter writer;
+ private String characterEncoding;
+ private ServletOutputStream servletOutputStream;
+ private String description;
+ private PrintWriter writer;
+ private Locale locale;
+ private String contentType;
+ private int bufferSize;
- public MockHttpServletResponse() {
- this(new ByteArrayOutputStream());
- description = "(in-memory)";
- }
+ public MockHttpServletResponse() {
+ this(new ByteArrayOutputStream());
+ description = "(in-memory)";
+ }
- public MockHttpServletResponse(File output) throws FileNotFoundException {
- this(new FileOutputStream(output));
- description = "(output file: " + output.getAbsolutePath() + ")";
- }
+ public MockHttpServletResponse(File output) throws FileNotFoundException {
+ this(new FileOutputStream(output));
+ description = "(output file: " + output.getAbsolutePath() + ")";
+ }
- private MockHttpServletResponse(final OutputStream output) {
- this.servletOutputStream = new JspTestServletOutputStream(output);
- writer = new PrintWriter(servletOutputStream) {
- };
- }
+ private MockHttpServletResponse(final OutputStream output) {
+ this.servletOutputStream = new JspTestServletOutputStream(output);
+ writer = new PrintWriter(servletOutputStream) {
+ };
+ this.bufferSize = 0;
+ this.locale = Locale.getDefault();
+ this.characterEncoding = "ISO-8859-1";
+ }
- public String toString() {
- return super.toString() + " " + description;
- }
+ public String toString() {
+ return super.toString() + " " + description;
+ }
- public void addCookie(Cookie cookie) {
- }
+ public void addCookie(Cookie cookie) {
+ }
- public void addDateHeader(String s, long l) {
- }
+ public void setDateHeader(String name, long timestamp) {
+ }
- public void addHeader(String s, String s1) {
- }
+ public void setHeader(String name, String value) {
+ }
- public void addIntHeader(String s, int i) {
- }
+ public void setIntHeader(String name, int value) {
+ }
- public boolean containsHeader(String s) {
- return false;
- }
+ public void addDateHeader(String name, long timestamp) {
+ }
- public String encodeRedirectURL(String s) {
- return null;
- }
+ public void addHeader(String name, String value) {
+ }
- /** @deprecated */
- public String encodeRedirectUrl(String s) {
- return null;
- }
+ public void addIntHeader(String name, int value) {
+ }
- public String encodeURL(String s) {
- return s;
- }
+ public boolean containsHeader(String name) {
+ return false;
+ }
- /** @deprecated */
- public String encodeUrl(String s) {
- return s;
- }
+ public String encodeRedirectURL(String url) {
+ return url;
+ }
- public void flushBuffer() throws IOException {
- getOutputStream().flush();
- }
+ /** @deprecated */
+ public String encodeRedirectUrl(String url) {
+ return url;
+ }
- public int getBufferSize() {
- return 0;
- }
+ public String encodeURL(String url) {
+ return url;
+ }
- public String getCharacterEncoding() {
- return null;
- }
+ /** @deprecated */
+ public String encodeUrl(String url) {
+ return url;
+ }
- public Locale getLocale() {
- return null;
- }
+ public void reset() {
+ }
- public ServletOutputStream getOutputStream() throws IOException {
- return servletOutputStream;
- }
+ public void resetBuffer() {
+ }
- public PrintWriter getWriter() throws IOException {
- return writer;
- }
+ public void setBufferSize(int size) {
+ this.bufferSize = size;
+ }
- public boolean isCommitted() {
- return false;
- }
+ public int getBufferSize() {
+ return bufferSize;
+ }
- public void reset() {
- }
+ public void flushBuffer() throws IOException {
+ getOutputStream().flush();
+ }
- public void resetBuffer() {
- }
+ public String getCharacterEncoding() {
+ return characterEncoding;
+ }
- public void sendError(int i) throws IOException {
- throw new RuntimeException("Not implemented");
- }
+ public void setCharacterEncoding(String reference) {
+ }
- public void sendError(int i, String s) throws IOException {
- throw new RuntimeException("Not implemented");
- }
+ public Locale getLocale() {
+ return locale;
+ }
- public void sendRedirect(String s) throws IOException {
- throw new RuntimeException("Not implemented");
- }
+ public void setLocale(Locale locale) {
+ this.locale = locale;
+ }
- public void setBufferSize(int i) {
- }
+ public ServletOutputStream getOutputStream() throws IOException {
+ return servletOutputStream;
+ }
- public void setContentLength(int i) {
- }
+ public PrintWriter getWriter() throws IOException {
+ return writer;
+ }
- public void setContentType(String s) {
- }
+ public boolean isCommitted() {
+ return false;
+ }
- public void setDateHeader(String s, long l) {
- }
+ /** @deprecated */
+ public void setStatus(int statusCode) {
+ }
- public void setHeader(String s, String s1) {
- }
+ public void setStatus(int statusCode, String description) {
+ }
- public void setIntHeader(String s, int i) {
- }
+ public void sendError(int statusCode) throws IOException {
+ throw new RuntimeException("Not implemented");
+ }
- public void setLocale(Locale locale) {
- }
+ public void sendError(int statusCode, String description)
+ throws IOException {
+ throw new RuntimeException("Not implemented");
+ }
- /** @deprecated */
- public void setStatus(int i) {
- }
+ public void sendRedirect(String location) throws IOException {
+ throw new RuntimeException("Not implemented");
+ }
- public void setStatus(int i, String s) {
- }
+ public void setContentLength(int contentLength) {
+ }
- public String getContentType() {
- return null;
- }
+ public void setContentType(String mimeType) {
+ this.contentType = mimeType;
+ }
- public void setCharacterEncoding(String reference) {
- }
+ public String getContentType() {
+ return contentType;
+ }
}
Added: trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/TestMockHttpServletRequest.java
===================================================================
--- trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/TestMockHttpServletRequest.java (rev 0)
+++ trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/TestMockHttpServletRequest.java 2012-05-04 10:56:29 UTC (rev 272)
@@ -0,0 +1,331 @@
+package net.sf.jsptest.compiler.jsp20.mock;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+public class TestMockHttpServletRequest extends TestCase {
+
+ private MockHttpServletRequest get;
+ private MockHttpServletRequest post;
+ private byte[] body;
+
+ protected void setUp() throws Exception {
+ body = "body".getBytes();
+ get = new MockHttpServletRequest();
+ post = new MockHttpServletRequest(body);
+ post.setMethod("POST");
+ }
+
+ public void testCharacterEncodingCanBeConfigured() throws Exception {
+ assertEquals("ISO-8859-1", get.getCharacterEncoding());
+ get.setCharacterEncoding("UTF-8");
+ assertEquals("UTF-8", get.getCharacterEncoding());
+ }
+
+ public void testReadingRequestBodyAsInputStream() throws Exception {
+ assertEquals(new String(body), asString(post.getInputStream()));
+ }
+
+ public void testReadingRequestBodyThroughBufferedReader() throws Exception {
+ assertEquals(new String(body), asString(post.getReader()));
+ }
+
+ public void testCannotReadBodyTwiceThroughInputStream() throws Exception {
+ post.getInputStream();
+ try {
+ post.getInputStream();
+ fail("shouldn't let us access the InputStream twice!");
+ } catch (IOException expected) {
+ }
+ }
+
+ public void testCannotReadBodyTwiceThroughReader() throws Exception {
+ post.getReader();
+ try {
+ post.getReader();
+ fail("shouldn't let us access the BufferedReader twice!");
+ } catch (IOException expected) {
+ }
+ }
+
+ public void testCannotReadBodyTwiceWithDifferentMethods() throws Exception {
+ try {
+ post.getReader();
+ post.getInputStream();
+ fail("shouldn't let us access the BufferedReader AND the InputStream!");
+ } catch (IOException expected) {
+ }
+ try {
+ post.getInputStream();
+ post.getReader();
+ fail("shouldn't let us access the InputStreamAND the BufferedReader !");
+ } catch (IOException expected) {
+ }
+ }
+
+ // TODO: test handling body and its length
+
+ public void testSettingIndividualHeader() throws Exception {
+ get.setHeader("X-Vibe", "Cool");
+ assertEquals("Cool", get.getHeader("X-Vibe"));
+ assertEquals("Cool", get.getHeader("x-VibE"));
+ assertEquals(asList(new String[] { "Cool" }),
+ collect(get.getHeaders("x-vibe")));
+ assertTrue(collect(get.getHeaderNames()).contains("X-Vibe"));
+ assertFalse(collect(get.getHeaderNames()).contains("x-ViBe"));
+ }
+
+ public void testSettingMultipleValuesForHeader() throws Exception {
+ get.setHeader("X-VIBE", "Uppercase");
+ get.setHeader("X-VIBE", "Another Uppercase");
+ get.setHeader("x-vibe", "Lowercase");
+ assertEquals("Uppercase", get.getHeader("X-vIbE"));
+ assertEquals(asList(new String[] { "Uppercase", "Another Uppercase",
+ "Lowercase" }), collect(get.getHeaders("x-VibE")));
+ assertTrue(collect(get.getHeaderNames()).contains("X-VIBE"));
+ assertFalse(collect(get.getHeaderNames()).contains("x-vibe"));
+ }
+
+ public void testDateHeader() throws Exception {
+ Date date = MockHttpServletRequest.RFC2616
+ .parse("Fri, 04 May 2012 06:41:23 GMT");
+ get.setHeader("X-Date1", date);
+ assertEquals(date.getTime(), get.getDateHeader("X-Date1"));
+ get.setHeader("X-Date2", MockHttpServletRequest.RFC2616.format(date));
+ assertEquals(date.getTime(), get.getDateHeader("X-Date2"));
+ }
+
+ public void testIntHeader() throws Exception {
+ get.setHeader("X-NotANumber", "NotANumber");
+ get.setHeader("X-Number", 123);
+ get.setHeader("X-Number", "456");
+ assertEquals(123, get.getIntHeader("X-Number"));
+ assertEquals(-1, get.getIntHeader("X-No-Such-Header"));
+ try {
+ get.getIntHeader("X-NotANumber");
+ fail("Using getIntHeader() on NaN header value should yield an exception");
+ } catch (NumberFormatException expected) {
+ }
+ }
+
+ public void testAttributes() throws Exception {
+ post.setAttribute("name", "value");
+ post.setAttribute("over", "whatever");
+ post.setAttributes(new HashMap() {
+ {
+ put("over", "written");
+ }
+ });
+ assertEquals("value", post.getAttribute("name"));
+ assertEquals("written", post.getAttribute("over"));
+ assertTrue(collect(post.getAttributeNames()).contains("name"));
+ assertTrue(collect(post.getAttributeNames()).contains("over"));
+ }
+
+ public void testAddingValueForSameParameterMultipleTimes() {
+ post.addParameter("name", "value1");
+ post.addParameter("name", "value2");
+ assertTrue(collect(post.getParameterNames()).contains("name"));
+ List parameterValues = asList(post.getParameterValues("name"));
+ assertTrue(parameterValues.contains("value1"));
+ assertTrue(parameterValues.contains("value2"));
+ }
+
+ public void testSettingParametersOverwritesExistingValues()
+ throws Exception {
+ post.addParameter("name", "original");
+ post.setParameters(new HashMap() {
+ {
+ put("name", new String[] { "new value" });
+ }
+ });
+ assertEquals("new value", post.getParameter("name"));
+ assertFalse(asList(post.getParameterValues("name"))
+ .contains("original"));
+ }
+
+ public void testGetQueryStringReturnsNullWhenNoQueryParametersWereSet()
+ throws Exception {
+ assertNull(get.getQueryString());
+ assertNull(post.getQueryString());
+ }
+
+ public void testQueryStringShouldBeTheOneThatWasSet() throws Exception {
+ get.setQueryString("foo=bar&xyz=123");
+ assertEquals("foo=bar&xyz=123", get.getQueryString());
+ }
+
+ public void testQueryStringShouldMatchParametersAddedToGetRequest()
+ throws Exception {
+ get.addParameter("xyz", new String[] { "456", "123" });
+ get.addParameter("foo", "bar");
+ assertEquals("foo=bar&xyz=456&xyz=123", get.getQueryString());
+ }
+
+ public void testParametersShouldMatchTheQueryStringSetToGetRequest()
+ throws Exception {
+ get.setQueryString("foo=bar&xyz=456&xyz=123");
+ assertEquals("bar", get.getParameter("foo"));
+ assertEquals(asList(new String[] { "456", "123" }),
+ asList(get.getParameterValues("xyz")));
+ assertEquals(asList(new String[] { "foo", "xyz" }),
+ collect(get.getParameterNames()));
+ }
+
+ public void testPostRequestCouldHaveBothQueryStringParametersAndBodyParameters()
+ throws Exception {
+ post.setQueryString("param=querystring");
+ post.addParameter("param", "added");
+ assertEquals(asList(new String[] { "added", "querystring" }),
+ asList(post.getParameterValues("param")));
+ }
+
+ public void testGetRealPathPointsUnderSystemTempDir() throws Exception {
+ String realPath = get.getRealPath("/admin/index.jsp");
+ assertTrue(realPath.endsWith("/admin/index.jsp"));
+ assertTrue(realPath.startsWith(System.getProperty("java.io.tmpdir")));
+ }
+
+ public void testGetRequestURLIsConsistentWithSpecificQueryMethods()
+ throws Exception {
+ get.setScheme("https");
+ get.setContextPath("/contextpath");
+ get.setServerPort(1234);
+ get.setServerName("servername");
+ get.setServletPath("/servletpath");
+ get.setQueryString("query=string");
+
+ assertEquals("/contextpath/servletpath", get.getRequestURI());
+ assertEquals("https://servername:1234/contextpath/servletpath", get
+ .getRequestURL().toString());
+ }
+
+ public void testRequestURICanBeSet() throws Exception {
+ get.setRequestURI("/path/to/page.jsp");
+ assertEquals("/path/to/page.jsp", get.getRequestURI());
+ assertEquals("", get.getContextPath());
+ assertEquals("", get.getServletPath());
+ }
+
+ public void testSettingRequestURIContextPathAndServletPaths()
+ throws Exception {
+ get.setRequestURI("/path/to/page.jsp");
+ get.setContextPath("/path");
+ get.setServletPath("/to");
+ assertEquals("/path/to/page.jsp", get.getRequestURI());
+ assertEquals("/path", get.getContextPath());
+ assertEquals("/to", get.getServletPath());
+ }
+
+ public void testRequestURIMustMatchPreviouslySetContextPath()
+ throws Exception {
+ post.setContextPath("/context");
+ try {
+ post.setRequestURI("/differentContext/page.jsp");
+ fail("Request URI must match the context path that was set.");
+ } catch (IllegalArgumentException expected) {
+ }
+ }
+
+ public void testContextPathMustMatchPreviouslySetRequestURI()
+ throws Exception {
+ get.setRequestURI("/path/to/page.jsp");
+ try {
+ get.setContextPath("/differentPath");
+ fail("Context path must match the request URI that was set.");
+ } catch (IllegalArgumentException expected) {
+ }
+ }
+
+ public void testRequestURLCanBeSet() throws Exception {
+ get.setRequestURL("http://server:99/path/to/page.jsp");
+ assertEquals("http://server:99/path/to/page.jsp", get.getRequestURL()
+ .toString());
+ assertEquals("", get.getContextPath());
+ assertEquals("", get.getServletPath());
+ }
+
+ public void testSettingSpecificPartsAfterSettingTheFullRequestURL()
+ throws Exception {
+ get.setRequestURL("http://whatever/context/path");
+ get.setServerName("something.el.se");
+ get.setServerPort(8000);
+ get.setContextPath("/context");
+ assertEquals("http://something.el.se:8000/context/path", get
+ .getRequestURL().toString());
+ assertEquals("something.el.se", get.getServerName());
+ assertEquals(8000, get.getServerPort());
+ assertEquals("/context", get.getContextPath());
+ }
+
+ private String asString(InputStream stream)
+ throws UnsupportedEncodingException {
+ return asString(stream, "UTF-8");
+ }
+
+ private String asString(InputStream stream, String charset)
+ throws UnsupportedEncodingException {
+ return new String(contentOf(stream, charset), charset);
+ }
+
+ private String asString(BufferedReader reader)
+ throws UnsupportedEncodingException {
+ return asString(reader, "UTF-8");
+ }
+
+ private String asString(BufferedReader reader, String charset)
+ throws UnsupportedEncodingException {
+ return new String(contentOf(reader), charset);
+ }
+
+ private byte[] contentOf(InputStream stream, String charset) {
+ try {
+ return contentOf(new InputStreamReader(stream, charset));
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private byte[] contentOf(Reader reader) {
+ try {
+ ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+ int b = -1;
+ while ((b = reader.read()) != -1) {
+ buffer.write(b);
+ }
+ return buffer.toByteArray();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private Collection collect(Enumeration enumeration) {
+ Collection list = new ArrayList();
+ while (enumeration.hasMoreElements()) {
+ list.add(enumeration.nextElement());
+ }
+ return list;
+ }
+
+ private List asList(String string) {
+ return asList(new String[] { string });
+ }
+
+ private List asList(String[] array) {
+ return Arrays.asList(array);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2012-04-12 17:40:48
|
Revision: 271
http://jsptest.svn.sourceforge.net/jsptest/?rev=271&view=rev
Author: lkoskela
Date: 2012-04-12 17:40:41 +0000 (Thu, 12 Apr 2012)
Log Message:
-----------
Add Ronaldo Webb as an @author for JspTestCase et al.
Modified Paths:
--------------
trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/Jsp.java
trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java
trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java
trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java
Modified: trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/Jsp.java
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/Jsp.java 2012-04-11 23:19:30 UTC (rev 270)
+++ trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/Jsp.java 2012-04-12 17:40:41 UTC (rev 271)
@@ -4,6 +4,7 @@
/**
* @author Lasse Koskela
+ * @author Ronaldo Webb
*/
public interface Jsp {
Modified: trunk/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 2012-04-11 23:19:30 UTC (rev 270)
+++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java 2012-04-12 17:40:41 UTC (rev 271)
@@ -33,6 +33,7 @@
*
* @author Lasse Koskela
* @author Meinert Schwartau (scwar32)
+ * @author Ronaldo Webb
*/
public abstract class JspTestCase extends TestCase {
Modified: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java 2012-04-11 23:19:30 UTC (rev 270)
+++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java 2012-04-12 17:40:41 UTC (rev 271)
@@ -8,6 +8,7 @@
/**
* @author Lasse Koskela
* @author Meinert Schwartau (scwar32)
+ * @author Ronaldo Webb
*/
public class FakeJspCompiler implements JspCompiler {
Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java
===================================================================
--- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java 2012-04-11 23:19:30 UTC (rev 270)
+++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java 2012-04-12 17:40:41 UTC (rev 271)
@@ -23,6 +23,7 @@
/**
* @author Lasse Koskela
+ * @author Ronaldo Webb
*/
public class JspImpl implements Jsp {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2012-04-11 23:19:37
|
Revision: 270
http://jsptest.svn.sourceforge.net/jsptest/?rev=270&view=rev
Author: lkoskela
Date: 2012-04-11 23:19:30 +0000 (Wed, 11 Apr 2012)
Log Message:
-----------
Implement support for setting request parameters from subclasses of JspTestCase.
Modified Paths:
--------------
trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/Jsp.java
trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java
trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java
trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/echo_attributes.jsp
trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java
trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletRequest.java
trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/TestJspImpl.java
Added Paths:
-----------
trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestParameterTest.java
trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/resources/websrc/echo_parameters.jsp
trunk/jsptest-jsp21/src/test/resources/
Added: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestParameterTest.java
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestParameterTest.java (rev 0)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestParameterTest.java 2012-04-11 23:19:30 UTC (rev 270)
@@ -0,0 +1,38 @@
+/*
+ * 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;
+
+/**
+ * @author Lasse Koskela
+ */
+public class RequestParameterTest extends JspTestCase {
+
+ protected String getWebRoot() {
+ return "src/test/resources/websrc";
+ }
+
+ public void testRequestParameters() throws Exception {
+ setRequestParameter("Rn1", "Rv1");
+ setRequestParameter("Rn2", "Rv2");
+ setRequestParameter("Rn3", new String[] {"Rv3a", "Rv3b"});
+ get("/echo_parameters.jsp");
+ output().shouldContain("request parameter: 'Rn1'='Rv1'");
+ output().shouldContain("request parameter: 'Rn2'='Rv2'");
+ output().shouldContain("request parameter: 'Rn3'='Rv3a','Rv3b'");
+ }
+}
Added: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/resources/websrc/echo_parameters.jsp
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/resources/websrc/echo_parameters.jsp (rev 0)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/resources/websrc/echo_parameters.jsp 2012-04-11 23:19:30 UTC (rev 270)
@@ -0,0 +1,21 @@
+<%@ page language="Java" %>
+<%@ page import="java.util.*" %>
+
+Request parameters:
+<%
+ Enumeration requestParameters = request.getParameterNames();
+ while (requestParameters.hasMoreElements()) {
+ String name = (String) requestParameters.nextElement();
+ String[] values = request.getParameterValues(name);
+ out.print("request parameter: '" + name + "'=");
+ for (int i = 0; i < values.length; i++) {
+ if (i > 0) {
+ out.print(",");
+ }
+ out.print("'" + values[i] + "'");
+ }
+ out.println();
+ //String value = String.valueOf(request.getParameter(name));
+ //out.println("request parameter: '" + name + "'='" + value + "'");
+ }
+%>
Modified: trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/Jsp.java
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/Jsp.java 2012-04-11 23:16:22 UTC (rev 269)
+++ trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/Jsp.java 2012-04-11 23:19:30 UTC (rev 270)
@@ -7,5 +7,5 @@
*/
public interface Jsp {
- JspExecution request(String httpMethod, Map requestAttributes, Map sessionAttributes);
+ JspExecution request(String httpMethod, Map requestAttributes, Map sessionAttributes, Map requestParameters);
}
Modified: trunk/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 2012-04-11 23:16:22 UTC (rev 269)
+++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java 2012-04-11 23:19:30 UTC (rev 270)
@@ -37,6 +37,7 @@
public abstract class JspTestCase extends TestCase {
private Logger log;
+ private Map requestParameters;
private Map requestAttributes;
private Map sessionAttributes;
private Map substituteTaglibs;
@@ -51,6 +52,7 @@
* if you override this!</b>
*/
protected void setUp() throws Exception {
+ requestParameters = new HashMap();
requestAttributes = new HashMap();
sessionAttributes = new HashMap();
substituteTaglibs = new HashMap();
@@ -87,8 +89,32 @@
protected void setRequestAttribute(String attribute, Object value) {
requestAttributes.put(attribute, value);
}
+
+ /**
+ * Sets a single value for a request parameter for the next request.
+ *
+ * @param attribute
+ * Name of the attribute.
+ * @param value
+ * Value for the attribute.
+ */
+ protected void setRequestParameter(String parameter, String value) {
+ setRequestParameter(parameter, new String[] {value});
+ }
/**
+ * Sets multiple values for a request parameter for the next request.
+ *
+ * @param attribute
+ * Name of the attribute.
+ * @param values
+ * Values for the attribute.
+ */
+ protected void setRequestParameter(String parameter, String[] values) {
+ requestParameters.put(parameter, values);
+ }
+
+ /**
* Simulate a HTTP GET request to the specified JSP file.
*
* @param path
@@ -127,7 +153,7 @@
compiler.setOutputDirectory(getOutputDirectory());
Jsp jsp = compiler.compile(path, substituteTaglibs);
log.debug("Simulating a request to " + path);
- execution = jsp.request(httpMethod, requestAttributes, sessionAttributes);
+ execution = jsp.request(httpMethod, requestAttributes, sessionAttributes, requestParameters);
}
private void validatePath(String path) {
Modified: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java 2012-04-11 23:16:22 UTC (rev 269)
+++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java 2012-04-11 23:19:30 UTC (rev 270)
@@ -38,7 +38,7 @@
return new Jsp() {
public JspExecution request(String httpMethod, Map requestAttributes,
- Map sessionAttributes) {
+ Map sessionAttributes, Map requestParameters) {
return new JspExecution() {
public String getRenderedResponse() {
Modified: trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/echo_attributes.jsp
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/echo_attributes.jsp 2012-04-11 23:16:22 UTC (rev 269)
+++ trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/echo_attributes.jsp 2012-04-11 23:19:30 UTC (rev 270)
@@ -1,22 +0,0 @@
-<%@ page language="Java" %>
-<%@ page import="java.util.*" %>
-
-Request attributes:
-<%
- Enumeration requestAttributes = request.getAttributeNames();
- while (requestAttributes.hasMoreElements()) {
- String name = (String) requestAttributes.nextElement();
- String value = String.valueOf(request.getAttribute(name));
- out.println("request attribute: '" + name + "'='" + value + "'");
- }
-%>
-
-Session attributes:
-<%
- Enumeration sessionAttributes = session.getAttributeNames();
- while (sessionAttributes.hasMoreElements()) {
- String name = (String) sessionAttributes.nextElement();
- String value = String.valueOf(session.getAttribute(name));
- out.println("session attribute: '" + name + "'='" + value + "'");
- }
-%>
Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java
===================================================================
--- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java 2012-04-11 23:16:22 UTC (rev 269)
+++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java 2012-04-11 23:19:30 UTC (rev 270)
@@ -34,7 +34,7 @@
this.servletClass = servletClass;
}
- public JspExecution request(String httpMethod, Map requestAttributes, Map sessionAttributes) {
+ public JspExecution request(String httpMethod, Map requestAttributes, Map sessionAttributes, Map requestParameters) {
ServletContext servletContext = new MockServletContext();
ServletConfig servletConfig = new MockServletConfig(servletContext);
MockHttpSession httpSession = new MockHttpSession();
@@ -43,6 +43,7 @@
request.setSession(httpSession);
request.setMethod(httpMethod);
request.setAttributes(requestAttributes);
+ request.setParameters(requestParameters);
MockHttpServletResponse response = new MockHttpServletResponse();
MockJspWriter jspWriter = configureJspFactory(servletContext, request, httpSession);
initializeAndInvokeJsp(servletClass, servletConfig, request, response);
Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletRequest.java
===================================================================
--- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletRequest.java 2012-04-11 23:16:22 UTC (rev 269)
+++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletRequest.java 2012-04-11 23:19:30 UTC (rev 270)
@@ -24,6 +24,7 @@
import java.util.Arrays;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.Vector;
@@ -337,6 +338,15 @@
public String[] getParameterValues(String name) {
return (String[]) parameters.get(name);
}
+
+ public void setParameters(Map requestParameters) {
+ Iterator parameterNames = requestParameters.keySet().iterator();
+ while (parameterNames.hasNext()) {
+ String name = (String) parameterNames.next();
+ String[] values = (String[]) requestParameters.get(name);
+ parameters.put(name, values);
+ }
+ }
public void setSession(MockHttpSession session) {
this.httpSession = session;
Modified: trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/TestJspImpl.java
===================================================================
--- trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/TestJspImpl.java 2012-04-11 23:16:22 UTC (rev 269)
+++ trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/TestJspImpl.java 2012-04-11 23:19:30 UTC (rev 270)
@@ -47,6 +47,13 @@
out.print("=");
out.println(session.getAttribute(name));
}
+ Enumeration names3 = req.getParameterNames();
+ while (names3.hasMoreElements()) {
+ String name = (String) names3.nextElement();
+ out.print(name);
+ out.print("=");
+ out.println(req.getParameter(name));
+ }
out.println();
out.flush();
out.close();
@@ -55,15 +62,18 @@
protected String responseOutput;
private JspImpl jspImpl;
+ private Map requestParameters;
private Map requestAttributes;
private Map sessionAttributes;
private MockJspWriter mockJspWriter;
protected void setUp() throws Exception {
+ requestParameters = new HashMap();
requestAttributes = new HashMap();
sessionAttributes = new HashMap();
requestAttributes.put("REQATTR", "REQVALUE");
sessionAttributes.put("SESATTR", "SESVALUE");
+ requestParameters.put("REQPARM", new String[] {"PARAMVAL"});
jspImpl = new JspImpl(FakeServlet.class) {
protected MockJspWriter configureJspFactory(ServletContext httpContext,
@@ -81,6 +91,11 @@
assertOutputContains("httpMethod=POST");
}
+ public void testRequestParametersArePassedToTheServletInstance() throws Exception {
+ simulateRequest();
+ assertOutputContains("REQPARM=PARAMVAL");
+ }
+
public void testRequestAttributesArePassedToTheServletInstance() throws Exception {
simulateRequest();
assertOutputContains("REQATTR=REQVALUE");
@@ -96,7 +111,7 @@
}
private void simulateRequest(String method) {
- JspExecution execution = jspImpl.request(method, requestAttributes, sessionAttributes);
+ JspExecution execution = jspImpl.request(method, requestAttributes, sessionAttributes, requestParameters);
responseOutput = execution.getRenderedResponse();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2012-04-11 23:16:30
|
Revision: 269
http://jsptest.svn.sourceforge.net/jsptest/?rev=269&view=rev
Author: lkoskela
Date: 2012-04-11 23:16:22 +0000 (Wed, 11 Apr 2012)
Log Message:
-----------
Revert revisions 267 and 268 in preparation to implementing request parameters directly onto Jsp* rather than a parallel JspX* hierarchy of classes.
Modified Paths:
--------------
trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java
trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestJspTestCase.java
trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java
trunk/jsptest-generic/jsptest-framework/src/test/resources/jsptest.properties
trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/index.jsp
trunk/jsptest-jsp21/pom.xml
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java
Removed Paths:
-------------
trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspX.java
trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspXCompiler.java
trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspXCompiler.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JasperCompiler.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspExecutionImpl.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspImpl.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXCompilerImpl.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXImpl.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/
trunk/jsptest-jsp21/src/main/java/org/
trunk/jsptest-jsp21/src/test/java/net/
trunk/jsptest-jsp21/src/test/resources/
Deleted: trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspX.java
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspX.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspX.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -1,15 +0,0 @@
-package net.sf.jsptest.compiler.api;
-
-import java.util.Map;
-
-/**
- * This is a Jsp Extensions however it is not a subclass of Jsp.
- * This is implemented like this to avoid breaking previous codes and maintains just one method to implement.
- *
- * @author Ronaldo Webb
- */
-public interface JspX {
-
- JspExecution request(String httpMethod, Map requestAttributes, Map sessionAttributes, Map requestParameters);
-
-}
Deleted: trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspXCompiler.java
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspXCompiler.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspXCompiler.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -1,21 +0,0 @@
-package net.sf.jsptest.compiler.api;
-
-import java.util.Map;
-
-/**
- * An extension of the JspCompiler that can return JspX instance.if
- * Implement this interface if you want the capability of using request parameters.
- *
- * @author Ronaldo Webb
- *
- */
-public interface JspXCompiler extends JspCompiler {
-
- /**
- * The the same compile method as the JspCompiler but returns JspX instance.
- * @param path The path to compile.
- * @param taglibs Maps of taglibs.
- * @return An instance of JspX.
- */
- JspX compileX(String path, Map taglibs);
-}
Modified: trunk/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 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -24,9 +24,6 @@
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.compiler.api.JspX;
-import net.sf.jsptest.compiler.api.JspXCompiler;
-
import org.apache.log4j.Logger;
/**
@@ -36,7 +33,6 @@
*
* @author Lasse Koskela
* @author Meinert Schwartau (scwar32)
- * @author Ronaldo Webb
*/
public abstract class JspTestCase extends TestCase {
@@ -44,7 +40,6 @@
private Map requestAttributes;
private Map sessionAttributes;
private Map substituteTaglibs;
- private Map requestParams;
private JspExecution execution;
public JspTestCase() {
@@ -59,7 +54,6 @@
requestAttributes = new HashMap();
sessionAttributes = new HashMap();
substituteTaglibs = new HashMap();
- requestParams = new HashMap();
}
/**
@@ -95,28 +89,6 @@
}
/**
- * Sets a request string parameter with single value.
- * @param param
- * Name of the parameter
- * @param value
- * Value of the parameter.
- */
- protected void setRequestParameter(String param, String value) {
- requestParams.put(param, value);
- }
-
- /**
- * Sets a request string parameter with multiple values.
- * @param param
- * Name of the parameter
- * @param values
- * Value of the parameter.
- */
- protected void setRequestParameter(String param, String[] values) {
- requestParams.put(param, values);
- }
-
- /**
* Simulate a HTTP GET request to the specified JSP file.
*
* @param path
@@ -149,27 +121,15 @@
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());
-
- if (compiler instanceof JspXCompiler) {
- log.debug("Using JspXCompiler");
- JspX jsp = ((JspXCompiler) compiler).compileX(path, substituteTaglibs);
- log.debug("Simulating a request to " + path);
- execution = jsp.request(httpMethod, requestAttributes, sessionAttributes, requestParams);
- }
- else {
- log.debug("Using JspCompiler");
- Jsp jsp = compiler.compile(path, substituteTaglibs);
- log.debug("Simulating a request to " + path);
- execution = jsp.request(httpMethod, requestAttributes, sessionAttributes);
- }
+ 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 \"/\"");
Modified: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestJspTestCase.java
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestJspTestCase.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestJspTestCase.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -18,7 +18,6 @@
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
import net.sf.jsptest.compiler.dummy.FakeJspCompiler;
-import net.sf.jsptest.compiler.dummy.FakeJspXCompiler;
/**
* @author Lasse Koskela
@@ -103,49 +102,4 @@
assertEquals(IllegalArgumentException.class, e.getClass());
}
}
-
- public void testJspWithNoParam() throws Exception {
- testcase.get("/index");
- testcase.output().shouldNotContain("Params");
- }
-
- public void testJspWithMultipleParamValues() throws Exception {
- testcase.setUp();
- testcase.setRequestParameter("Name", new String[] {"Value1", "Value2", "Value3"});
- testcase.get("/index");
- testcase.output().shouldContain("Params");
- testcase.output().shouldContain("Name");
- testcase.output().shouldContain("Value1");
- testcase.output().shouldContain("Value2");
- testcase.output().shouldContain("Value3");
- }
-
- public void testJspWithOneParam() throws Exception {
- testcase.setUp();
- testcase.setRequestParameter("Name", "Value");
- testcase.get("/index");
- testcase.output().shouldContain("Params");
- testcase.output().shouldContain("Name");
- testcase.output().shouldContain("Value");
- }
-
- public void testJspWithMultipleParamNullValues() throws Exception {
- testcase.setUp();
- testcase.setRequestParameter("Name", new String[] {null, "Value1", "Value2"});
- testcase.get("/index");
- testcase.output().shouldContain("Params");
- testcase.output().shouldContain("Name");
- testcase.output().shouldContain("null");
- testcase.output().shouldContain("Value1");
- testcase.output().shouldContain("Value2");
- }
-
- public void testJspWithOneParamNullValue() throws Exception {
- testcase.setUp();
- testcase.setRequestParameter("Name", (String) null);
- testcase.get("/index");
- testcase.output().shouldContain("Params");
- testcase.output().shouldContain("Name");
- testcase.output().shouldContain("null");
- }
}
Modified: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -31,10 +31,6 @@
public static void appendOutput(String content) {
fakedOutput.append(content);
}
-
- public static StringBuffer getOutput() {
- return fakedOutput;
- }
public Jsp compile(String path, Map taglibs) {
lastCompiledWebRoot = getWebRoot();
@@ -52,19 +48,11 @@
}
};
}
-
- public static void setLastCompiledPath(String path) {
- lastCompiledPath = path;
- }
-
+
public static String lastCompiledPath() {
return lastCompiledPath;
}
- public static void setLastCompiledWebRoot(String webRoot) {
- lastCompiledWebRoot = webRoot;
- }
-
public static String lastCompiledWebRoot() {
return lastCompiledWebRoot;
}
Deleted: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspXCompiler.java
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspXCompiler.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspXCompiler.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -1,60 +0,0 @@
-package net.sf.jsptest.compiler.dummy;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import net.sf.jsptest.compiler.api.JspExecution;
-import net.sf.jsptest.compiler.api.JspX;
-import net.sf.jsptest.compiler.api.JspXCompiler;
-
-public class FakeJspXCompiler extends FakeJspCompiler implements JspXCompiler {
-
- public JspX compileX(final String path, Map taglibs) {
- return new JspX() {
- {
- FakeJspCompiler.setLastCompiledWebRoot(getWebRoot());
- FakeJspCompiler.setLastCompiledPath(path);
- }
-
- public JspExecution request(String httpMethod,
- Map requestAttributes, Map sessionAttributes,
- final Map requestParameters) {
- return new JspExecution() {
- public String getRenderedResponse() {
- {
- if (null != requestParameters && !requestParameters.isEmpty()) {
- Iterator keys = requestParameters.keySet().iterator();
- FakeJspCompiler.cleanOutput();
- FakeJspCompiler.appendOutput("Params");
-
- while (keys.hasNext()) {
- String key = (String) keys.next();
- Object value = requestParameters.get(key);
-
- if (null != value) {
- if (value instanceof String[]) {
- FakeJspCompiler.appendOutput(key);
- String[] values=(String[]) value;
- for (int i = 0; i < values.length; i++) {
- FakeJspCompiler.appendOutput(values[i]);
- }
- } else {
- FakeJspCompiler.appendOutput(key);
- FakeJspCompiler.appendOutput((String) value);
- }
- }
- else {
- FakeJspCompiler.appendOutput(key);
- FakeJspCompiler.appendOutput((String) null);
- }
- }
- }
-
- }
- return FakeJspCompiler.getOutput().toString();
- }
- };
- }
- };
- }
-}
Modified: trunk/jsptest-generic/jsptest-framework/src/test/resources/jsptest.properties
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/resources/jsptest.properties 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-generic/jsptest-framework/src/test/resources/jsptest.properties 2012-04-11 23:16:22 UTC (rev 269)
@@ -1 +1 @@
-jsptest.compiler.implementation=net.sf.jsptest.compiler.dummy.FakeJspXCompiler
\ No newline at end of file
+jsptest.compiler.implementation=net.sf.jsptest.compiler.dummy.FakeJspCompiler
\ No newline at end of file
Modified: trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/index.jsp
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/index.jsp 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/index.jsp 2012-04-11 23:16:22 UTC (rev 269)
@@ -1,17 +1,3 @@
<%@ page language="Java" %>
-<%@ page import="java.util.Enumeration" %>
Hello <%= "from" %> Jasper
-The time is <%= new java.util.Date().toString() %>
-<%
- boolean display=true;
- Enumeration paramNames=request.getParameterNames();
- while (paramNames.hasMoreElements()) {
- if (display) {
- out.println("Params<br/>");
- display=false;
- }
- String paramName = (String) paramNames.nextElement();
- String paramValue = request.getParameter(paramName);
- out.println(paramName + "=" + paramValue + "<br/>");
- }
-%>
\ No newline at end of file
+The time is <%= new java.util.Date().toString() %>
\ No newline at end of file
Modified: trunk/jsptest-jsp21/pom.xml
===================================================================
--- trunk/jsptest-jsp21/pom.xml 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-jsp21/pom.xml 2012-04-11 23:16:22 UTC (rev 269)
@@ -30,15 +30,10 @@
</dependency>
<!-- Provides the Jasper JSP compiler -->
<dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler</artifactId>
- <version>5.5.15</version>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>jasper</artifactId>
+ <version>6.0.13</version>
</dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-runtime</artifactId>
- <version>5.5.15</version>
- </dependency>
</dependencies>
<build>
<resources>
Deleted: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JasperCompiler.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JasperCompiler.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JasperCompiler.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -1,375 +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.jsp21;
-
-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.Java6Compiler;
-import net.sf.jsptest.compiler.java.JavaCompiler;
-import net.sf.jsptest.compiler.java.SunJavaC;
-import net.sf.jsptest.compiler.jsp21.mock.MockOptions;
-import net.sf.jsptest.compiler.jsp21.mock.MockServletConfig;
-import net.sf.jsptest.compiler.jsp21.mock.MockTagInfo;
-import net.sf.jsptest.utils.Path;
-import net.sf.jsptest.utils.Strings;
-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
- * @author Meinert Schwartau (scwar32)
- */
-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 path
- * The path to the JSP source file to compile, given relative to the web root.
- * @param mockTaglibs
- * Mapping of tag names to tag handler classes
- */
- 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);
- compiler.compile();
- }
-
- private JspCompilationContext createJspCompilationContext(JspCompilationInfo info,
- ServletContext servletContext, Options options, JspRuntimeContext jspRuntimeContext,
- JspServletWrapper jspServletWrapper, StringWriter stringWriter) {
- boolean isErrorPage = false;
- JspCompilationContext cContext = new JspCompilationContext(info.getJspPath(), isErrorPage,
- options, servletContext, jspServletWrapper, jspRuntimeContext);
- cContext.getOutputDir(); // forces creation of the directory tree
- cContext.setServletJavaFileName(info.getJavaSource());
- cContext.setServletPackageName(getJspPackageName());
- cContext.setWriter(new ServletWriter(new PrintWriter(stringWriter)));
- createPathToGeneratedJavaSource(info);
- return cContext;
- }
-
- private void createPathToGeneratedJavaSource(JspCompilationInfo info) {
- new File(info.getJavaSource()).getParentFile().mkdirs();
- }
-
- private JspServletWrapper makeWrapper(ServletContext servletContext, Options options,
- JspRuntimeContext jspRuntimeContext) throws MalformedURLException, JasperException {
- TagInfo tagInfo = new MockTagInfo();
- String tagFilePath = "/";
- URL tagFileJarUrl = new File(".").toURL();
- JspServletWrapper wrapper = new JspServletWrapper(servletContext, options, tagFilePath,
- tagInfo, jspRuntimeContext, tagFileJarUrl);
- return wrapper;
- }
-
- private Options createOptions(ServletContext ctx, ServletConfig cfg, JspCompilationInfo info) {
- Options options = new EmbeddedServletOptions(cfg, ctx);
- return new MockOptions(options, ctx, info);
- }
-
- private void resolveJavaSourceFile(JspCompilationInfo info) {
- File dir = new File(info.getClassOutputDir());
- if (getJspPackageName().length() > 0) {
- dir = new File(dir, getJspPackageName().replace('.', '/'));
- }
- dir.mkdirs();
- String name = resolveJavaSourceFileName(info.getJspPath());
- info.setJavaSource(new File(dir, name).getPath());
- }
-
- private String resolveJavaSourceFileName(String jspPath) {
- String name = encodeSpecialCharacters(jspPath);
- if (name.startsWith("/")) {
- name = name.substring(1);
- }
- return name + ".java";
- }
-
- private String encodeSpecialCharacters(String name) {
- StringBuffer result = new StringBuffer();
- char[] chars = name.toCharArray();
- for (int i = 0; i < chars.length; i++) {
- if (chars[i] == '-') {
- result.append("_002d");
- } else if (chars[i] == '_') {
- result.append("_005f");
- } else if (chars[i] == '.') {
- result.append("_");
- } else {
- result.append(chars[i]);
- }
- }
- return result.toString();
- }
-
- private String resolveJspSourceFile(String jsp) {
- if (jsp.startsWith("/")) {
- jsp = jsp.substring(1);
- }
- return new File(getWebRoot(), jsp).getPath();
- }
-
- private void resolveClassName(JspCompilationInfo info) {
- String baseName = new File(info.getJavaSource()).getName();
- baseName = baseName.substring(0, baseName.indexOf("."));
- String packageName = getPackagePrefix() + getSubDirPackagePrefix(info);
- info.setClassName(packageName + baseName);
- }
-
- private String getPackagePrefix() {
- String packagePrefix = getJspPackageName();
- if (packagePrefix != null && packagePrefix.length() > 0) {
- packagePrefix = packagePrefix + ".";
- }
- return packagePrefix;
- }
-
- private String getSubDirPackagePrefix(JspCompilationInfo info) {
- String dirPrefix = info.getJspPath();
- if (dirPrefix.startsWith("/")) {
- dirPrefix = dirPrefix.substring(1);
- }
- int lastSlashIndex = dirPrefix.lastIndexOf("/");
- if (lastSlashIndex != -1) {
- dirPrefix = dirPrefix.substring(0, lastSlashIndex);
- dirPrefix = encodeSpecialCharacters(dirPrefix);
- dirPrefix = dirPrefix.replace('/', '.') + ".";
- } else {
- dirPrefix = "";
- }
- return dirPrefix;
- }
-
- private void compileJavaToBytecode(JspCompilationInfo info) throws Exception {
- File classFile = new File(info.getClassFile());
- classFile.delete();
- logCompilation(info.getJavaSource(), info.getClassOutputDir());
- boolean ok = javac()
- .compile(info.getJavaSource(), info.getClassOutputDir(), getClassPath());
- assertTrue("javac failed", ok);
- assertTrue("Failed to compile .java file to " + classFile.getAbsolutePath(), classFile
- .exists());
- }
-
- private String[] getClassPath() {
- Path cp = new Path();
- cp.addSystemProperty("java.class.path");
- cp.addContainer(javax.servlet.jsp.tagext.JspTag.class);
- cp.addContainer(javax.servlet.jsp.jstl.core.LoopTag.class);
- cp.addContainer(javax.servlet.http.HttpServlet.class);
- cp.addContainer(org.apache.taglibs.standard.Version.class);
- cp.addContainer(org.apache.jasper.JspC.class);
- cp.addContainer(org.apache.jasper.compiler.Compiler.class);
- cp.addContainer(org.apache.jasper.runtime.HttpJspBase.class);
- cp.add(new File("target", "test-classes").getAbsolutePath());
- cp.add(new File("target", "classes").getAbsolutePath());
- return cp.toStringArray();
- }
-
- private void resolveClassFileLocation(JspCompilationInfo info) {
- String file = Strings.replace(info.getJavaSource(), ".java", ".class");
- info.setClassFile(file);
- }
-
- private static void assertTrue(String errorMessage, boolean condition) {
- if (!condition) {
- throw new RuntimeException(errorMessage);
- }
- }
-
- private static JavaCompiler determineJavaCompiler() {
- List compilers = new ArrayList();
- // this doesn't work because with Maven we need to set the classpath
- // explicitly as the "current" classpath does not include our
- // dependencies
- compilers.add(new Java6Compiler());
- compilers.add(new SunJavaC());
- compilers.add(new CommandLineJavac());
- for (Iterator i = compilers.iterator(); i.hasNext();) {
- JavaCompiler compiler = (JavaCompiler) i.next();
- if (compiler.isAvailable()) {
- log.debug("Using JavaCompiler: " + compiler.getClass().getName());
- return compiler;
- }
- }
- throw new RuntimeException("No JavaCompiler implementation available on the system");
- }
-
- private static JavaCompiler javac() {
- return COMPILER;
- }
-
- private void logCompilation(String src, String dst) {
- log.debug(" Compiling " + src + " to " + dst);
- }
-}
Modified: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -1,68 +1,22 @@
package net.sf.jsptest.compiler.jsp21;
-import java.io.File;
import java.util.Map;
-
-import org.apache.jasper.servlet.JasperLoader;
-
-import net.sf.jsptest.compiler.JspCompilationInfo;
import net.sf.jsptest.compiler.api.Jsp;
import net.sf.jsptest.compiler.api.JspCompiler;
-import net.sf.jsptest.utils.CustomClassLoader;
/**
* @author Lasse Koskela
* @author Meinert Schwartau (scwar32)
- * @auther Ronaldo Webb
*/
public class JspCompilerImpl implements JspCompiler {
- private String outputDirectory = new File(System.getProperty("java.io.tmpdir"),
- "jsptest-classes").getAbsolutePath();
- private String webRoot;
+ public Jsp compile(String path, Map taglibs) {
+ throw new RuntimeException("Not implemented");
+ }
public void setOutputDirectory(String directory) {
- outputDirectory = directory;
}
- protected String getOutputDirectory() {
- return outputDirectory;
- }
-
public void setWebRoot(String directory) {
- this.webRoot = directory;
}
-
- protected String getWebRoot() {
- return webRoot;
- }
-
- protected JasperCompiler getCompiler() {
- JasperCompiler compiler = new JasperCompiler();
- compiler.setWebRoot(getWebRoot());
- compiler.setClassOutputBaseDir(getOutputDirectory());
-
- return compiler;
- }
-
- public Jsp compile(final String jspPath, Map taglibs) {
- try {
- JasperCompiler compiler = getCompiler();
- JspCompilationInfo info = compiler.compile(jspPath, taglibs);
- final Class servletClass = compileToClass(info);
- return new JspImpl(servletClass);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- protected Class compileToClass(JspCompilationInfo compilation) throws Exception,
- ClassNotFoundException {
- return loadJspClass(compilation.getClassName());
- }
-
- protected Class loadJspClass(String jspClassName) throws ClassNotFoundException {
- ClassLoader cl = new CustomClassLoader(getOutputDirectory());
- return cl.loadClass(jspClassName);
- }
}
Deleted: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspExecutionImpl.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspExecutionImpl.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspExecutionImpl.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -1,19 +0,0 @@
-package net.sf.jsptest.compiler.jsp21;
-
-import net.sf.jsptest.compiler.api.JspExecution;
-
-/**
- * @author Lasse Koskela
- */
-public class JspExecutionImpl implements JspExecution {
-
- private final String renderedOutput;
-
- public JspExecutionImpl(String output) {
- this.renderedOutput = output;
- }
-
- public String getRenderedResponse() {
- return renderedOutput;
- }
-}
Deleted: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspImpl.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspImpl.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspImpl.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -1,87 +0,0 @@
-package net.sf.jsptest.compiler.jsp21;
-
-import java.util.Map;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-import javax.servlet.jsp.JspFactory;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import net.sf.jsptest.compiler.api.Jsp;
-import net.sf.jsptest.compiler.api.JspExecution;
-import net.sf.jsptest.compiler.jsp21.mock.MockHttpServletRequest;
-import net.sf.jsptest.compiler.jsp21.mock.MockHttpServletResponse;
-import net.sf.jsptest.compiler.jsp21.mock.MockHttpSession;
-import net.sf.jsptest.compiler.jsp21.mock.MockJspFactory;
-import net.sf.jsptest.compiler.jsp21.mock.MockJspWriter;
-import net.sf.jsptest.compiler.jsp21.mock.MockPageContext;
-import net.sf.jsptest.compiler.jsp21.mock.MockServletConfig;
-import net.sf.jsptest.compiler.jsp21.mock.MockServletContext;
-
-/**
- * @author Lasse Koskela
- */
-public class JspImpl implements Jsp {
-
- private static final Log log = LogFactory.getLog(JspImpl.class);
- private final Class servletClass;
- private MockPageContext pageContext;
-
- public JspImpl(Class servletClass) {
- this.servletClass = servletClass;
- }
-
- public JspExecution request(String httpMethod, Map requestAttributes, Map sessionAttributes) {
- ServletContext servletContext = new MockServletContext();
- ServletConfig servletConfig = new MockServletConfig(servletContext);
- MockHttpSession httpSession = new MockHttpSession();
- httpSession.setAttributes(sessionAttributes);
- MockHttpServletRequest request = new MockHttpServletRequest();
- request.setSession(httpSession);
- request.setMethod(httpMethod);
- request.setAttributes(requestAttributes);
- MockHttpServletResponse response = new MockHttpServletResponse();
- MockJspWriter jspWriter = configureJspFactory(servletContext, request, httpSession);
- initializeAndInvokeJsp(servletClass, servletConfig, request, response);
- return createExecutionResult(jspWriter.getContents());
- }
-
- protected MockJspWriter configureJspFactory(ServletContext httpContext,
- HttpServletRequest httpRequest, HttpSession httpSession) {
- pageContext = new MockPageContext();
- pageContext.setRequest(httpRequest);
- pageContext.setServletContext(httpContext);
- pageContext.setSession(httpSession);
- MockJspWriter jspWriter = new MockJspWriter();
- pageContext.setJspWriter(jspWriter);
- JspFactory.setDefaultFactory(new MockJspFactory(pageContext));
- return jspWriter;
- }
-
- protected void initializeAndInvokeJsp(Class jspClass, ServletConfig servletConfig,
- HttpServletRequest request, HttpServletResponse response) {
- try {
- log.debug("Instantiating Servlet: " + jspClass.getName());
- HttpServlet servlet = (HttpServlet) jspClass.newInstance();
- log.debug("Initializing Servlet: " + jspClass.getName());
- servlet.init(servletConfig);
- log.debug("Invoking Servlet: " + jspClass.getName());
- servlet.service(request, response);
- if (pageContext.getException() != null) {
- log.debug("An exception was stored into PageContext. Rethrowing it...");
- throw new RuntimeException(pageContext.getException());
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- protected JspExecution createExecutionResult(String output) {
- return new JspExecutionImpl(output);
- }
-}
Deleted: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXCompilerImpl.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXCompilerImpl.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXCompilerImpl.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -1,33 +0,0 @@
-package net.sf.jsptest.compiler.jsp21;
-
-import java.util.Map;
-
-import net.sf.jsptest.compiler.JspCompilationInfo;
-import net.sf.jsptest.compiler.api.JspXCompiler;
-import net.sf.jsptest.compiler.api.JspX;
-import net.sf.jsptest.compiler.jsp21.JasperCompiler;
-import net.sf.jsptest.compiler.jsp21.JspCompilerImpl;
-
-/**
- * Add the capability to call the JspXImpl which has the capability to process request parameters.
- *
- * @author Ronaldo Webb
- */
-public class JspXCompilerImpl extends JspCompilerImpl implements JspXCompiler {
-
- /**
- * @see net.sf.jsptest.compiler.api.JspXCompiler#compileX(java.lang.String, java.util.Map)
- */
- public JspX compileX(String jspPath, Map taglibs) {
- try {
- JasperCompiler compiler = getCompiler();
- JspCompilationInfo info = compiler.compile(jspPath, taglibs);
- final Class servletClass = compileToClass(info);
- return new JspXImpl(servletClass);
- }
- catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
-}
Deleted: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXImpl.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXImpl.java 2012-04-06 18:46:12 UTC (rev 268)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXImpl.java 2012-04-11 23:16:22 UTC (rev 269)
@@ -1,76 +0,0 @@
-package net.sf.jsptest.compiler.jsp21;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-
-import net.sf.jsptest.compiler.api.JspExecution;
-import net.sf.jsptest.compiler.api.JspX;
-import net.sf.jsptest.compiler.jsp21.JspImpl;
-import net.sf.jsptest.compiler.jsp21.mock.MockHttpServletRequest;
-import net.sf.jsptest.compiler.jsp21.mock.MockHttpServletResponse;
-import net.sf.jsptest.compiler.jsp21.mock.MockHttpSession;
-import net.sf.jsptest.compiler.jsp21.mock.MockJspWriter;
-import net.sf.jsptest.compiler.jsp21.mock.MockServletConfig;
-import net.sf.jsptest.compiler.jsp21.mock.MockServletContext;
-
-/**
- * An extension of the JspImpl that can consider request parameters.
- *
- * @author Ronaldo Webb
- *
- */
-public class JspXImpl extends JspImpl implements JspX {
-
- private Class servletClass = null;
-
- public JspXImpl(Class servletClass) {
- super(servletClass);
- this.servletClass = servletClass;
- }
-
- /**
- * @see net.sf.jsptest.compiler.api.JspX#request(java.lang.String, java.util.Map, java.util.Map, java.util.Map)
- */
- public JspExecution request(String httpMethod, Map requestAttributes,
- Map sessionAttributes, Map requestParameters) {
- ServletContext servletContext = new MockServletContext();
- ServletConfig servletConfig = new MockServletConfig(servletContext);
- MockHttpSession httpSession = new MockHttpSession();
- httpSession.setAttributes(sessionAttributes);
- MockHttpServletRequest request = new MockHttpServletRequest();
- request.setSession(httpSession);
- request.setMethod(httpMethod);
- request.setAttributes(requestAttributes);
-
- if (null != requestParameters && !requestParameters.isEmpty()) {
- Iterator keys = requestParameters.keySet().iterator();
-
- while (keys.hasNext()) {
- String key = (String) keys.next();
- Object value = requestParameters.get(key);
-
- if (null != value) {
- if (value instanceof String[]) {
- request.addParameter(key, (String[]) value);
- } else {
- request.addParameter(key,
- new String[] { (String) value });
- }
- }
- else {
- request.addParameter(key, new String[] {null});
- }
- }
- }
-
- MockHttpServletResponse response = new MockHttpServletResponse();
- MockJspWriter jspWriter = configureJspFactory(servletContext, request,
- httpSession);
- initializeAndInvokeJsp(servletClass, servletConfig, request, response);
- return createExecutionResult(jspWriter.getContents());
- }
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rc...@us...> - 2012-04-06 18:46:21
|
Revision: 268
http://jsptest.svn.sourceforge.net/jsptest/?rev=268&view=rev
Author: rcw3bb
Date: 2012-04-06 18:46:12 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
Added the capability to process request parameters.
Modified Paths:
--------------
trunk/jsptest-jsp21/pom.xml
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java
Added Paths:
-----------
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JasperCompiler.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspExecutionImpl.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspImpl.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXCompilerImpl.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXImpl.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/JspTestServletOutputStream.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpServletRequest.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpServletResponse.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpSession.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockJspFactory.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockJspWriter.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockOptions.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockPageContext.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockServletConfig.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockServletContext.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockServletInputStream.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockTagInfo.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/ClasspathTldLocator.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/ExplodedTldLocator.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/MockTagInfo.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/MockTldLocationsCache.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/TldLocation.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/TldLocator.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/TldUriMappings.java
trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/WebInfLibTldLocator.java
trunk/jsptest-jsp21/src/main/java/org/
trunk/jsptest-jsp21/src/main/java/org/apache/
trunk/jsptest-jsp21/src/main/java/org/apache/jasper/
trunk/jsptest-jsp21/src/main/java/org/apache/jasper/compiler/
trunk/jsptest-jsp21/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java
trunk/jsptest-jsp21/src/test/java/net/
trunk/jsptest-jsp21/src/test/java/net/sf/
trunk/jsptest-jsp21/src/test/java/net/sf/jsptest/
trunk/jsptest-jsp21/src/test/java/net/sf/jsptest/compiler/
trunk/jsptest-jsp21/src/test/java/net/sf/jsptest/compiler/jsp21/
trunk/jsptest-jsp21/src/test/java/net/sf/jsptest/compiler/jsp21/TestJspImpl.java
trunk/jsptest-jsp21/src/test/java/net/sf/jsptest/compiler/jsp21/mock/
trunk/jsptest-jsp21/src/test/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/
trunk/jsptest-jsp21/src/test/java/net/sf/jsptest/compiler/jsp21/mock/taglibs/TestClasspathTldLocator.java
trunk/jsptest-jsp21/src/test/resources/
trunk/jsptest-jsp21/src/test/resources/META-INF/
trunk/jsptest-jsp21/src/test/resources/META-INF/MANIFEST.MF
trunk/jsptest-jsp21/src/test/resources/META-INF/exists.tld
trunk/jsptest-jsp21/src/test/resources/log4j.properties
Modified: trunk/jsptest-jsp21/pom.xml
===================================================================
--- trunk/jsptest-jsp21/pom.xml 2012-04-06 17:59:22 UTC (rev 267)
+++ trunk/jsptest-jsp21/pom.xml 2012-04-06 18:46:12 UTC (rev 268)
@@ -30,10 +30,15 @@
</dependency>
<!-- Provides the Jasper JSP compiler -->
<dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>jasper</artifactId>
- <version>6.0.13</version>
+ <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>
<resources>
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JasperCompiler.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JasperCompiler.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JasperCompiler.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,375 @@
+/*
+ * 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.jsp21;
+
+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.Java6Compiler;
+import net.sf.jsptest.compiler.java.JavaCompiler;
+import net.sf.jsptest.compiler.java.SunJavaC;
+import net.sf.jsptest.compiler.jsp21.mock.MockOptions;
+import net.sf.jsptest.compiler.jsp21.mock.MockServletConfig;
+import net.sf.jsptest.compiler.jsp21.mock.MockTagInfo;
+import net.sf.jsptest.utils.Path;
+import net.sf.jsptest.utils.Strings;
+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
+ * @author Meinert Schwartau (scwar32)
+ */
+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 path
+ * The path to the JSP source file to compile, given relative to the web root.
+ * @param mockTaglibs
+ * Mapping of tag names to tag handler classes
+ */
+ 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);
+ compiler.compile();
+ }
+
+ private JspCompilationContext createJspCompilationContext(JspCompilationInfo info,
+ ServletContext servletContext, Options options, JspRuntimeContext jspRuntimeContext,
+ JspServletWrapper jspServletWrapper, StringWriter stringWriter) {
+ boolean isErrorPage = false;
+ JspCompilationContext cContext = new JspCompilationContext(info.getJspPath(), isErrorPage,
+ options, servletContext, jspServletWrapper, jspRuntimeContext);
+ cContext.getOutputDir(); // forces creation of the directory tree
+ cContext.setServletJavaFileName(info.getJavaSource());
+ cContext.setServletPackageName(getJspPackageName());
+ cContext.setWriter(new ServletWriter(new PrintWriter(stringWriter)));
+ createPathToGeneratedJavaSource(info);
+ return cContext;
+ }
+
+ private void createPathToGeneratedJavaSource(JspCompilationInfo info) {
+ new File(info.getJavaSource()).getParentFile().mkdirs();
+ }
+
+ private JspServletWrapper makeWrapper(ServletContext servletContext, Options options,
+ JspRuntimeContext jspRuntimeContext) throws MalformedURLException, JasperException {
+ TagInfo tagInfo = new MockTagInfo();
+ String tagFilePath = "/";
+ URL tagFileJarUrl = new File(".").toURL();
+ JspServletWrapper wrapper = new JspServletWrapper(servletContext, options, tagFilePath,
+ tagInfo, jspRuntimeContext, tagFileJarUrl);
+ return wrapper;
+ }
+
+ private Options createOptions(ServletContext ctx, ServletConfig cfg, JspCompilationInfo info) {
+ Options options = new EmbeddedServletOptions(cfg, ctx);
+ return new MockOptions(options, ctx, info);
+ }
+
+ private void resolveJavaSourceFile(JspCompilationInfo info) {
+ File dir = new File(info.getClassOutputDir());
+ if (getJspPackageName().length() > 0) {
+ dir = new File(dir, getJspPackageName().replace('.', '/'));
+ }
+ dir.mkdirs();
+ String name = resolveJavaSourceFileName(info.getJspPath());
+ info.setJavaSource(new File(dir, name).getPath());
+ }
+
+ private String resolveJavaSourceFileName(String jspPath) {
+ String name = encodeSpecialCharacters(jspPath);
+ if (name.startsWith("/")) {
+ name = name.substring(1);
+ }
+ return name + ".java";
+ }
+
+ private String encodeSpecialCharacters(String name) {
+ StringBuffer result = new StringBuffer();
+ char[] chars = name.toCharArray();
+ for (int i = 0; i < chars.length; i++) {
+ if (chars[i] == '-') {
+ result.append("_002d");
+ } else if (chars[i] == '_') {
+ result.append("_005f");
+ } else if (chars[i] == '.') {
+ result.append("_");
+ } else {
+ result.append(chars[i]);
+ }
+ }
+ return result.toString();
+ }
+
+ private String resolveJspSourceFile(String jsp) {
+ if (jsp.startsWith("/")) {
+ jsp = jsp.substring(1);
+ }
+ return new File(getWebRoot(), jsp).getPath();
+ }
+
+ private void resolveClassName(JspCompilationInfo info) {
+ String baseName = new File(info.getJavaSource()).getName();
+ baseName = baseName.substring(0, baseName.indexOf("."));
+ String packageName = getPackagePrefix() + getSubDirPackagePrefix(info);
+ info.setClassName(packageName + baseName);
+ }
+
+ private String getPackagePrefix() {
+ String packagePrefix = getJspPackageName();
+ if (packagePrefix != null && packagePrefix.length() > 0) {
+ packagePrefix = packagePrefix + ".";
+ }
+ return packagePrefix;
+ }
+
+ private String getSubDirPackagePrefix(JspCompilationInfo info) {
+ String dirPrefix = info.getJspPath();
+ if (dirPrefix.startsWith("/")) {
+ dirPrefix = dirPrefix.substring(1);
+ }
+ int lastSlashIndex = dirPrefix.lastIndexOf("/");
+ if (lastSlashIndex != -1) {
+ dirPrefix = dirPrefix.substring(0, lastSlashIndex);
+ dirPrefix = encodeSpecialCharacters(dirPrefix);
+ dirPrefix = dirPrefix.replace('/', '.') + ".";
+ } else {
+ dirPrefix = "";
+ }
+ return dirPrefix;
+ }
+
+ private void compileJavaToBytecode(JspCompilationInfo info) throws Exception {
+ File classFile = new File(info.getClassFile());
+ classFile.delete();
+ logCompilation(info.getJavaSource(), info.getClassOutputDir());
+ boolean ok = javac()
+ .compile(info.getJavaSource(), info.getClassOutputDir(), getClassPath());
+ assertTrue("javac failed", ok);
+ assertTrue("Failed to compile .java file to " + classFile.getAbsolutePath(), classFile
+ .exists());
+ }
+
+ private String[] getClassPath() {
+ Path cp = new Path();
+ cp.addSystemProperty("java.class.path");
+ cp.addContainer(javax.servlet.jsp.tagext.JspTag.class);
+ cp.addContainer(javax.servlet.jsp.jstl.core.LoopTag.class);
+ cp.addContainer(javax.servlet.http.HttpServlet.class);
+ cp.addContainer(org.apache.taglibs.standard.Version.class);
+ cp.addContainer(org.apache.jasper.JspC.class);
+ cp.addContainer(org.apache.jasper.compiler.Compiler.class);
+ cp.addContainer(org.apache.jasper.runtime.HttpJspBase.class);
+ cp.add(new File("target", "test-classes").getAbsolutePath());
+ cp.add(new File("target", "classes").getAbsolutePath());
+ return cp.toStringArray();
+ }
+
+ private void resolveClassFileLocation(JspCompilationInfo info) {
+ String file = Strings.replace(info.getJavaSource(), ".java", ".class");
+ info.setClassFile(file);
+ }
+
+ private static void assertTrue(String errorMessage, boolean condition) {
+ if (!condition) {
+ throw new RuntimeException(errorMessage);
+ }
+ }
+
+ private static JavaCompiler determineJavaCompiler() {
+ List compilers = new ArrayList();
+ // this doesn't work because with Maven we need to set the classpath
+ // explicitly as the "current" classpath does not include our
+ // dependencies
+ compilers.add(new Java6Compiler());
+ compilers.add(new SunJavaC());
+ compilers.add(new CommandLineJavac());
+ for (Iterator i = compilers.iterator(); i.hasNext();) {
+ JavaCompiler compiler = (JavaCompiler) i.next();
+ if (compiler.isAvailable()) {
+ log.debug("Using JavaCompiler: " + compiler.getClass().getName());
+ return compiler;
+ }
+ }
+ throw new RuntimeException("No JavaCompiler implementation available on the system");
+ }
+
+ private static JavaCompiler javac() {
+ return COMPILER;
+ }
+
+ private void logCompilation(String src, String dst) {
+ log.debug(" Compiling " + src + " to " + dst);
+ }
+}
Modified: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java 2012-04-06 17:59:22 UTC (rev 267)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -1,22 +1,68 @@
package net.sf.jsptest.compiler.jsp21;
+import java.io.File;
import java.util.Map;
+
+import org.apache.jasper.servlet.JasperLoader;
+
+import net.sf.jsptest.compiler.JspCompilationInfo;
import net.sf.jsptest.compiler.api.Jsp;
import net.sf.jsptest.compiler.api.JspCompiler;
+import net.sf.jsptest.utils.CustomClassLoader;
/**
* @author Lasse Koskela
* @author Meinert Schwartau (scwar32)
+ * @auther Ronaldo Webb
*/
public class JspCompilerImpl implements JspCompiler {
- public Jsp compile(String path, Map taglibs) {
- throw new RuntimeException("Not implemented");
- }
+ private String outputDirectory = new File(System.getProperty("java.io.tmpdir"),
+ "jsptest-classes").getAbsolutePath();
+ private String webRoot;
public void setOutputDirectory(String directory) {
+ outputDirectory = directory;
}
+ protected String getOutputDirectory() {
+ return outputDirectory;
+ }
+
public void setWebRoot(String directory) {
+ this.webRoot = directory;
}
+
+ protected String getWebRoot() {
+ return webRoot;
+ }
+
+ protected JasperCompiler getCompiler() {
+ JasperCompiler compiler = new JasperCompiler();
+ compiler.setWebRoot(getWebRoot());
+ compiler.setClassOutputBaseDir(getOutputDirectory());
+
+ return compiler;
+ }
+
+ public Jsp compile(final String jspPath, Map taglibs) {
+ try {
+ JasperCompiler compiler = getCompiler();
+ JspCompilationInfo info = compiler.compile(jspPath, taglibs);
+ final Class servletClass = compileToClass(info);
+ return new JspImpl(servletClass);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected Class compileToClass(JspCompilationInfo compilation) throws Exception,
+ ClassNotFoundException {
+ return loadJspClass(compilation.getClassName());
+ }
+
+ protected Class loadJspClass(String jspClassName) throws ClassNotFoundException {
+ ClassLoader cl = new CustomClassLoader(getOutputDirectory());
+ return cl.loadClass(jspClassName);
+ }
}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspExecutionImpl.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspExecutionImpl.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspExecutionImpl.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,19 @@
+package net.sf.jsptest.compiler.jsp21;
+
+import net.sf.jsptest.compiler.api.JspExecution;
+
+/**
+ * @author Lasse Koskela
+ */
+public class JspExecutionImpl implements JspExecution {
+
+ private final String renderedOutput;
+
+ public JspExecutionImpl(String output) {
+ this.renderedOutput = output;
+ }
+
+ public String getRenderedResponse() {
+ return renderedOutput;
+ }
+}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspImpl.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspImpl.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspImpl.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,87 @@
+package net.sf.jsptest.compiler.jsp21;
+
+import java.util.Map;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import javax.servlet.jsp.JspFactory;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import net.sf.jsptest.compiler.api.Jsp;
+import net.sf.jsptest.compiler.api.JspExecution;
+import net.sf.jsptest.compiler.jsp21.mock.MockHttpServletRequest;
+import net.sf.jsptest.compiler.jsp21.mock.MockHttpServletResponse;
+import net.sf.jsptest.compiler.jsp21.mock.MockHttpSession;
+import net.sf.jsptest.compiler.jsp21.mock.MockJspFactory;
+import net.sf.jsptest.compiler.jsp21.mock.MockJspWriter;
+import net.sf.jsptest.compiler.jsp21.mock.MockPageContext;
+import net.sf.jsptest.compiler.jsp21.mock.MockServletConfig;
+import net.sf.jsptest.compiler.jsp21.mock.MockServletContext;
+
+/**
+ * @author Lasse Koskela
+ */
+public class JspImpl implements Jsp {
+
+ private static final Log log = LogFactory.getLog(JspImpl.class);
+ private final Class servletClass;
+ private MockPageContext pageContext;
+
+ public JspImpl(Class servletClass) {
+ this.servletClass = servletClass;
+ }
+
+ public JspExecution request(String httpMethod, Map requestAttributes, Map sessionAttributes) {
+ ServletContext servletContext = new MockServletContext();
+ ServletConfig servletConfig = new MockServletConfig(servletContext);
+ MockHttpSession httpSession = new MockHttpSession();
+ httpSession.setAttributes(sessionAttributes);
+ MockHttpServletRequest request = new MockHttpServletRequest();
+ request.setSession(httpSession);
+ request.setMethod(httpMethod);
+ request.setAttributes(requestAttributes);
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ MockJspWriter jspWriter = configureJspFactory(servletContext, request, httpSession);
+ initializeAndInvokeJsp(servletClass, servletConfig, request, response);
+ return createExecutionResult(jspWriter.getContents());
+ }
+
+ protected MockJspWriter configureJspFactory(ServletContext httpContext,
+ HttpServletRequest httpRequest, HttpSession httpSession) {
+ pageContext = new MockPageContext();
+ pageContext.setRequest(httpRequest);
+ pageContext.setServletContext(httpContext);
+ pageContext.setSession(httpSession);
+ MockJspWriter jspWriter = new MockJspWriter();
+ pageContext.setJspWriter(jspWriter);
+ JspFactory.setDefaultFactory(new MockJspFactory(pageContext));
+ return jspWriter;
+ }
+
+ protected void initializeAndInvokeJsp(Class jspClass, ServletConfig servletConfig,
+ HttpServletRequest request, HttpServletResponse response) {
+ try {
+ log.debug("Instantiating Servlet: " + jspClass.getName());
+ HttpServlet servlet = (HttpServlet) jspClass.newInstance();
+ log.debug("Initializing Servlet: " + jspClass.getName());
+ servlet.init(servletConfig);
+ log.debug("Invoking Servlet: " + jspClass.getName());
+ servlet.service(request, response);
+ if (pageContext.getException() != null) {
+ log.debug("An exception was stored into PageContext. Rethrowing it...");
+ throw new RuntimeException(pageContext.getException());
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected JspExecution createExecutionResult(String output) {
+ return new JspExecutionImpl(output);
+ }
+}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXCompilerImpl.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXCompilerImpl.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXCompilerImpl.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,33 @@
+package net.sf.jsptest.compiler.jsp21;
+
+import java.util.Map;
+
+import net.sf.jsptest.compiler.JspCompilationInfo;
+import net.sf.jsptest.compiler.api.JspXCompiler;
+import net.sf.jsptest.compiler.api.JspX;
+import net.sf.jsptest.compiler.jsp21.JasperCompiler;
+import net.sf.jsptest.compiler.jsp21.JspCompilerImpl;
+
+/**
+ * Add the capability to call the JspXImpl which has the capability to process request parameters.
+ *
+ * @author Ronaldo Webb
+ */
+public class JspXCompilerImpl extends JspCompilerImpl implements JspXCompiler {
+
+ /**
+ * @see net.sf.jsptest.compiler.api.JspXCompiler#compileX(java.lang.String, java.util.Map)
+ */
+ public JspX compileX(String jspPath, Map taglibs) {
+ try {
+ JasperCompiler compiler = getCompiler();
+ JspCompilationInfo info = compiler.compile(jspPath, taglibs);
+ final Class servletClass = compileToClass(info);
+ return new JspXImpl(servletClass);
+ }
+ catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXImpl.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXImpl.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspXImpl.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,76 @@
+package net.sf.jsptest.compiler.jsp21;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+
+import net.sf.jsptest.compiler.api.JspExecution;
+import net.sf.jsptest.compiler.api.JspX;
+import net.sf.jsptest.compiler.jsp21.JspImpl;
+import net.sf.jsptest.compiler.jsp21.mock.MockHttpServletRequest;
+import net.sf.jsptest.compiler.jsp21.mock.MockHttpServletResponse;
+import net.sf.jsptest.compiler.jsp21.mock.MockHttpSession;
+import net.sf.jsptest.compiler.jsp21.mock.MockJspWriter;
+import net.sf.jsptest.compiler.jsp21.mock.MockServletConfig;
+import net.sf.jsptest.compiler.jsp21.mock.MockServletContext;
+
+/**
+ * An extension of the JspImpl that can consider request parameters.
+ *
+ * @author Ronaldo Webb
+ *
+ */
+public class JspXImpl extends JspImpl implements JspX {
+
+ private Class servletClass = null;
+
+ public JspXImpl(Class servletClass) {
+ super(servletClass);
+ this.servletClass = servletClass;
+ }
+
+ /**
+ * @see net.sf.jsptest.compiler.api.JspX#request(java.lang.String, java.util.Map, java.util.Map, java.util.Map)
+ */
+ public JspExecution request(String httpMethod, Map requestAttributes,
+ Map sessionAttributes, Map requestParameters) {
+ ServletContext servletContext = new MockServletContext();
+ ServletConfig servletConfig = new MockServletConfig(servletContext);
+ MockHttpSession httpSession = new MockHttpSession();
+ httpSession.setAttributes(sessionAttributes);
+ MockHttpServletRequest request = new MockHttpServletRequest();
+ request.setSession(httpSession);
+ request.setMethod(httpMethod);
+ request.setAttributes(requestAttributes);
+
+ if (null != requestParameters && !requestParameters.isEmpty()) {
+ Iterator keys = requestParameters.keySet().iterator();
+
+ while (keys.hasNext()) {
+ String key = (String) keys.next();
+ Object value = requestParameters.get(key);
+
+ if (null != value) {
+ if (value instanceof String[]) {
+ request.addParameter(key, (String[]) value);
+ } else {
+ request.addParameter(key,
+ new String[] { (String) value });
+ }
+ }
+ else {
+ request.addParameter(key, new String[] {null});
+ }
+ }
+ }
+
+ MockHttpServletResponse response = new MockHttpServletResponse();
+ MockJspWriter jspWriter = configureJspFactory(servletContext, request,
+ httpSession);
+ initializeAndInvokeJsp(servletClass, servletConfig, request, response);
+ return createExecutionResult(jspWriter.getContents());
+ }
+
+}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/JspTestServletOutputStream.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/JspTestServletOutputStream.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/JspTestServletOutputStream.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,21 @@
+package net.sf.jsptest.compiler.jsp21.mock;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import javax.servlet.ServletOutputStream;
+
+/**
+ * @author Lasse Koskela
+ */
+public class JspTestServletOutputStream extends ServletOutputStream {
+
+ private final OutputStream stream;
+
+ public JspTestServletOutputStream(OutputStream stream) {
+ this.stream = stream;
+ }
+
+ public void write(int b) throws IOException {
+ stream.write(b);
+ }
+}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpServletRequest.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpServletRequest.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpServletRequest.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,344 @@
+/*
+ * 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.jsp21.mock;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.security.Principal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Vector;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.ServletInputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+/**
+ * @author Lasse Koskela
+ */
+public class MockHttpServletRequest implements HttpServletRequest {
+
+ private Map headers = new HashMap();
+ private Map parameters = new HashMap();
+ private Map attributes = new HashMap();
+ private MockHttpSession httpSession = null;
+ private byte[] body;
+ private String httpMethod;
+ private String characterEncoding;
+
+ public MockHttpServletRequest() {
+ this((MockHttpSession) null);
+ }
+
+ public MockHttpServletRequest(MockHttpSession httpSession) {
+ setSession(httpSession);
+ }
+
+ public MockHttpServletRequest(byte[] body) {
+ this.body = body;
+ characterEncoding = "UTF-8";
+ this.headers.put("Content-type", "multipart/form-data; boundary=XXXBOUNDARYXXX");
+ }
+
+ public String getAuthType() {
+ return null;
+ }
+
+ public Cookie[] getCookies() {
+ return new Cookie[0];
+ }
+
+ public long getDateHeader(String s) {
+ try {
+ // TODO: use the HTTP date format pattern
+ return new SimpleDateFormat().parse((String) headers.get(s)).getTime();
+ } catch (ParseException e) {
+ return 0;
+ }
+ }
+
+ public String getHeader(String reference) {
+ return (String) headers.get(reference);
+ }
+
+ public Enumeration getHeaders(String s) {
+ return new Vector().elements();
+ }
+
+ public Enumeration getHeaderNames() {
+ return new Vector(headers.keySet()).elements();
+ }
+
+ public int getIntHeader(String s) {
+ return Integer.parseInt(getHeader(s));
+ }
+
+ public void setMethod(String httpMethod) {
+ this.httpMethod = httpMethod;
+ }
+
+ public String getMethod() {
+ return httpMethod;
+ }
+
+ public String getPathInfo() {
+ return "/";
+ }
+
+ public String getPathTranslated() {
+ return "/";
+ }
+
+ public String getContextPath() {
+ return "/";
+ }
+
+ public String getQueryString() {
+ return null;
+ }
+
+ public String getRemoteUser() {
+ return null;
+ }
+
+ public boolean isUserInRole(String s) {
+ return false;
+ }
+
+ public Principal getUserPrincipal() {
+ return null;
+ }
+
+ public String getRequestedSessionId() {
+ return "JSPTESTSESSIONID";
+ }
+
+ public String getRequestURI() {
+ return "/";
+ }
+
+ public StringBuffer getRequestURL() {
+ return new StringBuffer("/");
+ }
+
+ public String getServletPath() {
+ return "/";
+ }
+
+ public HttpSession getSession(boolean flag) {
+ if (flag && httpSession == null) {
+ httpSession = new MockHttpSession();
+ }
+ return httpSession;
+ }
+
+ public HttpSession getSession() {
+ return httpSession;
+ }
+
+ public boolean isRequestedSessionIdValid() {
+ return true;
+ }
+
+ public boolean isRequestedSessionIdFromCookie() {
+ return true;
+ }
+
+ public boolean isRequestedSessionIdFromURL() {
+ return false;
+ }
+
+ public boolean isRequestedSessionIdFromUrl() {
+ return false;
+ }
+
+ public Object getAttribute(String name) {
+ return attributes.get(name);
+ }
+
+ public Enumeration getAttributeNames() {
+ return new Vector(attributes.keySet()).elements();
+ }
+
+ public String getCharacterEncoding() {
+ return characterEncoding;
+ }
+
+ public void setCharacterEncoding(String env) {
+ characterEncoding = env;
+ }
+
+ public int getContentLength() {
+ return body.length;
+ }
+
+ public String getContentType() {
+ return "multipart/form-data; boundary=xxx";
+ }
+
+ public ServletInputStream getInputStream() throws IOException {
+ return new MockServletInputStream(body);
+ }
+
+ public String getParameter(String name) {
+ String values[] = (String[]) parameters.get(name);
+ if (values != null) {
+ return (values[0]);
+ } else {
+ return (null);
+ }
+ }
+
+ public Map getParameterMap() {
+ return parameters;
+ }
+
+ public String getProtocol() {
+ return "http";
+ }
+
+ public String getScheme() {
+ return "http://";
+ }
+
+ public String getServerName() {
+ return "servername";
+ }
+
+ public int getServerPort() {
+ return 8080;
+ }
+
+ public BufferedReader getReader() throws IOException {
+ return null;
+ }
+
+ public String getRemoteAddr() {
+ return null;
+ }
+
+ public String getRemoteHost() {
+ return null;
+ }
+
+ public void setAttributes(Map attributes) {
+ this.attributes.putAll(attributes);
+ }
+
+ public void setAttribute(String name, Object o) {
+ attributes.put(name, o);
+ }
+
+ public void removeAttribute(String name) {
+ attributes.remove(name);
+ }
+
+ public Locale getLocale() {
+ return Locale.getDefault();
+ }
+
+ public Enumeration getLocales() {
+ return new Vector(Arrays.asList(Locale.getAvailableLocales())).elements();
+ }
+
+ public boolean isSecure() {
+ return false;
+ }
+
+ public RequestDispatcher getRequestDispatcher(String s) {
+ return new RequestDispatcher() {
+
+ public void forward(ServletRequest request, ServletResponse response)
+ throws ServletException, IOException {
+ }
+
+ public void include(ServletRequest request, ServletResponse response)
+ throws ServletException, IOException {
+ }
+ };
+ }
+
+ public String getRealPath(String s) {
+ File tmpDir = new File(System.getProperty("java.io.tmpdir"));
+ File jsptestTmpDir = new File(tmpDir, "jsptest");
+ return new File(jsptestTmpDir, s).getAbsolutePath();
+ }
+
+ public int getRemotePort() {
+ return 11111;
+ }
+
+ public String getLocalName() {
+ return null;
+ }
+
+ public String getLocalAddr() {
+ return null;
+ }
+
+ public int getLocalPort() {
+ return 22222;
+ }
+
+ public void addParameter(String name, String values[]) {
+ parameters.put(name, values);
+ }
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(getClass().getName()).append("{");
+ Enumeration enumeration = getParameterNames();
+ while (enumeration.hasMoreElements()) {
+ String key = (String) enumeration.nextElement();
+ String[] values = getParameterValues(key);
+ buffer.append("parameter:");
+ buffer.append(key);
+ buffer.append("=[");
+ for (int i = 0; i < values.length; i++) {
+ String value = values[i];
+ buffer.append(value);
+ if (i < values.length - 1) {
+ buffer.append(",");
+ }
+ }
+ buffer.append("]\n");
+ }
+ buffer.append("}");
+ return buffer.toString();
+ }
+
+ public Enumeration getParameterNames() {
+ return new Vector(parameters.keySet()).elements();
+ }
+
+ public String[] getParameterValues(String name) {
+ return (String[]) parameters.get(name);
+ }
+
+ public void setSession(MockHttpSession session) {
+ this.httpSession = session;
+ }
+}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpServletResponse.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpServletResponse.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpServletResponse.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,174 @@
+package net.sf.jsptest.compiler.jsp21.mock;
+
+/*
+ * 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.
+ */
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.Locale;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author Lasse Koskela
+ */
+public class MockHttpServletResponse implements HttpServletResponse {
+
+ private ServletOutputStream servletOutputStream;
+ private String description;
+ private PrintWriter writer;
+
+ public MockHttpServletResponse() {
+ this(new ByteArrayOutputStream());
+ description = "(in-memory)";
+ }
+
+ public MockHttpServletResponse(File output) throws FileNotFoundException {
+ this(new FileOutputStream(output));
+ description = "(output file: " + output.getAbsolutePath() + ")";
+ }
+
+ private MockHttpServletResponse(final OutputStream output) {
+ this.servletOutputStream = new JspTestServletOutputStream(output);
+ writer = new PrintWriter(servletOutputStream) {
+ };
+ }
+
+ public String toString() {
+ return super.toString() + " " + description;
+ }
+
+ public void addCookie(Cookie cookie) {
+ }
+
+ public void addDateHeader(String s, long l) {
+ }
+
+ public void addHeader(String s, String s1) {
+ }
+
+ public void addIntHeader(String s, int i) {
+ }
+
+ public boolean containsHeader(String s) {
+ return false;
+ }
+
+ public String encodeRedirectURL(String s) {
+ return null;
+ }
+
+ /** @deprecated */
+ public String encodeRedirectUrl(String s) {
+ return null;
+ }
+
+ public String encodeURL(String s) {
+ return s;
+ }
+
+ /** @deprecated */
+ public String encodeUrl(String s) {
+ return s;
+ }
+
+ public void flushBuffer() throws IOException {
+ getOutputStream().flush();
+ }
+
+ public int getBufferSize() {
+ return 0;
+ }
+
+ public String getCharacterEncoding() {
+ return null;
+ }
+
+ public Locale getLocale() {
+ return null;
+ }
+
+ public ServletOutputStream getOutputStream() throws IOException {
+ return servletOutputStream;
+ }
+
+ public PrintWriter getWriter() throws IOException {
+ return writer;
+ }
+
+ public boolean isCommitted() {
+ return false;
+ }
+
+ public void reset() {
+ }
+
+ public void resetBuffer() {
+ }
+
+ public void sendError(int i) throws IOException {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public void sendError(int i, String s) throws IOException {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public void sendRedirect(String s) throws IOException {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public void setBufferSize(int i) {
+ }
+
+ public void setContentLength(int i) {
+ }
+
+ public void setContentType(String s) {
+ }
+
+ public void setDateHeader(String s, long l) {
+ }
+
+ public void setHeader(String s, String s1) {
+ }
+
+ public void setIntHeader(String s, int i) {
+ }
+
+ public void setLocale(Locale locale) {
+ }
+
+ /** @deprecated */
+ public void setStatus(int i) {
+ }
+
+ public void setStatus(int i, String s) {
+ }
+
+ public String getContentType() {
+ return null;
+ }
+
+ public void setCharacterEncoding(String reference) {
+ }
+}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpSession.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpSession.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockHttpSession.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,103 @@
+/*
+ * 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.jsp21.mock;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionContext;
+
+/**
+ * @author Lasse Koskela
+ */
+public class MockHttpSession implements HttpSession {
+
+ private Map attributes = new HashMap();
+
+ public Object getAttribute(String s) {
+ return attributes.get(s);
+ }
+
+ public Enumeration getAttributeNames() {
+ return new Vector(attributes.keySet()).elements();
+ }
+
+ public long getCreationTime() {
+ return 0;
+ }
+
+ public String getId() {
+ return "JSPTESTSESSIONID";
+ }
+
+ public long getLastAccessedTime() {
+ return 0;
+ }
+
+ public int getMaxInactiveInterval() {
+ return 0;
+ }
+
+ public HttpSessionContext getSessionContext() {
+ return null;
+ }
+
+ public Object getValue(String s) {
+ return null;
+ }
+
+ public String[] getValueNames() {
+ return new String[0];
+ }
+
+ public void invalidate() {
+ }
+
+ public boolean isNew() {
+ return false;
+ }
+
+ public void putValue(String s, Object o) {
+ }
+
+ public void removeAttribute(String s) {
+ attributes.remove(s);
+ }
+
+ public void removeValue(String s) {
+ }
+
+ public void setAttribute(String s, Object o) {
+ attributes.put(s, o);
+ }
+
+ public void setMaxInactiveInterval(int i) {
+ }
+
+ public ServletContext getServletContext() {
+ return null;
+ }
+
+ /**
+ * For the purposes of jsptest.
+ */
+ public void setAttributes(Map attributes) {
+ this.attributes.putAll(attributes);
+ }
+}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockJspFactory.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockJspFactory.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockJspFactory.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,53 @@
+/*
+ * 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.jsp21.mock;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.jsp.JspEngineInfo;
+import javax.servlet.jsp.JspFactory;
+import javax.servlet.jsp.PageContext;
+
+/**
+ * @author Lasse Koskela
+ */
+public class MockJspFactory extends JspFactory {
+
+ private PageContext pageContext;
+
+ public MockJspFactory(PageContext pageContext) {
+ this.pageContext = pageContext;
+ }
+
+ public PageContext getPageContext(Servlet servlet, ServletRequest request,
+ ServletResponse response, String errorPageURL, boolean needsSession, int buffer,
+ boolean autoflush) {
+ return pageContext;
+ }
+
+ public void releasePageContext(PageContext pageContext) {
+ }
+
+ public JspEngineInfo getEngineInfo() {
+ return new JspEngineInfo() {
+
+ public String getSpecificationVersion() {
+ return "2.0";
+ }
+ };
+ }
+}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockJspWriter.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockJspWriter.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockJspWriter.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,153 @@
+/*
+ * 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.jsp21.mock;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import javax.servlet.jsp.JspWriter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author Lasse Koskela
+ */
+public class MockJspWriter extends JspWriter {
+
+ private Log log;
+ private PrintWriter writer;
+ private StringWriter stringWriter;
+
+ public String getContents() {
+ return stringWriter.toString();
+ }
+
+ public MockJspWriter() {
+ super(1024, true);
+ log = LogFactory.getLog(getClass());
+ stringWriter = new StringWriter();
+ writer = new PrintWriter(stringWriter, true);
+ }
+
+ public void newLine() throws IOException {
+ writer.println();
+ }
+
+ public void print(boolean x) throws IOException {
+ writer.print(x);
+ }
+
+ public void print(char x) throws IOException {
+ writer.print(x);
+ }
+
+ public void print(int x) throws IOException {
+ writer.print(x);
+ }
+
+ public void print(long x) throws IOException {
+ writer.print(x);
+ }
+
+ public void print(float x) throws IOException {
+ writer.print(x);
+ }
+
+ public void print(double x) throws IOException {
+ writer.print(x);
+ }
+
+ public void print(char[] x) throws IOException {
+ writer.print(x);
+ }
+
+ public void print(String x) throws IOException {
+ writer.print(x);
+ }
+
+ public void print(Object x) throws IOException {
+ writer.print(x);
+ }
+
+ public void println() throws IOException {
+ writer.println();
+ }
+
+ public void println(boolean x) throws IOException {
+ writer.println(x);
+ }
+
+ public void println(char x) throws IOException {
+ writer.println(x);
+ }
+
+ public void println(int x) throws IOException {
+ writer.println(x);
+ }
+
+ public void println(long x) throws IOException {
+ writer.println(x);
+ }
+
+ public void println(float x) throws IOException {
+ writer.println(x);
+ }
+
+ public void println(double x) throws IOException {
+ writer.println(x);
+ }
+
+ public void println(char[] x) throws IOException {
+ writer.println(x);
+ }
+
+ public void println(String x) throws IOException {
+ writer.println(x);
+ }
+
+ public void println(Object x) throws IOException {
+ writer.println(x);
+ }
+
+ public void clear() throws IOException {
+ notImplemented("clear()");
+ }
+
+ public void clearBuffer() throws IOException {
+ notImplemented("clearBuffer()");
+ }
+
+ public void flush() throws IOException {
+ writer.flush();
+ }
+
+ public void close() throws IOException {
+ writer.close();
+ }
+
+ public int getRemaining() {
+ notImplemented("getRemaining()");
+ return 0;
+ }
+
+ public void write(char[] x, int start, int length) throws IOException {
+ writer.write(x, start, length);
+ }
+
+ private void notImplemented(String methodSignature) {
+ log.error(getClass().getName() + "#" + methodSignature + " not implemented");
+ }
+}
Added: trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockOptions.java
===================================================================
--- trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockOptions.java (rev 0)
+++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/mock/MockOptions.java 2012-04-06 18:46:12 UTC (rev 268)
@@ -0,0 +1,155 @@
+/*
+ * 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.jsp21.mock;
+
+import java.io.File;
+import java.util.Map;
+import javax.servlet.ServletContext;
+import net.sf.jsptest.compiler.JspCompilationInfo;
+import net.sf.jsptest.compiler.jsp21.mock.taglibs.MockTldLocationsCache;
+
+import org.apache.jasper.Options;
+import org.apache.jasper.compiler.JspConfig;
+import org.apache.jasper.compiler.MockTagPluginManager;
+import org.apache.jasper.compiler.TagPluginManager;
+import org.apache.jasper.compiler.TldLocationsCache;
+
+/**
+ * @author Lasse Koskela
+ * @author Meinert Schwartau (scwar32)
+ */
+public class MockOptions implements Options {
+
+ private Options options;
+ private ServletContext servletContext;
+ private JspCompilationInfo compilationInfo;
+
+ public MockOptions(Options options, ServletContext context, JspCompilationInfo compilationInfo) {
+ this.options = options;
+ this.servletContext = context;
+ this.compilationInfo = compilationInfo;
+ }
+
+ public boolean getErrorOnUseBeanInvalidClassAttribute() {
+ return options.getErrorOnUseBeanInvalidClassAttribute();
+ }
+
+ public boolean getKeepGenerated() {
+ return options.getKeepGenerated();
+ }
+
+ public boolean isPoolingEnabled() {
+ return options.isPoolingEnabled();
+ }
+
+ public boolean getMappedFile() {
+ return options.getMappedFile();
+ }
+
+ public boolean getSendErrorToClient() {
+ return options.getSendErrorToClient();
+ }
+
+ public boolean getClassDebugInfo() {
+ return options.getClassDebugInfo();
+ }
+
+ public int getCheckInterval() {
+ return options.getCheckInterval();
+ }
+
+ public boolean getDevelopment() {
+ return options.getDevelopment();
+ }
+
+ public boolean isSmapSuppressed() {
+ return true; // options.isSmapSuppressed();
+ }
+
+ public boolean isSmapDumped() {
+ return false; // options.isSmapDumped();
+ }
+
+ public boolean getTrimSpaces() {
+ return options.getTrimSpaces();
+ }
+
+ public String getIeClassId() {
+ return options.getIeClassId();
+ }
+
+ public File getScratchDir() {
+ retu...
[truncated message content] |
|
From: <rc...@us...> - 2012-04-06 17:59:29
|
Revision: 267
http://jsptest.svn.sourceforge.net/jsptest/?rev=267&view=rev
Author: rcw3bb
Date: 2012-04-06 17:59:22 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
Implemented Request Parameters.
Modified Paths:
--------------
trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java
trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestJspTestCase.java
trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java
trunk/jsptest-generic/jsptest-framework/src/test/resources/jsptest.properties
trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/index.jsp
Added Paths:
-----------
trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspX.java
trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspXCompiler.java
trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspXCompiler.java
Added: trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspX.java
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspX.java (rev 0)
+++ trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspX.java 2012-04-06 17:59:22 UTC (rev 267)
@@ -0,0 +1,15 @@
+package net.sf.jsptest.compiler.api;
+
+import java.util.Map;
+
+/**
+ * This is a Jsp Extensions however it is not a subclass of Jsp.
+ * This is implemented like this to avoid breaking previous codes and maintains just one method to implement.
+ *
+ * @author Ronaldo Webb
+ */
+public interface JspX {
+
+ JspExecution request(String httpMethod, Map requestAttributes, Map sessionAttributes, Map requestParameters);
+
+}
Added: trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspXCompiler.java
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspXCompiler.java (rev 0)
+++ trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspXCompiler.java 2012-04-06 17:59:22 UTC (rev 267)
@@ -0,0 +1,21 @@
+package net.sf.jsptest.compiler.api;
+
+import java.util.Map;
+
+/**
+ * An extension of the JspCompiler that can return JspX instance.if
+ * Implement this interface if you want the capability of using request parameters.
+ *
+ * @author Ronaldo Webb
+ *
+ */
+public interface JspXCompiler extends JspCompiler {
+
+ /**
+ * The the same compile method as the JspCompiler but returns JspX instance.
+ * @param path The path to compile.
+ * @param taglibs Maps of taglibs.
+ * @return An instance of JspX.
+ */
+ JspX compileX(String path, Map taglibs);
+}
Modified: trunk/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 2010-06-13 20:28:53 UTC (rev 266)
+++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java 2012-04-06 17:59:22 UTC (rev 267)
@@ -24,6 +24,9 @@
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.compiler.api.JspX;
+import net.sf.jsptest.compiler.api.JspXCompiler;
+
import org.apache.log4j.Logger;
/**
@@ -33,6 +36,7 @@
*
* @author Lasse Koskela
* @author Meinert Schwartau (scwar32)
+ * @author Ronaldo Webb
*/
public abstract class JspTestCase extends TestCase {
@@ -40,6 +44,7 @@
private Map requestAttributes;
private Map sessionAttributes;
private Map substituteTaglibs;
+ private Map requestParams;
private JspExecution execution;
public JspTestCase() {
@@ -54,6 +59,7 @@
requestAttributes = new HashMap();
sessionAttributes = new HashMap();
substituteTaglibs = new HashMap();
+ requestParams = new HashMap();
}
/**
@@ -89,6 +95,28 @@
}
/**
+ * Sets a request string parameter with single value.
+ * @param param
+ * Name of the parameter
+ * @param value
+ * Value of the parameter.
+ */
+ protected void setRequestParameter(String param, String value) {
+ requestParams.put(param, value);
+ }
+
+ /**
+ * Sets a request string parameter with multiple values.
+ * @param param
+ * Name of the parameter
+ * @param values
+ * Value of the parameter.
+ */
+ protected void setRequestParameter(String param, String[] values) {
+ requestParams.put(param, values);
+ }
+
+ /**
* Simulate a HTTP GET request to the specified JSP file.
*
* @param path
@@ -121,15 +149,27 @@
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);
+
+ if (compiler instanceof JspXCompiler) {
+ log.debug("Using JspXCompiler");
+ JspX jsp = ((JspXCompiler) compiler).compileX(path, substituteTaglibs);
+ log.debug("Simulating a request to " + path);
+ execution = jsp.request(httpMethod, requestAttributes, sessionAttributes, requestParams);
+ }
+ else {
+ log.debug("Using JspCompiler");
+ 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 \"/\"");
Modified: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestJspTestCase.java
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestJspTestCase.java 2010-06-13 20:28:53 UTC (rev 266)
+++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestJspTestCase.java 2012-04-06 17:59:22 UTC (rev 267)
@@ -18,6 +18,7 @@
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
import net.sf.jsptest.compiler.dummy.FakeJspCompiler;
+import net.sf.jsptest.compiler.dummy.FakeJspXCompiler;
/**
* @author Lasse Koskela
@@ -102,4 +103,49 @@
assertEquals(IllegalArgumentException.class, e.getClass());
}
}
+
+ public void testJspWithNoParam() throws Exception {
+ testcase.get("/index");
+ testcase.output().shouldNotContain("Params");
+ }
+
+ public void testJspWithMultipleParamValues() throws Exception {
+ testcase.setUp();
+ testcase.setRequestParameter("Name", new String[] {"Value1", "Value2", "Value3"});
+ testcase.get("/index");
+ testcase.output().shouldContain("Params");
+ testcase.output().shouldContain("Name");
+ testcase.output().shouldContain("Value1");
+ testcase.output().shouldContain("Value2");
+ testcase.output().shouldContain("Value3");
+ }
+
+ public void testJspWithOneParam() throws Exception {
+ testcase.setUp();
+ testcase.setRequestParameter("Name", "Value");
+ testcase.get("/index");
+ testcase.output().shouldContain("Params");
+ testcase.output().shouldContain("Name");
+ testcase.output().shouldContain("Value");
+ }
+
+ public void testJspWithMultipleParamNullValues() throws Exception {
+ testcase.setUp();
+ testcase.setRequestParameter("Name", new String[] {null, "Value1", "Value2"});
+ testcase.get("/index");
+ testcase.output().shouldContain("Params");
+ testcase.output().shouldContain("Name");
+ testcase.output().shouldContain("null");
+ testcase.output().shouldContain("Value1");
+ testcase.output().shouldContain("Value2");
+ }
+
+ public void testJspWithOneParamNullValue() throws Exception {
+ testcase.setUp();
+ testcase.setRequestParameter("Name", (String) null);
+ testcase.get("/index");
+ testcase.output().shouldContain("Params");
+ testcase.output().shouldContain("Name");
+ testcase.output().shouldContain("null");
+ }
}
Modified: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java 2010-06-13 20:28:53 UTC (rev 266)
+++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java 2012-04-06 17:59:22 UTC (rev 267)
@@ -31,6 +31,10 @@
public static void appendOutput(String content) {
fakedOutput.append(content);
}
+
+ public static StringBuffer getOutput() {
+ return fakedOutput;
+ }
public Jsp compile(String path, Map taglibs) {
lastCompiledWebRoot = getWebRoot();
@@ -48,11 +52,19 @@
}
};
}
-
+
+ public static void setLastCompiledPath(String path) {
+ lastCompiledPath = path;
+ }
+
public static String lastCompiledPath() {
return lastCompiledPath;
}
+ public static void setLastCompiledWebRoot(String webRoot) {
+ lastCompiledWebRoot = webRoot;
+ }
+
public static String lastCompiledWebRoot() {
return lastCompiledWebRoot;
}
Added: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspXCompiler.java
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspXCompiler.java (rev 0)
+++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspXCompiler.java 2012-04-06 17:59:22 UTC (rev 267)
@@ -0,0 +1,60 @@
+package net.sf.jsptest.compiler.dummy;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import net.sf.jsptest.compiler.api.JspExecution;
+import net.sf.jsptest.compiler.api.JspX;
+import net.sf.jsptest.compiler.api.JspXCompiler;
+
+public class FakeJspXCompiler extends FakeJspCompiler implements JspXCompiler {
+
+ public JspX compileX(final String path, Map taglibs) {
+ return new JspX() {
+ {
+ FakeJspCompiler.setLastCompiledWebRoot(getWebRoot());
+ FakeJspCompiler.setLastCompiledPath(path);
+ }
+
+ public JspExecution request(String httpMethod,
+ Map requestAttributes, Map sessionAttributes,
+ final Map requestParameters) {
+ return new JspExecution() {
+ public String getRenderedResponse() {
+ {
+ if (null != requestParameters && !requestParameters.isEmpty()) {
+ Iterator keys = requestParameters.keySet().iterator();
+ FakeJspCompiler.cleanOutput();
+ FakeJspCompiler.appendOutput("Params");
+
+ while (keys.hasNext()) {
+ String key = (String) keys.next();
+ Object value = requestParameters.get(key);
+
+ if (null != value) {
+ if (value instanceof String[]) {
+ FakeJspCompiler.appendOutput(key);
+ String[] values=(String[]) value;
+ for (int i = 0; i < values.length; i++) {
+ FakeJspCompiler.appendOutput(values[i]);
+ }
+ } else {
+ FakeJspCompiler.appendOutput(key);
+ FakeJspCompiler.appendOutput((String) value);
+ }
+ }
+ else {
+ FakeJspCompiler.appendOutput(key);
+ FakeJspCompiler.appendOutput((String) null);
+ }
+ }
+ }
+
+ }
+ return FakeJspCompiler.getOutput().toString();
+ }
+ };
+ }
+ };
+ }
+}
Modified: trunk/jsptest-generic/jsptest-framework/src/test/resources/jsptest.properties
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/resources/jsptest.properties 2010-06-13 20:28:53 UTC (rev 266)
+++ trunk/jsptest-generic/jsptest-framework/src/test/resources/jsptest.properties 2012-04-06 17:59:22 UTC (rev 267)
@@ -1 +1 @@
-jsptest.compiler.implementation=net.sf.jsptest.compiler.dummy.FakeJspCompiler
\ No newline at end of file
+jsptest.compiler.implementation=net.sf.jsptest.compiler.dummy.FakeJspXCompiler
\ No newline at end of file
Modified: trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/index.jsp
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/index.jsp 2010-06-13 20:28:53 UTC (rev 266)
+++ trunk/jsptest-generic/jsptest-framework/src/test/resources/websrc/index.jsp 2012-04-06 17:59:22 UTC (rev 267)
@@ -1,3 +1,17 @@
<%@ page language="Java" %>
+<%@ page import="java.util.Enumeration" %>
Hello <%= "from" %> Jasper
-The time is <%= new java.util.Date().toString() %>
\ No newline at end of file
+The time is <%= new java.util.Date().toString() %>
+<%
+ boolean display=true;
+ Enumeration paramNames=request.getParameterNames();
+ while (paramNames.hasMoreElements()) {
+ if (display) {
+ out.println("Params<br/>");
+ display=false;
+ }
+ String paramName = (String) paramNames.nextElement();
+ String paramValue = request.getParameter(paramName);
+ out.println(paramName + "=" + paramValue + "<br/>");
+ }
+%>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2010-06-13 20:28:59
|
Revision: 266
http://jsptest.svn.sourceforge.net/jsptest/?rev=266&view=rev
Author: lkoskela
Date: 2010-06-13 20:28:53 +0000 (Sun, 13 Jun 2010)
Log Message:
-----------
Download javadocs and source jars by default.
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-13 20:28:22 UTC (rev 265)
+++ trunk/pom.xml 2010-06-13 20:28:53 UTC (rev 266)
@@ -36,7 +36,7 @@
<developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</developerConnection>
<url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/trunk</url>
</scm>
- <mailingLists />
+ <mailingLists/>
<developers>
<developer>
<name>Lasse Koskela</name>
@@ -127,6 +127,14 @@
</configuration>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>true</downloadJavadocs>
+ </configuration>
+ </plugin>
+ <plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2010-06-13 20:28:29
|
Revision: 265
http://jsptest.svn.sourceforge.net/jsptest/?rev=265&view=rev
Author: lkoskela
Date: 2010-06-13 20:28:22 +0000 (Sun, 13 Jun 2010)
Log Message:
-----------
Upgrading jtidy:jtidy:4aug2000r7-dev to org.hibernate:jtidy:r8-20060801
Modified Paths:
--------------
trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/HtmlTestCase.java
trunk/jsptest-generic/pom.xml
Modified: trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/HtmlTestCase.java
===================================================================
--- trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/HtmlTestCase.java 2010-06-13 20:10:11 UTC (rev 264)
+++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/HtmlTestCase.java 2010-06-13 20:28:22 UTC (rev 265)
@@ -106,6 +106,7 @@
private synchronized Tidy configureTidy() {
if (tidy == null) {
tidy = new Tidy();
+ tidy.setWraplen(Integer.MAX_VALUE);
tidy.setMakeClean(true);
tidy.setXmlOut(true);
tidy.setTidyMark(false);
Modified: trunk/jsptest-generic/pom.xml
===================================================================
--- trunk/jsptest-generic/pom.xml 2010-06-13 20:10:11 UTC (rev 264)
+++ trunk/jsptest-generic/pom.xml 2010-06-13 20:28:22 UTC (rev 265)
@@ -18,9 +18,9 @@
</modules>
<dependencies>
<dependency>
- <groupId>jtidy</groupId>
+ <groupId>org.hibernate</groupId>
<artifactId>jtidy</artifactId>
- <version>4aug2000r7-dev</version>
+ <version>r8-20060801</version>
</dependency>
<dependency>
<groupId>junit</groupId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2010-06-13 20:10:19
|
Revision: 264
http://jsptest.svn.sourceforge.net/jsptest/?rev=264&view=rev
Author: lkoskela
Date: 2010-06-13 20:10:11 +0000 (Sun, 13 Jun 2010)
Log Message:
-----------
Upgrading jtidy:jtidy:4aug2000r7-dev to org.hibernate:jtidy:r8-20060801
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-11-13 12:11:24 UTC (rev 263)
+++ trunk/pom.xml 2010-06-13 20:10:11 UTC (rev 264)
@@ -61,9 +61,9 @@
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
<dependency>
- <groupId>jtidy</groupId>
+ <groupId>org.hibernate</groupId>
<artifactId>jtidy</artifactId>
- <version>4aug2000r7-dev</version>
+ <version>r8-20060801</version>
</dependency>
<dependency>
<groupId>junit</groupId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2009-11-13 12:11:45
|
Revision: 263
http://jsptest.svn.sourceforge.net/jsptest/?rev=263&view=rev
Author: lkoskela
Date: 2009-11-13 12:11:24 +0000 (Fri, 13 Nov 2009)
Log Message:
-----------
Added a sample project under version control
Added Paths:
-----------
trunk/jsptest-samples/
trunk/jsptest-samples/jsptest-samples-jsp20/
trunk/jsptest-samples/jsptest-samples-jsp20/.classpath
trunk/jsptest-samples/jsptest-samples-jsp20/.project
trunk/jsptest-samples/jsptest-samples-jsp20/pom.xml
trunk/jsptest-samples/jsptest-samples-jsp20/src/
trunk/jsptest-samples/jsptest-samples-jsp20/src/main/
trunk/jsptest-samples/jsptest-samples-jsp20/src/main/java/
trunk/jsptest-samples/jsptest-samples-jsp20/src/main/webapp/
trunk/jsptest-samples/jsptest-samples-jsp20/src/main/webapp/WEB-INF/
trunk/jsptest-samples/jsptest-samples-jsp20/src/main/webapp/index.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/html/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/html/FormAssertionTest.java
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/html/PageAssertionTest.java
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/BasicJspTest.java
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTag.java
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTagTest.java
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibTest.java
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibsDefinedInJarFileTest.java
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/log4j.properties
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/c-rt.tld
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/c.tld
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/custom-taglib.tld
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/fmt.tld
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/fn.tld
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/sql.tld
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/web.xml
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/x.tld
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/echo_attributes.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/html/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/html/forms/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/html/forms/simpleform.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/html/simple.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/index.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/name$_test-file2.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/su-b.dir/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/su-b.dir/page_in_sub.dir.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/sub/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/sub/dir/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/sub/dir/page_in_subdir.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/taglibs/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/taglibs/custom-taglib.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/taglibs/standard-taglibs.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc2/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc2/WEB-INF/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc2/WEB-INF/custom-taglib.tld
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc2/WEB-INF/lib/
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc2/WEB-INF/lib/tlds.jar
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc2/WEB-INF/web.xml
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc2/custom-taglib.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc2/index.jsp
trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc2/standard-taglibs.jsp
Property changes on: trunk/jsptest-samples/jsptest-samples-jsp20
___________________________________________________________________
Added: svn:ignore
+ target
Added: trunk/jsptest-samples/jsptest-samples-jsp20/.classpath
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/.classpath (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/.classpath 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,48 @@
+<classpath>
+ <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+ <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.3/commons-logging-1.0.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/ibm/icu/icu4j/2.6.1/icu4j-2.6.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/tomcat/jasper-compiler/5.5.15/jasper-compiler-5.5.15.jar"/>
+ <classpathentry kind="var" path="M2_REPO/tomcat/jasper-runtime/5.5.15/jasper-runtime-5.5.15.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sf/jsptest/jsptest-common/0.19/jsptest-common-0.19.jar" sourcepath="M2_REPO/net/sf/jsptest/jsptest-common/0.19/jsptest-common-0.19-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/Users/lkoskela/.m2/repository/net/sf/jsptest/jsptest-common/0.19/jsptest-common-0.19-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/net/sf/jsptest/jsptest-compiler-api/0.19/jsptest-compiler-api-0.19.jar" sourcepath="M2_REPO/net/sf/jsptest/jsptest-compiler-api/0.19/jsptest-compiler-api-0.19-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/Users/lkoskela/.m2/repository/net/sf/jsptest/jsptest-compiler-api/0.19/jsptest-compiler-api-0.19-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/net/sf/jsptest/jsptest-framework/0.19/jsptest-framework-0.19.jar" sourcepath="M2_REPO/net/sf/jsptest/jsptest-framework/0.19/jsptest-framework-0.19-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/Users/lkoskela/.m2/repository/net/sf/jsptest/jsptest-framework/0.19/jsptest-framework-0.19-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/net/sf/jsptest/jsptest-jsp20/0.19/jsptest-jsp20-0.19.jar" sourcepath="M2_REPO/net/sf/jsptest/jsptest-jsp20/0.19/jsptest-jsp20-0.19-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/Users/lkoskela/.m2/repository/net/sf/jsptest/jsptest-jsp20/0.19/jsptest-jsp20-0.19-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.2/junit-3.8.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar"/>
+ <classpathentry kind="var" path="M2_REPO/taglibs/standard/1.1.2/standard-1.1.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xalan/xalan/2.6.0/xalan-2.6.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.3.02/xml-apis-1.3.02.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xom/xom/1.0/xom-1.0.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file
Added: trunk/jsptest-samples/jsptest-samples-jsp20/.project
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/.project (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/.project 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,13 @@
+<projectDescription>
+ <name>jsptest-samples-jsp20</name>
+ <comment>Example project that makes use of JspTest</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Added: trunk/jsptest-samples/jsptest-samples-jsp20/pom.xml
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/pom.xml (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/pom.xml 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,17 @@
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-samples-jsp20</artifactId>
+ <version>0.19</version>
+ <packaging>jar</packaging>
+ <name>jsptest-samples-jsp20</name>
+ <description>Example project that makes use of JspTest</description>
+ <dependencies>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-jsp20</artifactId>
+ <version>0.19</version>
+ </dependency>
+ </dependencies>
+</project>
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/main/webapp/index.jsp
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/main/webapp/index.jsp (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/main/webapp/index.jsp 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,9 @@
+<%@ page language="Java" %>
+<html>
+ <head>
+ <title>Index</title>
+ </head>
+ <body>
+ <p>Hello, <%= "World" %></p>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/html/FormAssertionTest.java
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/html/FormAssertionTest.java (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/html/FormAssertionTest.java 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,77 @@
+/*
+ * 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.html;
+
+import junit.framework.AssertionFailedError;
+import net.sf.jsptest.HtmlTestCase;
+
+/**
+ * @author Lasse Koskela
+ */
+public class FormAssertionTest extends HtmlTestCase {
+
+ protected String getWebRoot() {
+ return "src/test/resources/websrc";
+ }
+
+ public void testFormFieldPresent() throws Exception {
+ get("/html/forms/simpleform.jsp");
+ form().shouldHaveField("text_field_1");
+ form().shouldHaveField("text_field_2");
+ try {
+ form().shouldHaveField("text_field_3");
+ throw new RuntimeException("There is no such field!");
+ } catch (AssertionFailedError expected) {
+ }
+ }
+
+ public void testAssertingAgainstFormFieldValue() throws Exception {
+ setRequestAttribute("j_username", "bob");
+ get("/html/forms/simpleform.jsp");
+ form("form_name").field("text_field_1")
+ .shouldHaveValue("one");
+ form("form_name").field("text_field_2")
+ .shouldHaveValue("two");
+ try {
+ form("form_name").field("text_field_1").shouldHaveValue(
+ "three");
+ throw new RuntimeException(
+ "The field value shouldn't match!");
+ } catch (AssertionFailedError expected) {
+ }
+ }
+
+ public void testFormHasNamedSubmitButton() throws Exception {
+ get("/html/forms/simpleform.jsp");
+ form("form_name").shouldHaveSubmitButton("GO");
+ try {
+ form("form_name").shouldHaveSubmitButton("NOSUCHBUTTON");
+ throw new RuntimeException("There is no such button!");
+ } catch (AssertionFailedError expected) {
+ }
+ }
+
+ public void testFormHasUnnamedSubmitButton() throws Exception {
+ get("/html/forms/simpleform.jsp");
+ form("form_name").shouldHaveSubmitButton();
+ try {
+ form("form_without_buttons").shouldHaveSubmitButton();
+ throw new RuntimeException("There is no submit buttons!");
+ } catch (AssertionFailedError expected) {
+ }
+ }
+}
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/html/PageAssertionTest.java
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/html/PageAssertionTest.java (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/html/PageAssertionTest.java 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,40 @@
+/*
+ * 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.html;
+
+import junit.framework.AssertionFailedError;
+import net.sf.jsptest.HtmlTestCase;
+
+/**
+ * @author Lasse Koskela
+ */
+public class PageAssertionTest extends HtmlTestCase {
+
+ protected String getWebRoot() {
+ return "src/test/resources/websrc";
+ }
+
+ public void testPageShouldContain() throws Exception {
+ get("/html/simple.jsp");
+ page().shouldContain("Hello from Jasper");
+ try {
+ page().shouldContain("no such content");
+ throw new RuntimeException();
+ } catch (AssertionFailedError expected) {
+ }
+ }
+}
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/BasicJspTest.java
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/BasicJspTest.java (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/BasicJspTest.java 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,80 @@
+/*
+ * 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 junit.framework.AssertionFailedError;
+import net.sf.jsptest.HtmlTestCase;
+
+/**
+ * @author Lasse Koskela
+ */
+public class BasicJspTest extends HtmlTestCase {
+
+ protected String getWebRoot() {
+ return "src/test/resources/websrc";
+ }
+
+ public void testRenderingTrivialJsp() throws Exception {
+ get("/index.jsp");
+ output().shouldContain("Hello from Jasper");
+ }
+
+ public void testOutputAssertion() throws Exception {
+ get("/index.jsp");
+ output().shouldContain("Hello from Jasper");
+ try {
+ output().shouldContain("No such content");
+ throw new RuntimeException("Assertion should've failed");
+ } catch (AssertionFailedError expected) {
+ }
+ }
+
+ public void testRenderingSameJspMultipleTimes() throws Exception {
+ for (int i = 0; i < 5; i++) {
+ get("/index.jsp");
+ output().shouldContain("Hello from Jasper");
+ }
+ }
+
+ public void testJspFileWithSpecialCharactersInName()
+ throws Exception {
+ get("/name$_test-file2.jsp");
+ output().shouldContain("Hello from Jasper");
+ }
+
+ public void testJspFileInSubDirectory() throws Exception {
+ get("/sub/dir/page_in_subdir.jsp");
+ output().shouldContain("Hello from Jasper");
+ }
+
+ public void testJspFileInSubDirectoryWithSpecialCharsInPath()
+ throws Exception {
+ get("/su-b.dir/page_in_sub.dir.jsp");
+ output().shouldContain("Hello from Jasper");
+ }
+
+ public void testJspPathNotStartingWithSlash() throws Exception {
+ try {
+ get("sub/dir/page_in_subdir.jsp");
+ fail("JSP path not starting with a slash should raise an exception");
+ } catch (AssertionFailedError pass) {
+ throw pass;
+ } catch (Throwable e) {
+ assertEquals(IllegalArgumentException.class, e.getClass());
+ }
+ }
+}
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTag.java
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTag.java (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTag.java 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,97 @@
+/*
+ * 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 java.io.IOException;
+import java.util.Enumeration;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.TagSupport;
+
+/**
+ * @author Lasse Koskela
+ */
+public class CustomTag extends TagSupport {
+
+ protected String timezone;
+
+ public void setTz(String timezone) {
+ this.timezone = timezone;
+ }
+
+ private HttpServletRequest getRequest() {
+ return ((HttpServletRequest) pageContext.getRequest());
+ }
+
+ public int doStartTag() throws JspException {
+ return TagSupport.EVAL_BODY_INCLUDE;
+ }
+
+ public int doAfterBody() throws JspException {
+ try {
+ JspWriter out = pageContext.getOut();
+ out.println("<pre>");
+ out
+ .println("This content is coming from CustomTag for timezone "
+ + timezone);
+ printRequestMethod(out);
+ printRequestAttributes(out);
+ printSessionAttributes(out);
+ out.println("</pre>");
+ } catch (Exception e) {
+ e.printStackTrace(System.err);
+ throw new JspException(e);
+ }
+ return TagSupport.EVAL_PAGE;
+ }
+
+ private void printRequestMethod(JspWriter out) throws IOException {
+ out.println("HTTP request method: "
+ + getRequest().getMethod());
+ }
+
+ private void printRequestAttributes(JspWriter out)
+ throws IOException {
+ Enumeration attrNames = getRequest().getAttributeNames();
+ while (attrNames.hasMoreElements()) {
+ String name = (String) attrNames.nextElement();
+ String value = String.valueOf(getRequest().getAttribute(
+ name));
+ out.println("HTTP request attribute: " + name + "="
+ + value);
+ }
+ }
+
+ private void printSessionAttributes(JspWriter out)
+ throws IOException {
+ HttpSession session = getRequest().getSession(true);
+ Enumeration attrNames = session.getAttributeNames();
+ while (attrNames.hasMoreElements()) {
+ String name = (String) attrNames.nextElement();
+ String value = String.valueOf(session.getAttribute(name));
+ out.println("HTTP session attribute: " + name + "="
+ + value);
+ }
+ }
+
+ public int doEndTag() throws JspException {
+ return TagSupport.EVAL_PAGE;
+ }
+}
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTagTest.java
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTagTest.java (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTagTest.java 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,75 @@
+/*
+ * 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;
+
+/**
+ * @author Lasse Koskela
+ */
+public class CustomTagTest extends JspTestCase {
+
+ protected String getWebRoot() {
+ return "src/test/resources/websrc";
+ }
+
+ public void testRenderingJspUsingCustomTaglibs() throws Exception {
+ get("/taglibs/custom-taglib.jsp");
+ output().shouldContain(
+ "This content is coming from CustomTag");
+ }
+
+ public void testTaglibAttributes() throws Exception {
+ get("/taglibs/custom-taglib.jsp");
+ output().shouldContain("timezone GMT");
+ output().shouldContain("timezone EST");
+ }
+
+ public void testRequestMethods() throws Exception {
+ // GET
+ get("/taglibs/custom-taglib.jsp");
+ output().shouldContain("HTTP request method: GET");
+ // POST
+ post("/taglibs/custom-taglib.jsp");
+ output().shouldContain("HTTP request method: POST");
+ }
+
+ public void testRequestAndSessionAttributes() throws Exception {
+ // GET
+ setRequestAttribute("Rn1", "Rv1");
+ setRequestAttribute("Rn2", "Rv2");
+ setSessionAttribute("Sn1", "Sv1");
+ setSessionAttribute("Sn2", "Sv2");
+ get("/taglibs/custom-taglib.jsp");
+ output().shouldContain("request attribute: Rn1=Rv1");
+ output().shouldContain("request attribute: Rn2=Rv2");
+ output().shouldContain("session attribute: Sn1=Sv1");
+ output().shouldContain("session attribute: Sn2=Sv2");
+
+ // POST
+ setRequestAttribute("Rn1", "Rv1");
+ setRequestAttribute("Rn2", "Rv2");
+ setSessionAttribute("Sn1", "Sv1");
+ setSessionAttribute("Sn2", "Sv2");
+ post("/taglibs/custom-taglib.jsp");
+ output().shouldContain("request attribute: Rn1=Rv1");
+ output().shouldContain("request attribute: Rn2=Rv2");
+ output().shouldContain("session attribute: Sn1=Sv1");
+ output().shouldContain("session attribute: Sn2=Sv2");
+ }
+
+}
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java 2009-11-13 12:11:24 UTC (rev 263)
@@ -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'");
+ }
+}
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibTest.java
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibTest.java (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibTest.java 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,36 @@
+/*
+ * 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;
+
+/**
+ * @author Lasse Koskela
+ */
+public class TaglibTest extends JspTestCase {
+
+ protected String getWebRoot() {
+ return "src/test/resources/websrc";
+ }
+
+ public void testStandardTaglibsWork() throws Exception {
+ get("/taglibs/standard-taglibs.jsp");
+ for (int i = 1; i <= 10; i++) {
+ output().shouldContain("loop-" + i);
+ }
+ }
+}
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibsDefinedInJarFileTest.java
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibsDefinedInJarFileTest.java (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibsDefinedInJarFileTest.java 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,36 @@
+/*
+ * 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;
+
+/**
+ * @author Lasse Koskela
+ */
+public class TaglibsDefinedInJarFileTest extends JspTestCase {
+
+ protected String getWebRoot() {
+ return "src/test/resources/websrc2";
+ }
+
+ public void testStandardTaglibsWork() throws Exception {
+ get("/standard-taglibs.jsp");
+ for (int i = 1; i <= 10; i++) {
+ output().shouldContain("loop-" + i);
+ }
+ }
+}
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java 2009-11-13 12:11:24 UTC (rev 263)
@@ -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 javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import net.sf.jsptest.JspTestCase;
+
+/**
+ * @author Lasse Koskela
+ */
+public class TestMockingTaglibs extends JspTestCase {
+
+ protected String getJspPackageName() {
+ return "cust.om.tags";
+ }
+
+ protected String getWebRoot() {
+ return "src/test/resources/websrc";
+ }
+
+ /**
+ * This taglib class gets to replace the real thing.
+ */
+ public static class MockCustomTag extends CustomTag {
+ public int doAfterBody() throws JspException {
+ try {
+ JspWriter out = pageContext.getOut();
+ out.println("<pre>");
+ out
+ .println("This content is coming from the mock CustomTag"
+ + " for timezone " + timezone);
+ out.println("</pre>");
+ } catch (Exception e) {
+ throw new JspException(e);
+ }
+ return TagSupport.EVAL_PAGE;
+ }
+ }
+
+ public void testRenderingJspUsingCustomTaglibs() throws Exception {
+ substituteTaglib("custom", MockCustomTag.class);
+ get("/taglibs/custom-taglib.jsp");
+ output().shouldContain(
+ "This content is coming from the mock CustomTag");
+ }
+}
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/log4j.properties
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/log4j.properties (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/log4j.properties 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,8 @@
+log4j.rootCategory=INFO, CONSOLE
+
+log4j.category.org.apache.commons.logging=WARN
+log4j.category.net.sf.jsptest=DEBUG
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=[%d{ISO8601}]%8.8p: %30.50c{6} -- %m%n
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/c-rt.tld
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/c-rt.tld (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/c-rt.tld 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,393 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+ "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+ <tlib-version>1.0</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>c_rt</short-name>
+ <uri>http://java.sun.com/jstl/core_rt</uri>
+ <display-name>JSTL core RT</display-name>
+ <description>JSTL 1.0 core library</description>
+
+ <validator>
+ <validator-class>
+ org.apache.taglibs.standard.tlv.JstlCoreTLV
+ </validator-class>
+ <description>
+ Provides core validation features for JSTL tags.
+ </description>
+ </validator>
+
+ <tag>
+ <name>catch</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Catches any Throwable that occurs in its body and optionally
+ exposes it.
+ </description>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>choose</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Simple conditional tag that establishes a context for
+ mutually exclusive conditional operations, marked by
+ <when> and <otherwise>
+ </description>
+ </tag>
+
+ <tag>
+ <name>if</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Simple conditional tag, which evalutes its body if the
+ supplied condition is true and optionally exposes a Boolean
+ scripting variable representing the evaluation of this condition
+ </description>
+ <attribute>
+ <name>test</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>import</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>
+ <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
+ <body-content>JSP</body-content>
+ <description>
+ Retrieves an absolute or relative URL and exposes its contents
+ to either the page, a String in 'var', or a Reader in 'varReader'.
+ </description>
+ <attribute>
+ <name>url</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>varReader</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>charEncoding</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>forEach</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>
+ <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
+ <body-content>JSP</body-content>
+ <description>
+ The basic iteration tag, accepting many different
+ collection types and supporting subsetting and other
+ functionality
+ </description>
+ <attribute>
+ <name>items</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.Object</type>
+ </attribute>
+ <attribute>
+ <name>begin</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <name>end</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <name>step</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>varStatus</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>forTokens</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Iterates over tokens, separated by the supplied delimeters
+ </description>
+ <attribute>
+ <name>items</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>delims</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>begin</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <name>end</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <name>step</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>varStatus</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>out</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Like <%= ... >, but for expressions.
+ </description>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>default</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>escapeXml</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+
+ <tag>
+ <name>otherwise</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Subtag of <choose> that follows <when> tags
+ and runs only if all of the prior conditions evaluated to
+ 'false'
+ </description>
+ </tag>
+
+ <tag>
+ <name>param</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Adds a parameter to a containing 'import' tag's URL.
+ </description>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>redirect</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Redirects to a new URL.
+ </description>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>url</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>remove</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
+ <body-content>empty</body-content>
+ <description>
+ Removes a scoped variable (from a particular scope, if specified).
+ </description>
+ <attribute>
+ <name>var</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>set</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Sets the result of an expression evaluation in a 'scope'
+ </description>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>property</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>url</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Creates a URL with optional query parameters.
+ </description>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>when</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.WhenTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Subtag of <choose> that includes its body if its
+ condition evalutes to 'true'
+ </description>
+ <attribute>
+ <name>test</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>boolean</type>
+ </attribute>
+ </tag>
+
+</taglib>
Added: trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/c.tld
===================================================================
--- trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/c.tld (rev 0)
+++ trunk/jsptest-samples/jsptest-samples-jsp20/src/test/resources/websrc/WEB-INF/c.tld 2009-11-13 12:11:24 UTC (rev 263)
@@ -0,0 +1,416 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+ "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+ <tlib-version>1.0</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>c</short-name>
+ <uri>http://java.sun.com/jstl/core</uri>
+ <display-name>JSTL core</display-name>
+ <description>JSTL 1.0 core library</description>
+
+ <validator>
+ <validator-class>
+ org.apache.taglibs.standard.tlv.JstlCoreTLV
+ </validator-class>
+ <init-param>
+ <param-name>expressionAttributes</param-name>
+ <param-value>
+ out:value
+ out:default
+ out:escapeXml
+ if:test
+ import:url
+ import:context
+ import:charEncoding
+ forEach:items
+ forEach:begin
+ forEach:end
+ forEach:step
+ forTokens:items
+ forTokens:begin
+ forTokens:end
+ forTokens:step
+ param:encode
+ param:name
+ param:value
+ redirect:context
+ redirect:url
+ set:property
+ set:target
+ set:value
+ url:context
+ url:value
+ when:test
+ </param-value>
+ <description>
+ Whitespace-separated list of colon-separated token pairs
+ describing tag:attribute combinations that accept expressions.
+ The validator uses this information to determine which
+ attributes need their syntax validated.
+ </description>
+ </init-param>
+ </validator>
+
+ <tag>
+ <name>catch</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Catches any Throwable that occurs in its body and optionally
+ exposes it.
+ </description>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>choose</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Simple conditional tag that establishes a context for
+ mutually exclusive conditional operations, marked by
+ <when> and <otherwise>
+ </description>
+ </tag>
+
+ <tag>
+ <name>out</name>
+ <tag-class>org.apache.taglibs.standard.tag.el.core.OutTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Like <%= ... >, but for expressions.
+ </description>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>default</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>escapeXml</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>if</name>
+ <tag-class>org.apache.taglibs.standard.tag.el.core.IfTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Simple conditional tag, which evalutes its body if the
+ supplied condition is true and optionally exposes a Boolean
+ scripting variable representing the evaluation of this condition
+ </description>
+ <attribute>
+ <name>test</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>import</name>
+ <tag-class>org.apache.taglibs.standard.tag.el.core.ImportTag</tag-class>
+ <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
+ <body-content>JSP</body-content>
+ <description>
+ Retrieves an absolute or relative URL and exposes its contents
+ to either the page, a String in 'var', or a Reader in 'varReader'.
+ </description>
+ <attribute>
+ <name>url</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>varReader</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>charEncoding</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>forEach</name>
+ <tag-class>org.apache.taglibs.standard.tag.el.core.ForEachTag</tag-class>
+ <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
+ <body-content>JSP</body-content>
+ <description>
+ The basic iteration tag, accepting many different
+ collection types and supporting subsetting and other
+ functionality
+ </description>
+ <attribute>
+ <name>items</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>begin</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>end</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>step</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>varStatus</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>forTokens</name>
+ <tag-class>org.apache.taglibs.standard.tag.el.core.ForTokensTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Iterates over tokens, separated by the supplied delimeters
+ </description>
+ <attribute>
+ <name>items</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>delims</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>begin</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>end</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>step</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>varStatus</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>otherwise</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Subtag of <choose> that follows <when> tags
+ and runs only if all of the prior conditions evaluated to
+ 'false'
+ </description>
+ </tag>
+
+ <tag>
+ <name>param</name>
+ <tag-class>org.apache.taglibs.standard.tag.el.core.ParamTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Adds a parameter to a containing 'import' tag's URL.
+ </description>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>redirect</name>
+ <tag-class>org.apache.taglibs.standard.tag.el.core.RedirectTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Redirects to a new URL.
+ </description>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>url</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>remove</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
+ <body-content>empty</body-content>
+ <description>
+ Removes a scoped variable (from a particular scope, if specified).
+ </description>
+ <attribute>
+ <name>var</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>set</name>
+ <tag-class>org.apache.taglibs.standard.tag.el.core.SetTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Sets the result of an expression evaluation in a 'scope'
+ </description>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>property</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>url</name>
+ <tag-class>org.apache.taglibs.standard.tag.el.core.UrlTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Prints or exposes a URL with optional query parameters
+ (via the c:param tag).
+ </description>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>when</name>
+ <tag-class>org.apache.taglibs.standard.tag.el.core.WhenTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Subtag of <choose> that includes its body if its
+ condition evalutes to 'true'
+ </description>
+ <attribute>
+ <name>test</name>
+ <required>true</required>
...
[truncated message content] |
|
From: <lko...@us...> - 2009-11-13 12:00:51
|
Revision: 262
http://jsptest.svn.sourceforge.net/jsptest/?rev=262&view=rev
Author: lkoskela
Date: 2009-11-13 12:00:43 +0000 (Fri, 13 Nov 2009)
Log Message:
-----------
Rename toolProvider to factory
Modified Paths:
--------------
trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java
Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java
===================================================================
--- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java 2009-11-13 09:04:09 UTC (rev 261)
+++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java 2009-11-13 12:00:43 UTC (rev 262)
@@ -54,9 +54,8 @@
private Object acquireCompilerImplementation() {
try {
- Class toolProvider = Class.forName("javax.tools.ToolProvider");
- Method method = toolProvider.getMethod("getSystemJavaCompiler",
- null);
+ Class factory = Class.forName("javax.tools.ToolProvider");
+ Method method = factory.getMethod("getSystemJavaCompiler", null);
return method.invoke(null, null);
} catch (Exception e) {
return null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2009-11-13 09:04:17
|
Revision: 261
http://jsptest.svn.sourceforge.net/jsptest/?rev=261&view=rev
Author: lkoskela
Date: 2009-11-13 09:04:09 +0000 (Fri, 13 Nov 2009)
Log Message:
-----------
[maven-release-plugin] prepare for next development iteration
Modified Paths:
--------------
trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
trunk/jsptest-acceptance/pom.xml
trunk/jsptest-generic/jsptest-common/pom.xml
trunk/jsptest-generic/jsptest-compiler-api/pom.xml
trunk/jsptest-generic/jsptest-framework/pom.xml
trunk/jsptest-generic/pom.xml
trunk/jsptest-jsp12/pom.xml
trunk/jsptest-jsp20/pom.xml
trunk/jsptest-jsp21/pom.xml
trunk/pom.xml
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp12</artifactId>
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp20</artifactId>
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp21</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
<packaging>jar</packaging>
<name>
Acceptance tests for the JspTest variant for the JSP 2.1
Modified: trunk/jsptest-acceptance/pom.xml
===================================================================
--- trunk/jsptest-acceptance/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-acceptance/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -3,7 +3,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance</artifactId>
Modified: trunk/jsptest-generic/jsptest-common/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-common/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-generic/jsptest-common/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-common</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Common utilities</name>
<description>
Modified: trunk/jsptest-generic/jsptest-compiler-api/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-compiler-api</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Internal compiler API</name>
<description>
Modified: trunk/jsptest-generic/jsptest-framework/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-framework/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-generic/jsptest-framework/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-framework</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Core framework</name>
<description>
@@ -16,12 +16,12 @@
<dependency>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-compiler-api</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-common</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/jsptest-generic/pom.xml
===================================================================
--- trunk/jsptest-generic/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-generic/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -3,11 +3,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-generic</artifactId>
- <version>0.19</version>
+ <version>0.20-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>
Modified: trunk/jsptest-jsp12/pom.xml
===================================================================
--- trunk/jsptest-jsp12/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-jsp12/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp12</artifactId>
Modified: trunk/jsptest-jsp20/pom.xml
===================================================================
--- trunk/jsptest-jsp20/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-jsp20/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp20</artifactId>
Modified: trunk/jsptest-jsp21/pom.xml
===================================================================
--- trunk/jsptest-jsp21/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/jsptest-jsp21/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp21</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
+++ trunk/pom.xml 2009-11-13 09:04:09 UTC (rev 261)
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19</version>
+ <version>0.20-SNAPSHOT</version>
<name>JspTest root project</name>
<description>This POM acts as a virtual root for the set of JSP version-specific combinations of the contained subprojects.</description>
<packaging>pom</packaging>
@@ -32,9 +32,9 @@
</repository>
</distributionManagement>
<scm>
- <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.19</connection>
- <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.19</developerConnection>
- <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.19</url>
+ <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</connection>
+ <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</developerConnection>
+ <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/trunk</url>
</scm>
<mailingLists />
<developers>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2009-11-13 09:04:05
|
Revision: 260
http://jsptest.svn.sourceforge.net/jsptest/?rev=260&view=rev
Author: lkoskela
Date: 2009-11-13 09:03:51 +0000 (Fri, 13 Nov 2009)
Log Message:
-----------
[maven-release-plugin] copy for tag jsptest-0.19
Added Paths:
-----------
tags/jsptest-0.19/
tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
tags/jsptest-0.19/jsptest-acceptance/pom.xml
tags/jsptest-0.19/jsptest-generic/jsptest-common/pom.xml
tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java
tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java
tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java
tags/jsptest-0.19/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/compiler/
tags/jsptest-0.19/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java
tags/jsptest-0.19/jsptest-generic/jsptest-compiler-api/pom.xml
tags/jsptest-0.19/jsptest-generic/jsptest-framework/pom.xml
tags/jsptest-0.19/jsptest-generic/pom.xml
tags/jsptest-0.19/jsptest-jsp12/pom.xml
tags/jsptest-0.19/jsptest-jsp20/pom.xml
tags/jsptest-0.19/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java
tags/jsptest-0.19/jsptest-jsp21/pom.xml
tags/jsptest-0.19/pom.xml
Removed Paths:
-------------
tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
tags/jsptest-0.19/jsptest-acceptance/pom.xml
tags/jsptest-0.19/jsptest-generic/jsptest-common/pom.xml
tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java
tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java
tags/jsptest-0.19/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java
tags/jsptest-0.19/jsptest-generic/jsptest-compiler-api/pom.xml
tags/jsptest-0.19/jsptest-generic/jsptest-framework/pom.xml
tags/jsptest-0.19/jsptest-generic/pom.xml
tags/jsptest-0.19/jsptest-jsp12/pom.xml
tags/jsptest-0.19/jsptest-jsp20/pom.xml
tags/jsptest-0.19/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java
tags/jsptest-0.19/jsptest-jsp21/pom.xml
tags/jsptest-0.19/pom.xml
Deleted: tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,21 +0,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.19-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>
\ No newline at end of file
Copied: tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml (from rev 259, trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml)
===================================================================
--- tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml (rev 0)
+++ tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,21 @@
+<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.19</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>
\ No newline at end of file
Deleted: tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,21 +0,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.19-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>
\ No newline at end of file
Copied: tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml (from rev 259, trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml)
===================================================================
--- tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml (rev 0)
+++ tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,21 @@
+<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.19</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>
\ No newline at end of file
Deleted: tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,22 +0,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.19-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-acceptance-jsp21</artifactId>
- <version>0.19-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>
\ No newline at end of file
Copied: tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml (from rev 259, trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml)
===================================================================
--- tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml (rev 0)
+++ tags/jsptest-0.19/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,22 @@
+<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.19</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-acceptance-jsp21</artifactId>
+ <version>0.19</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>
\ No newline at end of file
Deleted: tags/jsptest-0.19/jsptest-acceptance/pom.xml
===================================================================
--- trunk/jsptest-acceptance/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-acceptance/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -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.19-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.19/jsptest-acceptance/pom.xml (from rev 259, trunk/jsptest-acceptance/pom.xml)
===================================================================
--- tags/jsptest-0.19/jsptest-acceptance/pom.xml (rev 0)
+++ tags/jsptest-0.19/jsptest-acceptance/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -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.19</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>
Deleted: tags/jsptest-0.19/jsptest-generic/jsptest-common/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-common/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-common/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,38 +0,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.19-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-common</artifactId>
- <version>0.19-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>
\ No newline at end of file
Copied: tags/jsptest-0.19/jsptest-generic/jsptest-common/pom.xml (from rev 259, trunk/jsptest-generic/jsptest-common/pom.xml)
===================================================================
--- tags/jsptest-0.19/jsptest-generic/jsptest-common/pom.xml (rev 0)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-common/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,38 @@
+<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.19</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-common</artifactId>
+ <version>0.19</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>
\ No newline at end of file
Deleted: tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java
===================================================================
--- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,93 +0,0 @@
-/*
- * Copyright 2008 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.java;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import net.sf.jsptest.utils.StreamConsumer;
-
-/**
- * @author Lasse Koskela
- */
-public class CommandLineJavac implements JavaCompiler {
-
- private static final String SEPARATOR = System.getProperty("path.separator");
-
- public boolean compile(String srcFile, String destDir, String[] classpath) throws Exception {
- srcFile = new File(srcFile).getCanonicalPath();
- String cp = join(classpath);
- String[] command = buildCommandLine(srcFile, destDir, cp);
- return execute(command);
- }
-
- private String[] buildCommandLine(String pathToJavaSource, String outputDirectory,
- String classpathString) {
- return new String[] { "javac", "-classpath", classpathString, "-d", outputDirectory,
- pathToJavaSource };
- }
-
- private String join(String[] classpath) {
- StringBuffer s = new StringBuffer(5000);
- for (int i = 0; i < classpath.length; i++) {
- if (s.length() > 0) {
- s.append(SEPARATOR);
- }
- s.append(classpath[i]);
- }
- return s.toString();
- }
-
- private boolean execute(String[] commandLine) throws IOException, InterruptedException {
- Process p = Runtime.getRuntime().exec(commandLine);
- String processOutput = readOutput(p);
- boolean success = (p.waitFor() == 0);
- if (!success) {
- System.err.println(processOutput);
- }
- return success;
- }
-
- private String readOutput(final Process p) throws IOException {
- try {
- StringWriter output = new StringWriter();
- final PrintWriter ps = new PrintWriter(output);
- Thread stderrThread = new Thread(new StreamConsumer("STDERR", p.getErrorStream(), ps));
- Thread stdoutThread = new Thread(new StreamConsumer("STDOUT", p.getInputStream(), ps));
- p.getOutputStream().close();
- stderrThread.start();
- stdoutThread.start();
- stderrThread.join();
- stdoutThread.join();
- return output.toString();
- } catch (Exception e) {
- StringWriter sw = new StringWriter();
- e.printStackTrace(new PrintWriter(sw));
- return sw.toString();
- }
- }
-
- public boolean isAvailable() {
- try {
- Process p = Runtime.getRuntime().exec("javac");
- String s = readOutput(p);
- return s.indexOf("Usage: javac") != -1;
- } catch (Exception e) {
- return false;
- }
- }
-}
Copied: tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java (from rev 255, trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java)
===================================================================
--- tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java (rev 0)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2008 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.java;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import net.sf.jsptest.utils.StreamConsumer;
+
+/**
+ * @author Lasse Koskela
+ */
+public class CommandLineJavac implements JavaCompiler {
+
+ private static final String SEPARATOR = System.getProperty("path.separator");
+
+ public boolean compile(String srcFile, String destDir, String[] classpath) throws Exception {
+ srcFile = new File(srcFile).getCanonicalPath();
+ String cp = join(classpath);
+ String[] command = buildCommandLine(srcFile, destDir, cp);
+ return execute(command);
+ }
+
+ protected String[] buildCommandLine(String pathToJavaSource, String outputDirectory,
+ String classpathString) {
+ return new String[] { "javac", "-classpath", classpathString, "-d", outputDirectory,
+ pathToJavaSource };
+ }
+
+ private String join(String[] classpath) {
+ StringBuffer s = new StringBuffer(5000);
+ for (int i = 0; i < classpath.length; i++) {
+ if (s.length() > 0) {
+ s.append(SEPARATOR);
+ }
+ s.append(classpath[i]);
+ }
+ return s.toString();
+ }
+
+ protected boolean execute(String[] commandLine) throws IOException, InterruptedException {
+ Process p = Runtime.getRuntime().exec(commandLine);
+ String processOutput = readOutput(p);
+ boolean success = (p.waitFor() == 0);
+ if (!success) {
+ System.err.println(processOutput);
+ }
+ return success;
+ }
+
+ private String readOutput(final Process p) throws IOException {
+ try {
+ StringWriter output = new StringWriter();
+ final PrintWriter ps = new PrintWriter(output);
+ Thread stderrThread = new Thread(new StreamConsumer("STDERR", p.getErrorStream(), ps));
+ Thread stdoutThread = new Thread(new StreamConsumer("STDOUT", p.getInputStream(), ps));
+ p.getOutputStream().close();
+ stderrThread.start();
+ stdoutThread.start();
+ stderrThread.join();
+ stdoutThread.join();
+ return output.toString();
+ } catch (Exception e) {
+ StringWriter sw = new StringWriter();
+ e.printStackTrace(new PrintWriter(sw));
+ return sw.toString();
+ }
+ }
+
+ public boolean isAvailable() {
+ try {
+ Process p = Runtime.getRuntime().exec("javac");
+ String s = readOutput(p);
+ return s.indexOf("Usage: javac") != -1;
+ } catch (Exception e) {
+ return false;
+ }
+ }
+}
Copied: tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java (from rev 255, trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java)
===================================================================
--- tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java (rev 0)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,65 @@
+package net.sf.jsptest.compiler.java;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Method;
+
+import net.sf.jsptest.utils.IO;
+
+public class Java6Compiler extends CommandLineJavac {
+ private static final String TMPDIR = System.getProperty("java.io.tmpdir");
+
+ protected boolean execute(String[] arguments) throws IOException,
+ InterruptedException {
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ try {
+ return executeWithReflection(arguments, output) == 0;
+ } finally {
+ File logFile = new File(TMPDIR, getClass().getName() + ".log");
+ IO.append(output.toString(), logFile);
+ }
+ }
+
+ private int executeWithReflection(String[] arguments,
+ ByteArrayOutputStream output) {
+ try {
+ Object systemJavaCompiler = acquireCompilerImplementation();
+ Method[] methods = systemJavaCompiler.getClass().getMethods();
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i].getName().equals("run")) {
+ Object returnValue = methods[i].invoke(systemJavaCompiler,
+ new Object[] {
+ new ByteArrayInputStream(new byte[0]),
+ output, output, arguments });
+ return Integer.parseInt(String.valueOf(returnValue));
+ }
+ }
+ return -1;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected String[] buildCommandLine(String pathToJavaSource,
+ String outputDirectory, String classpathString) {
+ return new String[] { "-verbose", "-classpath", classpathString, "-d",
+ outputDirectory, pathToJavaSource };
+ }
+
+ public boolean isAvailable() {
+ return acquireCompilerImplementation() != null;
+ }
+
+ private Object acquireCompilerImplementation() {
+ try {
+ Class toolProvider = Class.forName("javax.tools.ToolProvider");
+ Method method = toolProvider.getMethod("getSystemJavaCompiler",
+ null);
+ return method.invoke(null, null);
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
Deleted: tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java
===================================================================
--- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,61 +0,0 @@
-/*
- * Copyright 2008 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.utils;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * The <tt>IO</tt> class provides utility methods for handling I/O related tasks such as reading
- * from and writing to files, streams, and writers.
- *
- * @author Lasse Koskela
- */
-public class IO {
-
- public static byte[] readToByteArray(File file) throws IOException {
- return readToByteArray(new FileInputStream(file));
- }
-
- public static byte[] readToByteArray(InputStream in) throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- byte[] buffer = new byte[8096];
- int r = -1;
- while ((r = in.read(buffer)) != -1) {
- out.write(buffer, 0, r);
- }
- in.close();
- return out.toByteArray();
- }
-
- public static void write(String what, File to) throws IOException {
- FileWriter fw = new FileWriter(to, false);
- fw.write(what);
- fw.close();
- }
-
- public static String readToString(File file) throws IOException {
- return new String(readToByteArray(file));
- }
-
- public static String readToString(InputStream stream) throws IOException {
- return new String(readToByteArray(stream));
- }
-}
Copied: tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java (from rev 254, trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java)
===================================================================
--- tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java (rev 0)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2008 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.utils;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * The <tt>IO</tt> class provides utility methods for handling I/O related tasks
+ * such as reading from and writing to files, streams, and writers.
+ *
+ * @author Lasse Koskela
+ */
+public class IO {
+
+ public static byte[] readToByteArray(File file) throws IOException {
+ return readToByteArray(new FileInputStream(file));
+ }
+
+ public static byte[] readToByteArray(InputStream in) throws IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ byte[] buffer = new byte[8096];
+ int r = -1;
+ while ((r = in.read(buffer)) != -1) {
+ out.write(buffer, 0, r);
+ }
+ in.close();
+ return out.toByteArray();
+ }
+
+ public static void write(String what, File to) throws IOException {
+ write(what, new FileWriter(to, false));
+ }
+
+ public static void append(String what, File to) throws IOException {
+ write(what, new FileWriter(to, true));
+ }
+
+ private static void write(String what, FileWriter to) throws IOException {
+ to.write(what);
+ to.close();
+ }
+
+ public static String readToString(File file) throws IOException {
+ return new String(readToByteArray(file));
+ }
+
+ public static String readToString(InputStream stream) throws IOException {
+ return new String(readToByteArray(stream));
+ }
+}
Deleted: tags/jsptest-0.19/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java
===================================================================
--- trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,26 +0,0 @@
-package net.sf.jsptest.utils;
-
-import java.io.File;
-import junit.framework.TestCase;
-
-/**
- * @author Lasse Koskela
- */
-public class IOTest extends TestCase {
-
- private File file;
-
- protected void setUp() throws Exception {
- file = File.createTempFile(getName(), ".txt");
- }
-
- protected void tearDown() throws Exception {
- file.delete();
- }
-
- public void testReadAndWriteToFile() throws Exception {
- String content = "content";
- IO.write(content, file);
- assertEquals(content, new String(IO.readToByteArray(file)));
- }
-}
Copied: tags/jsptest-0.19/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java (from rev 254, trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java)
===================================================================
--- tags/jsptest-0.19/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java (rev 0)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,32 @@
+package net.sf.jsptest.utils;
+
+import java.io.File;
+import junit.framework.TestCase;
+
+/**
+ * @author Lasse Koskela
+ */
+public class IOTest extends TestCase {
+
+ private File file;
+
+ protected void setUp() throws Exception {
+ file = File.createTempFile(getName(), ".txt");
+ }
+
+ protected void tearDown() throws Exception {
+ file.delete();
+ }
+
+ public void testReadAndWriteToFile() throws Exception {
+ String content = "content";
+ IO.write(content, file);
+ assertEquals(content, new String(IO.readToByteArray(file)));
+ }
+
+ public void testAppendingToFile() throws Exception {
+ IO.append("one", file);
+ IO.append("two", file);
+ assertEquals("onetwo", new String(IO.readToByteArray(file)));
+ }
+}
Deleted: tags/jsptest-0.19/jsptest-generic/jsptest-compiler-api/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-compiler-api/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,16 +0,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.19-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-compiler-api</artifactId>
- <version>0.19-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>
\ No newline at end of file
Copied: tags/jsptest-0.19/jsptest-generic/jsptest-compiler-api/pom.xml (from rev 259, trunk/jsptest-generic/jsptest-compiler-api/pom.xml)
===================================================================
--- tags/jsptest-0.19/jsptest-generic/jsptest-compiler-api/pom.xml (rev 0)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-compiler-api/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,16 @@
+<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.19</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-compiler-api</artifactId>
+ <version>0.19</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>
\ No newline at end of file
Deleted: tags/jsptest-0.19/jsptest-generic/jsptest-framework/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-framework/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-framework/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,27 +0,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.19-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-framework</artifactId>
- <version>0.19-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.19-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-common</artifactId>
- <version>0.19-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Copied: tags/jsptest-0.19/jsptest-generic/jsptest-framework/pom.xml (from rev 259, trunk/jsptest-generic/jsptest-framework/pom.xml)
===================================================================
--- tags/jsptest-0.19/jsptest-generic/jsptest-framework/pom.xml (rev 0)
+++ tags/jsptest-0.19/jsptest-generic/jsptest-framework/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,27 @@
+<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.19</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-framework</artifactId>
+ <version>0.19</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.19</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-common</artifactId>
+ <version>0.19</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Deleted: tags/jsptest-0.19/jsptest-generic/pom.xml
===================================================================
--- trunk/jsptest-generic/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-generic/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -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.19-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-generic</artifactId>
- <version>0.19-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.19/jsptest-generic/pom.xml (from rev 259, trunk/jsptest-generic/pom.xml)
===================================================================
--- tags/jsptest-0.19/jsptest-generic/pom.xml (rev 0)
+++ tags/jsptest-0.19/jsptest-generic/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -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.19</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-generic</artifactId>
+ <version>0.19</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.19/jsptest-jsp12/pom.xml
===================================================================
--- trunk/jsptest-jsp12/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-jsp12/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,50 +0,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.19-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>
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- </resources>
- </build>
-</project>
\ No newline at end of file
Copied: tags/jsptest-0.19/jsptest-jsp12/pom.xml (from rev 259, trunk/jsptest-jsp12/pom.xml)
===================================================================
--- tags/jsptest-0.19/jsptest-jsp12/pom.xml (rev 0)
+++ tags/jsptest-0.19/jsptest-jsp12/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,50 @@
+<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.19</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>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ </build>
+</project>
\ No newline at end of file
Deleted: tags/jsptest-0.19/jsptest-jsp20/pom.xml
===================================================================
--- trunk/jsptest-jsp20/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-jsp20/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,50 +0,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.19-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>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- </resources>
- </build>
-</project>
\ No newline at end of file
Copied: tags/jsptest-0.19/jsptest-jsp20/pom.xml (from rev 259, trunk/jsptest-jsp20/pom.xml)
===================================================================
--- tags/jsptest-0.19/jsptest-jsp20/pom.xml (rev 0)
+++ tags/jsptest-0.19/jsptest-jsp20/pom.xml 2009-11-13 09:03:51 UTC (rev 260)
@@ -0,0 +1,50 @@
+<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.19</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>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ </build>
+</project>
\ No newline at end of file
Deleted: tags/jsptest-0.19/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-11-19 13:06:40 UTC (rev 253)
+++ tags/jsptest-0.19/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java 2009-11-13 09:03:51 UTC (rev 260)
@@ -1,373 +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 net.sf.jsptest.utils.Strings;
-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
- * @author Meinert Schwartau (scwar32)
- */
-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 path
- * The path to the JSP source file to compile, given relative to the web root.
- * @param mockTaglibs
- * Mapping of tag names to tag handler classes
- */
- 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);
- compiler.compile();
- }
-
- private JspCompilationContext createJspCompilationContext(JspCompilationInfo info,
- ServletContext servletContext, Options options, JspRuntimeContext jspRuntimeContext,
- JspServletWrapper jspServletWrapper, StringWriter stringWriter) {
- boolean isErrorPage = false;
- JspCompilationContext cContext = new JspCompilationContext(info.getJspPath(), isErrorPage,
- options, servletContext, jspServletWrapper, jspRuntimeContext);
- cContext.getOutputDir(); // forces creation of the directory tree
- cContext.setServletJavaFileName(info.getJavaSource());
- cContext.setServletPackageName(getJspPackageName());
- cContext.setWriter(new ServletWriter(new PrintWriter(stringWriter)));
- createPathToGeneratedJavaSource(info);
- return cContext;
- }
-
- private void createPathToGeneratedJavaSource(JspCompilationInfo info) {
- new File(info.getJavaSource()).getParentFile().mkdirs();
- }
-
- private JspServletWrapper makeWrapper(ServletContext servletContext, Options options,
- JspRuntimeContext jspRuntimeContext) throws MalformedURLException, JasperException {
- TagInfo tagInfo = new MockTagInfo();
- String tagFilePath = "/";
- URL tagFileJarUrl = new File(".").toURL();
- JspServletWrapper wrapper = new JspServletWrapper(servletContext, options, tagFilePath,
- tagInfo, jspRuntimeContext, tagFileJarUrl);
- return wrapper;
- }
-
- private Options createOptions(ServletContext ctx, ServletConfig cfg, JspCompilationInfo info) {
- Options options = new EmbeddedServletOptions(cfg, ctx);
- return new MockOptions(options, ctx, info);
- }
-
- private void resolveJavaSourceFile(JspCompilationInfo info) {
- File dir = new File(info.getClassOutputDir());
- if (getJspPackageName().length() > 0) {
- dir = new File(dir, getJspPackageName().replace('.', '/'));
- }
- dir.mkdirs();
- String name = resolveJavaSourceFileName(info.getJspPath());
- info.setJavaSource(new File(dir, name).getPath());
- }
-
- private String resolveJavaSourceFileName(String jspPath) {
- String name = encodeSpecialCharacters(jspPath);
- if (name.startsWith("/")) {
- name = name.substring(1);
- }
- return name + ".java";
- }
-
- private String encodeSpecialCharacters(String name) {
- StringBuffer result = new StringBuffer();
- char[] chars = name.toCharArray();
- for (int i = 0; i < chars.length; i++) {
- if (chars[i] == '-') {
- result.append("_002d");
- } else if (chars[i] ==...
[truncated message content] |
|
From: <lko...@us...> - 2009-11-13 09:03:09
|
Revision: 259
http://jsptest.svn.sourceforge.net/jsptest/?rev=259&view=rev
Author: lkoskela
Date: 2009-11-13 09:03:02 +0000 (Fri, 13 Nov 2009)
Log Message:
-----------
[maven-release-plugin] prepare release jsptest-0.19
Modified Paths:
--------------
trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
trunk/jsptest-acceptance/pom.xml
trunk/jsptest-generic/jsptest-common/pom.xml
trunk/jsptest-generic/jsptest-compiler-api/pom.xml
trunk/jsptest-generic/jsptest-framework/pom.xml
trunk/jsptest-generic/pom.xml
trunk/jsptest-jsp12/pom.xml
trunk/jsptest-jsp20/pom.xml
trunk/jsptest-jsp21/pom.xml
trunk/pom.xml
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp12</artifactId>
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp20</artifactId>
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp21</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
<packaging>jar</packaging>
<name>
Acceptance tests for the JspTest variant for the JSP 2.1
Modified: trunk/jsptest-acceptance/pom.xml
===================================================================
--- trunk/jsptest-acceptance/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-acceptance/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -3,7 +3,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance</artifactId>
Modified: trunk/jsptest-generic/jsptest-common/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-common/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-generic/jsptest-common/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-common</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
<packaging>jar</packaging>
<name>Common utilities</name>
<description>
Modified: trunk/jsptest-generic/jsptest-compiler-api/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-compiler-api</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
<packaging>jar</packaging>
<name>Internal compiler API</name>
<description>
Modified: trunk/jsptest-generic/jsptest-framework/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-framework/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-generic/jsptest-framework/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-framework</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
<packaging>jar</packaging>
<name>Core framework</name>
<description>
@@ -16,12 +16,12 @@
<dependency>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-compiler-api</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</dependency>
<dependency>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-common</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/jsptest-generic/pom.xml
===================================================================
--- trunk/jsptest-generic/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-generic/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -3,11 +3,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-generic</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</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>
Modified: trunk/jsptest-jsp12/pom.xml
===================================================================
--- trunk/jsptest-jsp12/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-jsp12/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp12</artifactId>
Modified: trunk/jsptest-jsp20/pom.xml
===================================================================
--- trunk/jsptest-jsp20/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-jsp20/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp20</artifactId>
Modified: trunk/jsptest-jsp21/pom.xml
===================================================================
--- trunk/jsptest-jsp21/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/jsptest-jsp21/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp21</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
+++ trunk/pom.xml 2009-11-13 09:03:02 UTC (rev 259)
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.19-SNAPSHOT</version>
+ <version>0.19</version>
<name>JspTest root project</name>
<description>This POM acts as a virtual root for the set of JSP version-specific combinations of the contained subprojects.</description>
<packaging>pom</packaging>
@@ -32,11 +32,11 @@
</repository>
</distributionManagement>
<scm>
- <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</connection>
- <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</developerConnection>
- <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/trunk</url>
+ <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.19</connection>
+ <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.19</developerConnection>
+ <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.19</url>
</scm>
- <mailingLists/>
+ <mailingLists />
<developers>
<developer>
<name>Lasse Koskela</name>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2009-11-13 07:50:28
|
Revision: 258
http://jsptest.svn.sourceforge.net/jsptest/?rev=258&view=rev
Author: lkoskela
Date: 2009-11-13 07:50:22 +0000 (Fri, 13 Nov 2009)
Log Message:
-----------
Switched the <scm/> element to point to trunk instead of an old tag (jsptest-0.11)
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-11-13 07:49:44 UTC (rev 257)
+++ trunk/pom.xml 2009-11-13 07:50:22 UTC (rev 258)
@@ -32,9 +32,9 @@
</repository>
</distributionManagement>
<scm>
- <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.11</connection>
- <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.11</developerConnection>
- <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.11</url>
+ <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</connection>
+ <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/trunk</developerConnection>
+ <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/trunk</url>
</scm>
<mailingLists/>
<developers>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2009-11-13 07:49:50
|
Revision: 257
http://jsptest.svn.sourceforge.net/jsptest/?rev=257&view=rev
Author: lkoskela
Date: 2009-11-13 07:49:44 +0000 (Fri, 13 Nov 2009)
Log Message:
-----------
Formatted XML
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-11-13 07:49:21 UTC (rev 256)
+++ trunk/pom.xml 2009-11-13 07:49:44 UTC (rev 257)
@@ -1,240 +1,240 @@
<?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">
- <modelVersion>4.0.0</modelVersion>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest</artifactId>
- <version>0.19-SNAPSHOT</version>
- <name>JspTest root project</name>
- <description>This POM acts as a virtual root for the set of JSP version-specific combinations of the contained subprojects.</description>
- <packaging>pom</packaging>
- <url>http://jsptest.sourceforge.net</url>
- <inceptionYear>2006</inceptionYear>
- <organization>
- <name>JspTest developers</name>
- <url>http://jsptest.sourceforge.net</url>
- </organization>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <issueManagement>
- <system>sourceforge</system>
- <url>http://sourceforge.net/tracker/?group_id=164388</url>
- </issueManagement>
- <distributionManagement>
- <repository>
- <id>jsptest.sourceforge.net</id>
- <name>JspTest Maven2 repository at SourceForge</name>
- <url>scp://shell.sourceforge.net:/home/groups/j/js/jsptest/htdocs/maven2</url>
- </repository>
- </distributionManagement>
- <scm>
- <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.11</connection>
- <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.11</developerConnection>
- <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.11</url>
- </scm>
- <mailingLists />
- <developers>
- <developer>
- <name>Lasse Koskela</name>
- <id>lkoskela</id>
- <email>lko...@us...</email>
- </developer>
- </developers>
- <modules>
- <module>jsptest-generic</module>
- <module>jsptest-jsp12</module>
- <module>jsptest-jsp20</module>
- <module>jsptest-jsp21</module>
- <module>jsptest-acceptance</module>
- </modules>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>sun.jdk</groupId>
- <artifactId>tools</artifactId>
- <version>1.4</version>
- <scope>system</scope>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- </dependency>
- <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>net.sf.jsptest</groupId>
- <artifactId>jsptest-jsp12</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-jsp20</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-jsp21</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-compiler-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-framework</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <build>
- <resources>
- <resource>
- <targetPath>/</targetPath>
- <filtering>false</filtering>
- <directory>${basedir}/src/main/resources</directory>
- </resource>
- </resources>
-<!-- define build plugins to be used (TODO: should this be moved to the jar POMs?) -->
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <fork>true</fork>
- <source>1.4</source>
- <target>1.4</target>
- </configuration>
- </plugin>
- <plugin>
- <inherited>true</inherited>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <minmemory>128m</minmemory>
- <maxmemory>256m</maxmemory>
- </configuration>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <inherited>true</inherited>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <configuration>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- <preparationGoals>clean install</preparationGoals>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/jsp12.xml</descriptor>
- <descriptor>src/main/assembly/jsp20.xml</descriptor>
- <descriptor>src/main/assembly/jsp21.xml</descriptor>
- </descriptors>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <includes>
- <include>**/*Test.java</include>
- <include>**/Test*.java</include>
- </includes>
- <testFailureIgnore>true</testFailureIgnore>
- <forkMode>once</forkMode>
- <useSystemClassLoader>true</useSystemClassLoader>
- <skip>false</skip>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>surefire-report-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.0</version>
- </plugin>
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <reportSets>
- <reportSet>
- <reports>
- <report>dependencies</report>
- <report>project-team</report>
- <report>mailing-list</report>
- <report>issue-tracking</report>
- <report>license</report>
- <report>scm</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>surefire-report-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.0</version>
- </plugin>
- </plugins>
- </reporting>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest</artifactId>
+ <version>0.19-SNAPSHOT</version>
+ <name>JspTest root project</name>
+ <description>This POM acts as a virtual root for the set of JSP version-specific combinations of the contained subprojects.</description>
+ <packaging>pom</packaging>
+ <url>http://jsptest.sourceforge.net</url>
+ <inceptionYear>2006</inceptionYear>
+ <organization>
+ <name>JspTest developers</name>
+ <url>http://jsptest.sourceforge.net</url>
+ </organization>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <issueManagement>
+ <system>sourceforge</system>
+ <url>http://sourceforge.net/tracker/?group_id=164388</url>
+ </issueManagement>
+ <distributionManagement>
+ <repository>
+ <id>jsptest.sourceforge.net</id>
+ <name>JspTest Maven2 repository at SourceForge</name>
+ <url>scp://shell.sourceforge.net:/home/groups/j/js/jsptest/htdocs/maven2</url>
+ </repository>
+ </distributionManagement>
+ <scm>
+ <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.11</connection>
+ <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.11</developerConnection>
+ <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.11</url>
+ </scm>
+ <mailingLists/>
+ <developers>
+ <developer>
+ <name>Lasse Koskela</name>
+ <id>lkoskela</id>
+ <email>lko...@us...</email>
+ </developer>
+ </developers>
+ <modules>
+ <module>jsptest-generic</module>
+ <module>jsptest-jsp12</module>
+ <module>jsptest-jsp20</module>
+ <module>jsptest-jsp21</module>
+ <module>jsptest-acceptance</module>
+ </modules>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.4</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ <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>net.sf.jsptest</groupId>
+ <artifactId>jsptest-jsp12</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-jsp20</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-jsp21</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-compiler-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-framework</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <build>
+ <resources>
+ <resource>
+ <targetPath>/</targetPath>
+ <filtering>false</filtering>
+ <directory>${basedir}/src/main/resources</directory>
+ </resource>
+ </resources>
+ <!-- define build plugins to be used (TODO: should this be moved to the jar POMs?) -->
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <fork>true</fork>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <inherited>true</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <minmemory>128m</minmemory>
+ <maxmemory>256m</maxmemory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <inherited>true</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ <preparationGoals>clean install</preparationGoals>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/jsp12.xml</descriptor>
+ <descriptor>src/main/assembly/jsp20.xml</descriptor>
+ <descriptor>src/main/assembly/jsp21.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ <include>**/Test*.java</include>
+ </includes>
+ <testFailureIgnore>true</testFailureIgnore>
+ <forkMode>once</forkMode>
+ <useSystemClassLoader>true</useSystemClassLoader>
+ <skip>false</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>surefire-report-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>dependencies</report>
+ <report>project-team</report>
+ <report>mailing-list</report>
+ <report>issue-tracking</report>
+ <report>license</report>
+ <report>scm</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>surefire-report-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2009-11-13 07:49:31
|
Revision: 256
http://jsptest.svn.sourceforge.net/jsptest/?rev=256&view=rev
Author: lkoskela
Date: 2009-11-13 07:49:21 +0000 (Fri, 13 Nov 2009)
Log Message:
-----------
Change https:// to http:// for issue management URL in pom.xml
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-11-13 00:00:35 UTC (rev 255)
+++ trunk/pom.xml 2009-11-13 07:49:21 UTC (rev 256)
@@ -22,7 +22,7 @@
</licenses>
<issueManagement>
<system>sourceforge</system>
- <url>https://sourceforge.net/tracker/?group_id=164388</url>
+ <url>http://sourceforge.net/tracker/?group_id=164388</url>
</issueManagement>
<distributionManagement>
<repository>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2009-11-13 00:01:23
|
Revision: 255
http://jsptest.svn.sourceforge.net/jsptest/?rev=255&view=rev
Author: lkoskela
Date: 2009-11-13 00:00:35 +0000 (Fri, 13 Nov 2009)
Log Message:
-----------
Added JavaCompiler implementation for Java 6 (JSR 199)
Modified Paths:
--------------
trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java
trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java
Added Paths:
-----------
trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java
trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/compiler/
trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/compiler/java/
trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/compiler/java/Java6CompilerTest.java
Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java
===================================================================
--- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java 2009-11-12 23:48:30 UTC (rev 254)
+++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java 2009-11-13 00:00:35 UTC (rev 255)
@@ -35,7 +35,7 @@
return execute(command);
}
- private String[] buildCommandLine(String pathToJavaSource, String outputDirectory,
+ protected String[] buildCommandLine(String pathToJavaSource, String outputDirectory,
String classpathString) {
return new String[] { "javac", "-classpath", classpathString, "-d", outputDirectory,
pathToJavaSource };
@@ -52,7 +52,7 @@
return s.toString();
}
- private boolean execute(String[] commandLine) throws IOException, InterruptedException {
+ protected boolean execute(String[] commandLine) throws IOException, InterruptedException {
Process p = Runtime.getRuntime().exec(commandLine);
String processOutput = readOutput(p);
boolean success = (p.waitFor() == 0);
Added: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java
===================================================================
--- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java (rev 0)
+++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/Java6Compiler.java 2009-11-13 00:00:35 UTC (rev 255)
@@ -0,0 +1,65 @@
+package net.sf.jsptest.compiler.java;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Method;
+
+import net.sf.jsptest.utils.IO;
+
+public class Java6Compiler extends CommandLineJavac {
+ private static final String TMPDIR = System.getProperty("java.io.tmpdir");
+
+ protected boolean execute(String[] arguments) throws IOException,
+ InterruptedException {
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ try {
+ return executeWithReflection(arguments, output) == 0;
+ } finally {
+ File logFile = new File(TMPDIR, getClass().getName() + ".log");
+ IO.append(output.toString(), logFile);
+ }
+ }
+
+ private int executeWithReflection(String[] arguments,
+ ByteArrayOutputStream output) {
+ try {
+ Object systemJavaCompiler = acquireCompilerImplementation();
+ Method[] methods = systemJavaCompiler.getClass().getMethods();
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i].getName().equals("run")) {
+ Object returnValue = methods[i].invoke(systemJavaCompiler,
+ new Object[] {
+ new ByteArrayInputStream(new byte[0]),
+ output, output, arguments });
+ return Integer.parseInt(String.valueOf(returnValue));
+ }
+ }
+ return -1;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected String[] buildCommandLine(String pathToJavaSource,
+ String outputDirectory, String classpathString) {
+ return new String[] { "-verbose", "-classpath", classpathString, "-d",
+ outputDirectory, pathToJavaSource };
+ }
+
+ public boolean isAvailable() {
+ return acquireCompilerImplementation() != null;
+ }
+
+ private Object acquireCompilerImplementation() {
+ try {
+ Class toolProvider = Class.forName("javax.tools.ToolProvider");
+ Method method = toolProvider.getMethod("getSystemJavaCompiler",
+ null);
+ return method.invoke(null, null);
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
Added: trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/compiler/java/Java6CompilerTest.java
===================================================================
--- trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/compiler/java/Java6CompilerTest.java (rev 0)
+++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/compiler/java/Java6CompilerTest.java 2009-11-13 00:00:35 UTC (rev 255)
@@ -0,0 +1,14 @@
+package net.sf.jsptest.compiler.java;
+
+import junit.framework.TestCase;
+
+public class Java6CompilerTest extends TestCase {
+ public void testIsAvailableWhenRunningUnderJava6() throws Exception {
+ assertEquals(isRunningWithJava6(), new Java6Compiler().isAvailable());
+ }
+
+ private boolean isRunningWithJava6() {
+ String versionString = System.getProperty("java.specification.version");
+ return Float.parseFloat(versionString) >= 1.6f;
+ }
+}
Modified: trunk/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 2009-11-12 23:48:30 UTC (rev 254)
+++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java 2009-11-13 00:00:35 UTC (rev 255)
@@ -30,6 +30,7 @@
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.Java6Compiler;
import net.sf.jsptest.compiler.java.JavaCompiler;
import net.sf.jsptest.compiler.java.SunJavaC;
import net.sf.jsptest.compiler.jsp20.mock.MockOptions;
@@ -351,6 +352,7 @@
// this doesn't work because with Maven we need to set the classpath
// explicitly as the "current" classpath does not include our
// dependencies
+ compilers.add(new Java6Compiler());
compilers.add(new SunJavaC());
compilers.add(new CommandLineJavac());
for (Iterator i = compilers.iterator(); i.hasNext();) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2009-11-12 23:48:51
|
Revision: 254
http://jsptest.svn.sourceforge.net/jsptest/?rev=254&view=rev
Author: lkoskela
Date: 2009-11-12 23:48:30 +0000 (Thu, 12 Nov 2009)
Log Message:
-----------
Added IO.append
Modified Paths:
--------------
trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java
trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java
Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java
===================================================================
--- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java 2008-11-19 13:06:40 UTC (rev 253)
+++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java 2009-11-12 23:48:30 UTC (rev 254)
@@ -23,39 +23,46 @@
import java.io.InputStream;
/**
- * The <tt>IO</tt> class provides utility methods for handling I/O related tasks such as reading
- * from and writing to files, streams, and writers.
+ * The <tt>IO</tt> class provides utility methods for handling I/O related tasks
+ * such as reading from and writing to files, streams, and writers.
*
* @author Lasse Koskela
*/
public class IO {
- public static byte[] readToByteArray(File file) throws IOException {
- return readToByteArray(new FileInputStream(file));
- }
+ public static byte[] readToByteArray(File file) throws IOException {
+ return readToByteArray(new FileInputStream(file));
+ }
- public static byte[] readToByteArray(InputStream in) throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- byte[] buffer = new byte[8096];
- int r = -1;
- while ((r = in.read(buffer)) != -1) {
- out.write(buffer, 0, r);
- }
- in.close();
- return out.toByteArray();
- }
+ public static byte[] readToByteArray(InputStream in) throws IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ byte[] buffer = new byte[8096];
+ int r = -1;
+ while ((r = in.read(buffer)) != -1) {
+ out.write(buffer, 0, r);
+ }
+ in.close();
+ return out.toByteArray();
+ }
- public static void write(String what, File to) throws IOException {
- FileWriter fw = new FileWriter(to, false);
- fw.write(what);
- fw.close();
- }
+ public static void write(String what, File to) throws IOException {
+ write(what, new FileWriter(to, false));
+ }
- public static String readToString(File file) throws IOException {
- return new String(readToByteArray(file));
- }
+ public static void append(String what, File to) throws IOException {
+ write(what, new FileWriter(to, true));
+ }
- public static String readToString(InputStream stream) throws IOException {
- return new String(readToByteArray(stream));
- }
+ private static void write(String what, FileWriter to) throws IOException {
+ to.write(what);
+ to.close();
+ }
+
+ public static String readToString(File file) throws IOException {
+ return new String(readToByteArray(file));
+ }
+
+ public static String readToString(InputStream stream) throws IOException {
+ return new String(readToByteArray(stream));
+ }
}
Modified: trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java
===================================================================
--- trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java 2008-11-19 13:06:40 UTC (rev 253)
+++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java 2009-11-12 23:48:30 UTC (rev 254)
@@ -23,4 +23,10 @@
IO.write(content, file);
assertEquals(content, new String(IO.readToByteArray(file)));
}
+
+ public void testAppendingToFile() throws Exception {
+ IO.append("one", file);
+ IO.append("two", file);
+ assertEquals("onetwo", new String(IO.readToByteArray(file)));
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2008-11-19 13:06:42
|
Revision: 253
http://jsptest.svn.sourceforge.net/jsptest/?rev=253&view=rev
Author: lkoskela
Date: 2008-11-19 13:06:40 +0000 (Wed, 19 Nov 2008)
Log Message:
-----------
[maven-release-plugin] prepare for next development iteration
Modified Paths:
--------------
trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
trunk/jsptest-acceptance/pom.xml
trunk/jsptest-generic/jsptest-common/pom.xml
trunk/jsptest-generic/jsptest-compiler-api/pom.xml
trunk/jsptest-generic/jsptest-framework/pom.xml
trunk/jsptest-generic/pom.xml
trunk/jsptest-jsp12/pom.xml
trunk/jsptest-jsp20/pom.xml
trunk/jsptest-jsp21/pom.xml
trunk/pom.xml
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp12</artifactId>
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp20</artifactId>
Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-acceptance</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance-jsp21</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
<packaging>jar</packaging>
<name>
Acceptance tests for the JspTest variant for the JSP 2.1
Modified: trunk/jsptest-acceptance/pom.xml
===================================================================
--- trunk/jsptest-acceptance/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-acceptance/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -3,7 +3,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-acceptance</artifactId>
Modified: trunk/jsptest-generic/jsptest-common/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-common/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-generic/jsptest-common/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-common</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Common utilities</name>
<description>
Modified: trunk/jsptest-generic/jsptest-compiler-api/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-compiler-api</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Internal compiler API</name>
<description>
Modified: trunk/jsptest-generic/jsptest-framework/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-framework/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-generic/jsptest-framework/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -2,11 +2,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-generic</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-framework</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Core framework</name>
<description>
@@ -16,12 +16,12 @@
<dependency>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-compiler-api</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest-common</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/jsptest-generic/pom.xml
===================================================================
--- trunk/jsptest-generic/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-generic/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -3,11 +3,11 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-generic</artifactId>
- <version>0.18</version>
+ <version>0.19-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>
Modified: trunk/jsptest-jsp12/pom.xml
===================================================================
--- trunk/jsptest-jsp12/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-jsp12/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp12</artifactId>
Modified: trunk/jsptest-jsp20/pom.xml
===================================================================
--- trunk/jsptest-jsp20/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-jsp20/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp20</artifactId>
Modified: trunk/jsptest-jsp21/pom.xml
===================================================================
--- trunk/jsptest-jsp21/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/jsptest-jsp21/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -2,7 +2,7 @@
<parent>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jsptest-jsp21</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
+++ trunk/pom.xml 2008-11-19 13:06:40 UTC (rev 253)
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.sf.jsptest</groupId>
<artifactId>jsptest</artifactId>
- <version>0.18</version>
+ <version>0.19-SNAPSHOT</version>
<name>JspTest root project</name>
<description>This POM acts as a virtual root for the set of JSP version-specific combinations of the contained subprojects.</description>
<packaging>pom</packaging>
@@ -32,9 +32,9 @@
</repository>
</distributionManagement>
<scm>
- <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.18</connection>
- <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.18</developerConnection>
- <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.18</url>
+ <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.11</connection>
+ <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.11</developerConnection>
+ <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.11</url>
</scm>
<mailingLists />
<developers>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lko...@us...> - 2008-11-19 13:05:23
|
Revision: 252
http://jsptest.svn.sourceforge.net/jsptest/?rev=252&view=rev
Author: lkoskela
Date: 2008-11-19 13:05:17 +0000 (Wed, 19 Nov 2008)
Log Message:
-----------
[maven-release-plugin] copy for tag jsptest-0.18
Added Paths:
-----------
tags/jsptest-0.18/
tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
tags/jsptest-0.18/jsptest-acceptance/pom.xml
tags/jsptest-0.18/jsptest-generic/jsptest-common/pom.xml
tags/jsptest-0.18/jsptest-generic/jsptest-compiler-api/pom.xml
tags/jsptest-0.18/jsptest-generic/jsptest-framework/pom.xml
tags/jsptest-0.18/jsptest-generic/pom.xml
tags/jsptest-0.18/jsptest-jsp12/pom.xml
tags/jsptest-0.18/jsptest-jsp20/pom.xml
tags/jsptest-0.18/jsptest-jsp21/pom.xml
tags/jsptest-0.18/pom.xml
Removed Paths:
-------------
tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
tags/jsptest-0.18/jsptest-acceptance/pom.xml
tags/jsptest-0.18/jsptest-generic/jsptest-common/pom.xml
tags/jsptest-0.18/jsptest-generic/jsptest-compiler-api/pom.xml
tags/jsptest-0.18/jsptest-generic/jsptest-framework/pom.xml
tags/jsptest-0.18/jsptest-generic/pom.xml
tags/jsptest-0.18/jsptest-jsp12/pom.xml
tags/jsptest-0.18/jsptest-jsp20/pom.xml
tags/jsptest-0.18/jsptest-jsp21/pom.xml
tags/jsptest-0.18/pom.xml
Deleted: tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -1,24 +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.18-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.18/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml (from rev 251, trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -0,0 +1,21 @@
+<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.18</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>
\ No newline at end of file
Deleted: tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -1,24 +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.18-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.18/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml (from rev 251, trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -0,0 +1,21 @@
+<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.18</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>
\ No newline at end of file
Deleted: tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml
===================================================================
--- trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -1,25 +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.18-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-acceptance-jsp21</artifactId>
- <version>0.18-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.18/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml (from rev 251, trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -0,0 +1,22 @@
+<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.18</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-acceptance-jsp21</artifactId>
+ <version>0.18</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>
\ No newline at end of file
Deleted: tags/jsptest-0.18/jsptest-acceptance/pom.xml
===================================================================
--- trunk/jsptest-acceptance/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-acceptance/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -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.18-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.18/jsptest-acceptance/pom.xml (from rev 251, trunk/jsptest-acceptance/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-acceptance/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-acceptance/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -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.18</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>
Deleted: tags/jsptest-0.18/jsptest-generic/jsptest-common/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-common/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-generic/jsptest-common/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -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-generic</artifactId>
- <version>0.18-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-common</artifactId>
- <version>0.18-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.18/jsptest-generic/jsptest-common/pom.xml (from rev 251, trunk/jsptest-generic/jsptest-common/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-generic/jsptest-common/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-generic/jsptest-common/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -0,0 +1,38 @@
+<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.18</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-common</artifactId>
+ <version>0.18</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>
\ No newline at end of file
Deleted: tags/jsptest-0.18/jsptest-generic/jsptest-compiler-api/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-generic/jsptest-compiler-api/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -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-generic</artifactId>
- <version>0.18-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-compiler-api</artifactId>
- <version>0.18-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.18/jsptest-generic/jsptest-compiler-api/pom.xml (from rev 251, trunk/jsptest-generic/jsptest-compiler-api/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-generic/jsptest-compiler-api/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-generic/jsptest-compiler-api/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -0,0 +1,16 @@
+<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.18</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-compiler-api</artifactId>
+ <version>0.18</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>
\ No newline at end of file
Deleted: tags/jsptest-0.18/jsptest-generic/jsptest-framework/pom.xml
===================================================================
--- trunk/jsptest-generic/jsptest-framework/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-generic/jsptest-framework/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -1,30 +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.18-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-framework</artifactId>
- <version>0.18-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.18-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-common</artifactId>
- <version>0.18-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project>
Copied: tags/jsptest-0.18/jsptest-generic/jsptest-framework/pom.xml (from rev 251, trunk/jsptest-generic/jsptest-framework/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-generic/jsptest-framework/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-generic/jsptest-framework/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -0,0 +1,27 @@
+<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.18</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-framework</artifactId>
+ <version>0.18</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.18</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-common</artifactId>
+ <version>0.18</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Deleted: tags/jsptest-0.18/jsptest-generic/pom.xml
===================================================================
--- trunk/jsptest-generic/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-generic/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -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.18-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-generic</artifactId>
- <version>0.18-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.18/jsptest-generic/pom.xml (from rev 251, trunk/jsptest-generic/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-generic/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-generic/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -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.18</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-generic</artifactId>
+ <version>0.18</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.18/jsptest-jsp12/pom.xml
===================================================================
--- trunk/jsptest-jsp12/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-jsp12/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -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.18-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>
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- </resources>
- </build>
-</project>
Copied: tags/jsptest-0.18/jsptest-jsp12/pom.xml (from rev 251, trunk/jsptest-jsp12/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-jsp12/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-jsp12/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -0,0 +1,50 @@
+<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.18</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>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ </build>
+</project>
\ No newline at end of file
Deleted: tags/jsptest-0.18/jsptest-jsp20/pom.xml
===================================================================
--- trunk/jsptest-jsp20/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-jsp20/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -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.18-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>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- </resources>
- </build>
-</project>
Copied: tags/jsptest-0.18/jsptest-jsp20/pom.xml (from rev 251, trunk/jsptest-jsp20/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-jsp20/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-jsp20/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -0,0 +1,50 @@
+<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.18</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>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ </build>
+</project>
\ No newline at end of file
Deleted: tags/jsptest-0.18/jsptest-jsp21/pom.xml
===================================================================
--- trunk/jsptest-jsp21/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/jsptest-jsp21/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -1,48 +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.18-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jsptest-jsp21</artifactId>
- <packaging>jar</packaging>
- <name>JspTest for JSP 2.1</name>
- <description>
- JspTest variant suitable for testing JavaServer Pages that
- follow the JSP 2.1 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>org.apache.tomcat</groupId>
- <artifactId>jasper</artifactId>
- <version>6.0.13</version>
- </dependency>
- </dependencies>
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- </resources>
- </build>
-</project>
Copied: tags/jsptest-0.18/jsptest-jsp21/pom.xml (from rev 251, trunk/jsptest-jsp21/pom.xml)
===================================================================
--- tags/jsptest-0.18/jsptest-jsp21/pom.xml (rev 0)
+++ tags/jsptest-0.18/jsptest-jsp21/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -0,0 +1,45 @@
+<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.18</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jsptest-jsp21</artifactId>
+ <packaging>jar</packaging>
+ <name>JspTest for JSP 2.1</name>
+ <description>
+ JspTest variant suitable for testing JavaServer Pages that
+ follow the JSP 2.1 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>org.apache.tomcat</groupId>
+ <artifactId>jasper</artifactId>
+ <version>6.0.13</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ </build>
+</project>
\ No newline at end of file
Deleted: tags/jsptest-0.18/pom.xml
===================================================================
--- trunk/pom.xml 2008-11-09 12:08:04 UTC (rev 249)
+++ tags/jsptest-0.18/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -1,239 +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">
- <modelVersion>4.0.0</modelVersion>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest</artifactId>
- <version>0.18-SNAPSHOT</version>
- <name>JspTest root project</name>
- <description>This POM acts as a virtual root for the set of JSP version-specific combinations of the contained subprojects.</description>
- <packaging>pom</packaging>
- <url>http://jsptest.sourceforge.net</url>
- <inceptionYear>2006</inceptionYear>
- <organization>
- <name>JspTest developers</name>
- <url>http://jsptest.sourceforge.net</url>
- </organization>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <issueManagement>
- <system>sourceforge</system>
- <url>https://sourceforge.net/tracker/?group_id=164388</url>
- </issueManagement>
- <distributionManagement>
- <repository>
- <id>jsptest.sourceforge.net</id>
- <name>JspTest Maven2 repository at SourceForge</name>
- <url>scp://shell.sourceforge.net:/home/groups/j/js/jsptest/htdocs/maven2</url>
- </repository>
- </distributionManagement>
- <scm>
- <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.11</connection>
- <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.11</developerConnection>
- <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.11</url>
- </scm>
- <mailingLists />
- <developers>
- <developer>
- <name>Lasse Koskela</name>
- <id>lkoskela</id>
- <email>lko...@us...</email>
- </developer>
- </developers>
- <modules>
- <module>jsptest-generic</module>
- <module>jsptest-jsp12</module>
- <module>jsptest-jsp20</module>
- <module>jsptest-jsp21</module>
- <module>jsptest-acceptance</module>
- </modules>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>sun.jdk</groupId>
- <artifactId>tools</artifactId>
- <version>1.4</version>
- <scope>system</scope>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- </dependency>
- <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>net.sf.jsptest</groupId>
- <artifactId>jsptest-jsp12</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-jsp20</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-jsp21</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-compiler-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsptest</groupId>
- <artifactId>jsptest-framework</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <build>
- <resources>
- <resource>
- <targetPath>/</targetPath>
- <filtering>false</filtering>
- <directory>${basedir}/src/main/resources</directory>
- </resource>
- </resources>
-<!-- define build plugins to be used (TODO: should this be moved to the jar POMs?) -->
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <fork>true</fork>
- <source>1.4</source>
- <target>1.4</target>
- </configuration>
- </plugin>
- <plugin>
- <inherited>true</inherited>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <minmemory>128m</minmemory>
- <maxmemory>256m</maxmemory>
- </configuration>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <inherited>true</inherited>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <configuration>
- <preparationGoals>clean install</preparationGoals>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/jsp12.xml</descriptor>
- <descriptor>src/main/assembly/jsp20.xml</descriptor>
- <descriptor>src/main/assembly/jsp21.xml</descriptor>
- </descriptors>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <includes>
- <include>**/*Test.java</include>
- <include>**/Test*.java</include>
- </includes>
- <testFailureIgnore>true</testFailureIgnore>
- <forkMode>once</forkMode>
- <useSystemClassLoader>true</useSystemClassLoader>
- <skip>false</skip>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>surefire-report-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.0</version>
- </plugin>
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <reportSets>
- <reportSet>
- <reports>
- <report>dependencies</report>
- <report>project-team</report>
- <report>mailing-list</report>
- <report>issue-tracking</report>
- <report>license</report>
- <report>scm</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>surefire-report-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.0</version>
- </plugin>
- </plugins>
- </reporting>
-</project>
Copied: tags/jsptest-0.18/pom.xml (from rev 251, trunk/pom.xml)
===================================================================
--- tags/jsptest-0.18/pom.xml (rev 0)
+++ tags/jsptest-0.18/pom.xml 2008-11-19 13:05:17 UTC (rev 252)
@@ -0,0 +1,240 @@
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest</artifactId>
+ <version>0.18</version>
+ <name>JspTest root project</name>
+ <description>This POM acts as a virtual root for the set of JSP version-specific combinations of the contained subprojects.</description>
+ <packaging>pom</packaging>
+ <url>http://jsptest.sourceforge.net</url>
+ <inceptionYear>2006</inceptionYear>
+ <organization>
+ <name>JspTest developers</name>
+ <url>http://jsptest.sourceforge.net</url>
+ </organization>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <issueManagement>
+ <system>sourceforge</system>
+ <url>https://sourceforge.net/tracker/?group_id=164388</url>
+ </issueManagement>
+ <distributionManagement>
+ <repository>
+ <id>jsptest.sourceforge.net</id>
+ <name>JspTest Maven2 repository at SourceForge</name>
+ <url>scp://shell.sourceforge.net:/home/groups/j/js/jsptest/htdocs/maven2</url>
+ </repository>
+ </distributionManagement>
+ <scm>
+ <connection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.18</connection>
+ <developerConnection>scm:svn:https://jsptest.svn.sourceforge.net/svnroot/jsptest/tags/jsptest-0.18</developerConnection>
+ <url>http://jsptest.svn.sourceforge.net/viewvc/jsptest/tags/jsptest-0.18</url>
+ </scm>
+ <mailingLists />
+ <developers>
+ <developer>
+ <name>Lasse Koskela</name>
+ <id>lkoskela</id>
+ <email>lko...@us...</email>
+ </developer>
+ </developers>
+ <modules>
+ <module>jsptest-generic</module>
+ <module>jsptest-jsp12</module>
+ <module>jsptest-jsp20</module>
+ <module>jsptest-jsp21</module>
+ <module>jsptest-acceptance</module>
+ </modules>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.4</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ <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>net.sf.jsptest</groupId>
+ <artifactId>jsptest-jsp12</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-jsp20</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-jsp21</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-compiler-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jsptest</groupId>
+ <artifactId>jsptest-framework</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <build>
+ <resources>
+ <resource>
+ <targetPath>/</targetPath>
+ <filtering>false</filtering>
+ <directory>${basedir}/src/main/resources</directory>
+ </resource>
+ </resources>
+<!-- define build plugins to be used (TODO: should this be moved to the jar POMs?) -->
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <fork>true</fork>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <inherited>true</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <minmemory>128m</minmemory>
+ <maxmemory>256m</maxmemory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <inherited>true</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ <preparationGoals>clean install</preparationGoals>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/jsp12.xml</descriptor>
+ <descriptor>src/main/assembly/jsp20.xml</descriptor>
+ <descriptor>src/main/assembly/jsp21.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ <include>**/Test*.java</include>
+ </includes>
+ <testFailureIgnore>true</testFailureIgnore>
+ <forkMode>once</forkMode>
+ <useSystemClassLoader>true</useSystemClassLoader>
+ <skip>false</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>surefire-report-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>dependencies</report>
+ <report>project-team</report>
+ <report>mailing-list</report>
+ <report>issue-tracking</report>
+ <report>license</report>
+ <report>scm</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>surefire-report-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|