Thread: [Jsptest-svn-commits] SF.net SVN: jsptest:[237] trunk
Status: Alpha
Brought to you by:
lkoskela
From: <lko...@us...> - 2008-11-05 22:36:47
|
Revision: 237 http://jsptest.svn.sourceforge.net/jsptest/?rev=237&view=rev Author: lkoskela Date: 2008-11-05 22:36:42 +0000 (Wed, 05 Nov 2008) Log Message: ----------- Added an explicit '<resource/>' reference to 'src/main/resources'. Apparently that is nowadays required by Maven because the acceptance tests started blowing up due to not finding 'jsptest.properties' in the classpath. Modified Paths: -------------- trunk/jsptest-jsp12/pom.xml trunk/jsptest-jsp20/pom.xml trunk/jsptest-jsp21/pom.xml Modified: trunk/jsptest-jsp12/pom.xml =================================================================== --- trunk/jsptest-jsp12/pom.xml 2008-06-27 11:47:44 UTC (rev 236) +++ trunk/jsptest-jsp12/pom.xml 2008-11-05 22:36:42 UTC (rev 237) @@ -38,4 +38,11 @@ <version>4.1.30</version> </dependency> </dependencies> + <build> + <resources> + <resource> + <directory>src/main/resources</directory> + </resource> + </resources> + </build> </project> Modified: trunk/jsptest-jsp20/pom.xml =================================================================== --- trunk/jsptest-jsp20/pom.xml 2008-06-27 11:47:44 UTC (rev 236) +++ trunk/jsptest-jsp20/pom.xml 2008-11-05 22:36:42 UTC (rev 237) @@ -39,15 +39,10 @@ </dependency> </dependencies> <build> - <plugins> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <configuration> - <descriptors> - <descriptor>src/main/assembly/bin.xml</descriptor> - </descriptors> - </configuration> - </plugin> - </plugins> + <resources> + <resource> + <directory>src/main/resources</directory> + </resource> + </resources> </build> </project> Modified: trunk/jsptest-jsp21/pom.xml =================================================================== --- trunk/jsptest-jsp21/pom.xml 2008-06-27 11:47:44 UTC (rev 236) +++ trunk/jsptest-jsp21/pom.xml 2008-11-05 22:36:42 UTC (rev 237) @@ -33,4 +33,11 @@ <version>6.0.13</version> </dependency> </dependencies> + <build> + <resources> + <resource> + <directory>src/main/resources</directory> + </resource> + </resources> + </build> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lko...@us...> - 2008-11-07 20:14:26
|
Revision: 239 http://jsptest.svn.sourceforge.net/jsptest/?rev=239&view=rev Author: lkoskela Date: 2008-11-07 20:14:01 +0000 (Fri, 07 Nov 2008) Log Message: ----------- Applied formatting throughout the codebase with a custom Eclipse formatting config Modified Paths: -------------- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/html/FormAssertionTest.java trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/html/PageAssertionTest.java trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/BasicJspTest.java trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTag.java trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTagTest.java trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibTest.java trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibsDefinedInJarFileTest.java trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java 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/JavaCompiler.java trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/SunJavaC.java trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/CustomClassLoader.java 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/Path.java trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/StreamConsumer.java trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Strings.java trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/XML.java trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/CustomClassLoaderTest.java 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/PathTest.java trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/StreamConsumerTest.java trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/StringsTest.java trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/XMLTest.java 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/JspCompilerFactory.java trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspExecution.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/HtmlTestCase.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/AbstractAssertion.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/DOMAssertion.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/ElementAssertion.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/ElementChooser.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/ExpectedAssertionFailure.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/FormAssertion.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/FormFieldAssertion.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/LinkAssertion.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/NameChooser.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/OutputAssertion.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/assertion/PageAssertion.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/html/Form.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/html/FormField.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/AbstractFakeJspCompilerTestCase.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/AbstractHtmlTestCaseTestCase.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestHtmlTestCase.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestHtmlTestCaseElementAssertions.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestHtmlTestCaseFormAssertions.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestHtmlTestCaseLinkAssertions.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TestHtmlTestCasePageAssertions.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/assertion/TestExpectedAssertionFailure.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java trunk/jsptest-jsp12/src/main/java/net/sf/jsptest/compiler/jsp12/JspCompilerImpl.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspCompilerImpl.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspExecutionImpl.java 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/JspTestServletOutputStream.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 trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpSession.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockJspFactory.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockJspWriter.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockOptions.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockPageContext.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletConfig.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletContext.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletInputStream.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockTagInfo.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ClasspathTldLocator.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ExplodedTldLocator.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/MockTagInfo.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/MockTldLocationsCache.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldLocation.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldLocator.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldUriMappings.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/WebInfLibTldLocator.java trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/TestJspImpl.java trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TestClasspathTldLocator.java trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/html/FormAssertionTest.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/html/FormAssertionTest.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/html/FormAssertionTest.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.acceptance.html; import junit.framework.AssertionFailedError; @@ -42,15 +41,11 @@ 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"); + 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!"); + form("form_name").field("text_field_1").shouldHaveValue("three"); + throw new RuntimeException("The field value shouldn't match!"); } catch (AssertionFailedError expected) { } } Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/html/PageAssertionTest.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/html/PageAssertionTest.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/html/PageAssertionTest.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.acceptance.html; import junit.framework.AssertionFailedError; Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/BasicJspTest.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/BasicJspTest.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/BasicJspTest.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.acceptance.jsp; import junit.framework.AssertionFailedError; @@ -50,8 +49,7 @@ } } - public void testJspFileWithSpecialCharactersInName() - throws Exception { + public void testJspFileWithSpecialCharactersInName() throws Exception { get("/name$_test-file2.jsp"); output().shouldContain("Hello from Jasper"); } @@ -61,8 +59,7 @@ output().shouldContain("Hello from Jasper"); } - public void testJspFileInSubDirectoryWithSpecialCharsInPath() - throws Exception { + public void testJspFileInSubDirectoryWithSpecialCharsInPath() throws Exception { get("/su-b.dir/page_in_sub.dir.jsp"); output().shouldContain("Hello from Jasper"); } Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTag.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTag.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTag.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,12 +13,10 @@ * 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; @@ -48,9 +46,7 @@ try { JspWriter out = pageContext.getOut(); out.println("<pre>"); - out - .println("This content is coming from CustomTag for timezone " - + timezone); + out.println("This content is coming from CustomTag for timezone " + timezone); printRequestMethod(out); printRequestAttributes(out); printSessionAttributes(out); @@ -63,31 +59,25 @@ } private void printRequestMethod(JspWriter out) throws IOException { - out.println("HTTP request method: " - + getRequest().getMethod()); + out.println("HTTP request method: " + getRequest().getMethod()); } - private void printRequestAttributes(JspWriter out) - throws IOException { + 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); + String value = String.valueOf(getRequest().getAttribute(name)); + out.println("HTTP request attribute: " + name + "=" + value); } } - private void printSessionAttributes(JspWriter out) - throws IOException { + 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); + out.println("HTTP session attribute: " + name + "=" + value); } } Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTagTest.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTagTest.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/CustomTagTest.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * 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; @@ -29,8 +28,7 @@ public void testRenderingJspUsingCustomTaglibs() throws Exception { get("/taglibs/custom-taglib.jsp"); - output().shouldContain( - "This content is coming from CustomTag"); + output().shouldContain("This content is coming from CustomTag"); } public void testTaglibAttributes() throws Exception { @@ -59,7 +57,6 @@ 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"); @@ -71,5 +68,4 @@ output().shouldContain("session attribute: Sn1=Sv1"); output().shouldContain("session attribute: Sn2=Sv2"); } - } Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * 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; @@ -43,8 +42,7 @@ output().shouldContain("session attribute: 'Sn2'='Sv2'"); } - public void testRequestAndSessionAttributesCanBeObjects() - throws Exception { + public void testRequestAndSessionAttributesCanBeObjects() throws Exception { setRequestAttribute("request", (Object) "1"); setSessionAttribute("session", (Object) new Integer(2)); get("/echo_attributes.jsp"); @@ -52,8 +50,7 @@ output().shouldContain("session attribute: 'session'='2'"); } - public void testSessionAndRequestAttributesDontOverrideEachOther() - throws Exception { + public void testSessionAndRequestAttributesDontOverrideEachOther() throws Exception { setRequestAttribute("name", "request"); setSessionAttribute("name", "session"); get("/echo_attributes.jsp"); Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibTest.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibTest.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibTest.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * 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; Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibsDefinedInJarFileTest.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibsDefinedInJarFileTest.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TaglibsDefinedInJarFileTest.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * 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; Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,13 +13,11 @@ * 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; /** @@ -27,36 +25,36 @@ */ public class TestMockingTaglibs extends JspTestCase { - protected String getJspPackageName() { - return "cust.om.tags"; - } + protected String getJspPackageName() { + return "cust.om.tags"; + } - protected String getWebRoot() { - return "src/test/resources/websrc"; - } + 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; - } - } + /** + * This taglib class gets to replace the real thing. + */ + public static class MockCustomTag extends CustomTag { - public void testRenderingJspUsingCustomTaglibs() throws Exception { - substituteTaglib("custom", MockCustomTag.class); - get("/taglibs/custom-taglib.jsp"); - output() - .shouldContain("This content is coming from the mock 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"); + } } Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.compiler; import java.io.File; @@ -21,31 +20,22 @@ import java.util.Map; /** - * The <tt>JspCompilationInfo</tt> class acts as a simple data struct, being - * passed around as a blackboard of sorts where different compilation methods - * obtain prerequisite information (where to find input) and add newly created - * information (where the output went). + * The <tt>JspCompilationInfo</tt> class acts as a simple data struct, being passed around as a + * blackboard of sorts where different compilation methods obtain prerequisite information (where to + * find input) and add newly created information (where the output went). * * @author Lasse Koskela */ public class JspCompilationInfo { private String classFileLocation; - private String jspSourceLocation; - private String jspClassName; - private String javaSourceLocation; - private String jspPath; - private String classOutputDir; - private String webRoot; - private Map taglibs; - private static Map compilationHistory = new HashMap(); public JspCompilationInfo() { @@ -132,8 +122,7 @@ File jsp = new File(jspSourceLocation); File java = new File(javaSourceLocation); File clazz = new File(classFileLocation); - return (doesNotExistOrIsTooOld(clazz) - || doesNotExistOrIsTooOld(java) + return (doesNotExistOrIsTooOld(clazz) || doesNotExistOrIsTooOld(java) || jsp.lastModified() > java.lastModified() || taglibsHaveChangedSinceLastCompile()); } @@ -153,10 +142,8 @@ private boolean doesNotExistOrIsTooOld(File file) { long expirationAge = 5 * 60 * 1000L; - long expirationThreshold = System.currentTimeMillis() - - expirationAge; - return file.exists() == false - || file.lastModified() < expirationThreshold; + long expirationThreshold = System.currentTimeMillis() - expirationAge; + return file.exists() == false || file.lastModified() < expirationThreshold; } public void setTaglibs(Map taglibs) { 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 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/CommandLineJavac.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,14 +13,12 @@ * 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; /** @@ -28,73 +26,68 @@ */ public class CommandLineJavac implements JavaCompiler { - private static final String SEPARATOR = System - .getProperty("path.separator"); + 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); - } + 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[] 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 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 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(); - } - } + 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; - } - } + 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; + } + } } Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/JavaCompiler.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/JavaCompiler.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/JavaCompiler.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.compiler.java; /** @@ -23,25 +22,22 @@ */ public interface JavaCompiler { - /** - * Compiles the given .java source file into the given .class file using an - * explicitly set class path. - * - * @param pathToJavaSource - * Path to the source file to compile. - * @param outputDirectory - * Path to the output directory under which to generate the - * .class file - * @param classpath - * The class path to use for compilation. - */ - boolean compile(String pathToJavaSource, String outputDirectory, - String[] classpath) throws Exception; + /** + * Compiles the given .java source file into the given .class file using an explicitly set class + * path. + * + * @param pathToJavaSource + * Path to the source file to compile. + * @param outputDirectory + * Path to the output directory under which to generate the .class file + * @param classpath + * The class path to use for compilation. + */ + boolean compile(String pathToJavaSource, String outputDirectory, String[] classpath) + throws Exception; - /** - * Indicates whether this Java compiler implementation is available on the - * current system. - */ - boolean isAvailable(); - -} \ No newline at end of file + /** + * Indicates whether this Java compiler implementation is available on the current system. + */ + boolean isAvailable(); +} Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/SunJavaC.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/SunJavaC.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/SunJavaC.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,81 +13,73 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.compiler.java; import java.lang.reflect.Method; /** - * This implementation uses the java compiler from sun which ships with since - * the jdk since java 1.3. The code is inspired by the javac ant task - * implementation. + * This implementation uses the java compiler from sun which ships with since the jdk since java + * 1.3. The code is inspired by the javac ant task implementation. * * @author mathias.broekelmann - * */ public class SunJavaC implements JavaCompiler { - private static final String SEPARATOR = System - .getProperty("path.separator"); + private static final String SEPARATOR = System.getProperty("path.separator"); - public boolean compile(String pathToJavaSource, String outputDirectory, - String[] classpath) throws Exception { - String classpathString = join(classpath); - String[] args = buildArgs(pathToJavaSource, outputDirectory, - classpathString); - return compile(args); - } + public boolean compile(String pathToJavaSource, String outputDirectory, String[] classpath) + throws Exception { + String classpathString = join(classpath); + String[] args = buildArgs(pathToJavaSource, outputDirectory, classpathString); + return compile(args); + } - private boolean compile(String[] args) { - try { - Class compilerClass = getCompileClass(); - Method compilerMethod = resolveCompilerMethod(compilerClass); - Object compilerInstance = compilerClass.newInstance(); - Object[] compilerArguments = new Object[] { args }; - int returnCode = ((Integer) compilerMethod.invoke(compilerInstance, - compilerArguments)).intValue(); - return returnCode == 0; - } catch (Throwable e) { - System.err.println(e.getMessage()); - return false; - } - } + private boolean compile(String[] args) { + try { + Class compilerClass = getCompileClass(); + Method compilerMethod = resolveCompilerMethod(compilerClass); + Object compilerInstance = compilerClass.newInstance(); + Object[] compilerArguments = new Object[] { args }; + int returnCode = ((Integer) compilerMethod.invoke(compilerInstance, compilerArguments)) + .intValue(); + return returnCode == 0; + } catch (Throwable e) { + System.err.println(e.getMessage()); + return false; + } + } - private String[] buildArgs(String pathToJavaSource, String outputDirectory, - String classpathString) { - return new String[] { "-classpath", classpathString, "-d", - outputDirectory, pathToJavaSource }; - } + private String[] buildArgs(String pathToJavaSource, String outputDirectory, + String classpathString) { + return new String[] { "-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 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(); + } - public boolean isAvailable() { - try { - resolveCompilerMethod(getCompileClass()); - return true; - } catch (Throwable ex) { - return false; - } - } + public boolean isAvailable() { + try { + resolveCompilerMethod(getCompileClass()); + return true; + } catch (Throwable ex) { + return false; + } + } - private Method resolveCompilerMethod(Class compilerClass) - throws NoSuchMethodException { - return compilerClass.getMethod("compile", new Class[] { (new String[0]) - .getClass() }); - } + private Method resolveCompilerMethod(Class compilerClass) throws NoSuchMethodException { + return compilerClass.getMethod("compile", new Class[] { (new String[0]).getClass() }); + } - private Class getCompileClass() throws ClassNotFoundException { - return Class.forName("com.sun.tools.javac.Main"); - } - + private Class getCompileClass() throws ClassNotFoundException { + return Class.forName("com.sun.tools.javac.Main"); + } } Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/CustomClassLoader.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/CustomClassLoader.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/CustomClassLoader.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,45 +13,42 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.utils; import java.io.File; /** - * A class loader implementation that first checks if the class asked for can be - * found under the given base directory and only then delegates to the parent - * class' implementation. + * A class loader implementation that first checks if the class asked for can be found under the + * given base directory and only then delegates to the parent class' implementation. * * @author Lasse Koskela */ public class CustomClassLoader extends ClassLoader { - private File baseDir; + private File baseDir; - public CustomClassLoader(String baseDir) { - this(new File(baseDir)); - } + public CustomClassLoader(String baseDir) { + this(new File(baseDir)); + } - public CustomClassLoader(File baseDir) { - this.baseDir = baseDir; - } + public CustomClassLoader(File baseDir) { + this.baseDir = baseDir; + } - public Class loadClass(String name) throws ClassNotFoundException { - File classFile = new File(baseDir, name.replace('.', '/') + ".class"); - if (!classFile.exists()) { - return super.loadClass(name); - } - try { - byte[] data = IO.readToByteArray(classFile); - return defineClass(name, data); - } catch (Exception e) { - throw new RuntimeException(e); - } - } + public Class loadClass(String name) throws ClassNotFoundException { + File classFile = new File(baseDir, name.replace('.', '/') + ".class"); + if (!classFile.exists()) { + return super.loadClass(name); + } + try { + byte[] data = IO.readToByteArray(classFile); + return defineClass(name, data); + } catch (Exception e) { + throw new RuntimeException(e); + } + } - protected Class defineClass(String name, byte[] data) - throws ClassFormatError { - return super.defineClass(name, data, 0, data.length); - } -} \ No newline at end of file + protected Class defineClass(String name, byte[] data) throws ClassFormatError { + return super.defineClass(name, data, 0, data.length); + } +} 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-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/IO.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.utils; import java.io.ByteArrayOutputStream; @@ -24,20 +23,18 @@ 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 { + public static byte[] readToByteArray(File file) throws IOException { return readToByteArray(new FileInputStream(file)); } - public static byte[] readToByteArray(InputStream in) - throws IOException { + public static byte[] readToByteArray(InputStream in) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buffer = new byte[8096]; int r = -1; @@ -58,9 +55,7 @@ return new String(readToByteArray(file)); } - public static String readToString(InputStream stream) - throws IOException { + public static String readToString(InputStream stream) throws IOException { return new String(readToByteArray(stream)); } - } Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.utils; import java.io.File; @@ -27,75 +26,74 @@ */ public class Path extends ArrayList { - private static final String SEPARATOR = System - .getProperty("path.separator"); + private static final String SEPARATOR = System.getProperty("path.separator"); - public void addSystemProperty(String name) { - String property = System.getProperty(name); - if (property != null) { - String[] systemClasspath = property.split(SEPARATOR); - for (int i = 0; i < systemClasspath.length; i++) { - String entry = systemClasspath[i]; - File file = new File(entry); - if (file.exists()) { - add(file.getAbsolutePath()); - } else { - add(entry); - } - } - } - } + public void addSystemProperty(String name) { + String property = System.getProperty(name); + if (property != null) { + String[] systemClasspath = property.split(SEPARATOR); + for (int i = 0; i < systemClasspath.length; i++) { + String entry = systemClasspath[i]; + File file = new File(entry); + if (file.exists()) { + add(file.getAbsolutePath()); + } else { + add(entry); + } + } + } + } - public boolean add(Object pathElement) { - if (contains(pathElement)) { - return false; - } - return super.add(pathElement); - } + public boolean add(Object pathElement) { + if (contains(pathElement)) { + return false; + } + return super.add(pathElement); + } - public boolean add(File file) { - return add(file.getAbsolutePath()); - } + public boolean add(File file) { + return add(file.getAbsolutePath()); + } - public String[] toStringArray() { - return (String[]) toArray(new String[size()]); - } + public String[] toStringArray() { + return (String[]) toArray(new String[size()]); + } - public void addContainer(Class klass) { - String resource = resourcePathFor(klass); - addJarFile(klass.getResource(resource)); - try { - ClassLoader context = klass.getClassLoader(); - if (context != null) { - Enumeration en = context.getResources(resource); - while (en.hasMoreElements()) { - addJarFile((URL) en.nextElement()); - } - } - } catch (IOException e) { - e.printStackTrace(); - } - } + public void addContainer(Class klass) { + String resource = resourcePathFor(klass); + addJarFile(klass.getResource(resource)); + try { + ClassLoader context = klass.getClassLoader(); + if (context != null) { + Enumeration en = context.getResources(resource); + while (en.hasMoreElements()) { + addJarFile((URL) en.nextElement()); + } + } + } catch (IOException e) { + e.printStackTrace(); + } + } - private String resourcePathFor(Class klass) { - String resource = klass.getName().replaceAll("\\.", "/"); - return "/" + resource + ".class"; - } + private String resourcePathFor(Class klass) { + String resource = klass.getName().replaceAll("\\.", "/"); + return "/" + resource + ".class"; + } - private void addJarFile(URL url) { - if (url != null) { - addJarFile(url.toExternalForm()); - } - } + private void addJarFile(URL url) { + if (url != null) { + addJarFile(url.toExternalForm()); + } + } - private void addJarFile(String url) { - String prefix = "jar:file:"; - if (url.startsWith(prefix)) { - String file = url.substring(prefix.length()); - if (file.indexOf("!") > -1) { - file = file.substring(0, file.indexOf('!')); - } - add(new File(file)); - } - } + private void addJarFile(String url) { + String prefix = "jar:file:"; + if (url.startsWith(prefix)) { + String file = url.substring(prefix.length()); + if (file.indexOf("!") > -1) { + file = file.substring(0, file.indexOf('!')); + } + add(new File(file)); + } + } } Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/StreamConsumer.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/StreamConsumer.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/StreamConsumer.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.utils; import java.io.ByteArrayOutputStream; @@ -27,13 +26,10 @@ public class StreamConsumer implements Runnable { private final String outputPrefix; - private final InputStream stream; - private final PrintWriter log; - public StreamConsumer(String streamName, InputStream stream, - PrintWriter log) { + public StreamConsumer(String streamName, InputStream stream, PrintWriter log) { this.outputPrefix = streamName + ":"; this.stream = stream; this.log = log; Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Strings.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Strings.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Strings.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,41 +13,37 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package net.sf.jsptest.utils; /** - * The <tt>Strings</tt> class provides utility methods for string - * manipulation. + * The <tt>Strings</tt> class provides utility methods for string manipulation. * * @author Lasse Koskela */ public class Strings { - /** - * Replace instances of "what" from "fromWhere" with "withWhat". This is - * essentially a replacement for not being able to use - * {@link String#replace(String, String, String)} with JDK 1.4. - * - * @param fromWhere - * The string to replace stuff from. - * @param what - * The string to replace. - * @param withWhat - * The string to replace with. - * @return A new string with the replaced content. - */ - public static String replace(String fromWhere, String what, String withWhat) { - if (what.length() > 0) { - int indexOfWhat = fromWhere.indexOf(what); - if (indexOfWhat != -1) { - String beforeMatch = fromWhere.substring(0, indexOfWhat); - String afterMatch = fromWhere.substring(indexOfWhat - + what.length()); - fromWhere = beforeMatch + withWhat - + replace(afterMatch, what, withWhat); - } - } - return fromWhere; - } + /** + * Replace instances of "what" from "fromWhere" with "withWhat". This is essentially a + * replacement for not being able to use {@link String#replace(String, String, String)} with JDK + * 1.4. + * + * @param fromWhere + * The string to replace stuff from. + * @param what + * The string to replace. + * @param withWhat + * The string to replace with. + * @return A new string with the replaced content. + */ + public static String replace(String fromWhere, String what, String withWhat) { + if (what.length() > 0) { + int indexOfWhat = fromWhere.indexOf(what); + if (indexOfWhat != -1) { + String beforeMatch = fromWhere.substring(0, indexOfWhat); + String afterMatch = fromWhere.substring(indexOfWhat + what.length()); + fromWhere = beforeMatch + withWhat + replace(afterMatch, what, withWhat); + } + } + return fromWhere; + } } Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/XML.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/XML.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/XML.java 2008-11-07 20:14:01 UTC (rev 239) @@ -13,61 +13,57 @@ * 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.OutputStream; - import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; - import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** - * The <tt>XML</tt> class provides utility methods for handling XML related - * tasks. + * The <tt>XML</tt> class provides utility methods for handling XML related tasks. * * @author Lasse Koskela */ public class XML { - private static final String APACHE_INDENTATION = "{http://xml.apache.org/xslt}indent-amount"; + private static final String APACHE_INDENTATION = "{http://xml.apache.org/xslt}indent-amount"; - public static String toString(Node xml) { - try { - TransformerFactory f = TransformerFactory.newInstance(); - Transformer t = f.newTransformer(); - t.setOutputProperty(OutputKeys.INDENT, "yes"); - t.setOutputProperty(APACHE_INDENTATION, "2"); - OutputStream out = new ByteArrayOutputStream(); - t.transform(new DOMSource(xml), new StreamResult(out)); - return out.toString(); - } catch (TransformerException e) { - throw new RuntimeException(e); - } - } + public static String toString(Node xml) { + try { + TransformerFactory f = TransformerFactory.newInstance(); + Transformer t = f.newTransformer(); + t.setOutputProperty(OutputKeys.INDENT, "yes"); + t.setOutputProperty(APACHE_INDENTATION, "2"); + OutputStream out = new ByteArrayOutputStream(); + t.transform(new DOMSource(xml), new StreamResult(out)); + return out.toString(); + } catch (TransformerException e) { + throw new RuntimeException(e); + } + } - public static String textContentOf(Element element) { - StringBuffer textContent = new StringBuffer(100); - NodeList children = element.getChildNodes(); - for (int i = 0; i < children.getLength(); i++) { - appendTextContentOf(children.item(i), textContent); - } - return textContent.toString(); - } + public static String textContentOf(Element element) { + StringBuffer textContent = new StringBuffer(100); + NodeList children = element.getChildNodes(); + for (int i = 0; i < children.getLength(); i++) { + appendTextContentOf(children.item(i), textContent); + } + return textContent.toString(); + } - private static void appendTextContentOf(Node from, StringBuffer to) { - if (from.getNodeType() == Node.ELEMENT_NODE) { - to.append(textContentOf((Element) from)); - } else if (from.getNodeType() != Node.COMMENT_NODE) { - to.append(from.getNodeValue().trim()); - } - } + private static void appendTextContentOf(Node from, StringBuffer to) { + if (from.getNodeType() == Node.ELEMENT_NODE) { + to.append(textContentOf((Element) from)); + } else if (from.getNodeType() != Node.COMMENT_NODE) { + to.append(from.getNodeValue().trim()); + } + } } Modified: trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/CustomClassLoaderTest.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/CustomClassLoaderTest.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/CustomClassLoaderTest.java 2008-11-07 20:14:01 UTC (rev 239) @@ -1,60 +1,54 @@ package net.sf.jsptest.utils; import java.io.File; - import junit.framework.TestCase; public class CustomClassLoaderTest extends TestCase { - private File baseDir; - protected String definedName; - protected byte[] definedData; - private String fullyQualifiedClassName; + private File baseDir; + protected String definedName; + protected byte[] definedData; + private String fullyQualifiedClassName; - protected void setUp() throws Exception { - super.setUp(); - fullyQualifiedClassName = "pkg.Fake"; - baseDir = new File(System.getProperty("java.io.tmpdir"), "basedir"); - File packageDir = new File(baseDir, "pkg"); - packageDir.mkdirs(); - File classFile = new File(packageDir, "Fake.class"); - IO.write("Fake", classFile); - } + protected void setUp() throws Exception { + super.setUp(); + fullyQualifiedClassName = "pkg.Fake"; + baseDir = new File(System.getProperty("java.io.tmpdir"), "basedir"); + File packageDir = new File(baseDir, "pkg"); + packageDir.mkdirs(); + File classFile = new File(packageDir, "Fake.class"); + IO.write("Fake", classFile); + } - public void testClassesAreLoadedFromTheGivenBaseDirectory() - throws Exception { - CustomClassLoader cl = new CustomClassLoader(baseDir) { - // override to avoid actual class loading - protected Class defineClass(String name, byte[] data) - throws ClassFormatError { - definedName = name; - definedData = data; - return CustomClassLoaderTest.class; - } - }; + public void testClassesAreLoadedFromTheGivenBaseDirectory() throws Exception { + CustomClassLoader cl = new CustomClassLoader(baseDir) { - verifyClassLoading(cl); - } + // override to avoid actual class loading + protected Class defineClass(String name, byte[] data) throws ClassFormatError { + definedName = name; + definedData = data; + return CustomClassLoaderTest.class; + } + }; + verifyClassLoading(cl); + } - public void testBaseDirectoryCanBeGivenAsAbsolutePathName() - throws Exception { - CustomClassLoader cl = new CustomClassLoader(baseDir.getAbsolutePath()) { - // override to avoid actual class loading - protected Class defineClass(String name, byte[] data) - throws ClassFormatError { - definedName = name; - definedData = data; - return CustomClassLoaderTest.class; - } - }; + public void testBaseDirectoryCanBeGivenAsAbsolutePathName() throws Exception { + CustomClassLoader cl = new CustomClassLoader(baseDir.getAbsolutePath()) { - verifyClassLoading(cl); - } + // override to avoid actual class loading + protected Class defineClass(String name, byte[] data) throws ClassFormatError { + definedName = name; + definedData = data; + return CustomClassLoaderTest.class; + } + }; + verifyClassLoading(cl); + } - private void verifyClassLoading(CustomClassLoader classLoader) - throws ClassNotFoundException { - classLoader.loadClass(fullyQualifiedClassName); - assertEquals(fullyQualifiedClassName, definedName); - assertEquals("Fake", new String(definedData)); - } + private void verifyClassLoading(CustomClassLoader classLoader) throws ClassNotFoundException { + classLoader.loadClass(fullyQualifiedClassName); + assertEquals(fullyQualifiedClassName, definedName); + assertEquals("Fake", new String(definedData)); + } } 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-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java 2008-11-07 20:14:01 UTC (rev 239) @@ -1,7 +1,6 @@ package net.sf.jsptest.utils; import java.io.File; - import junit.framework.TestCase; public class IOTest extends TestCase { Modified: trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/PathTest.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/PathTest.java 2008-11-07 19:06:40 UTC (rev 238) +++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/PathTest.java 2008-11-07 20:14:01 UTC (rev 239) @@ -4,77 +4,75 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import junit.framework.TestCase; public class PathTest extends TestCase { - private Path path; - private File file1; - private File file2; + private Path path; + private File file1; + private File file2; - protected void setUp() throws Exception { - super.setUp(); - path = new Path(); - file1 = File.createTempFile("test", ".tmp"); - file2 = File.createTempFile("test", ".tmp"); - } + protected void setUp() throws Exception { + super.setUp(); + path = new Path(); + file1 = File.createTempFile("test", ".tmp"); + file2 = File.createTempFile("test", ".tmp"); + } - protected void tearDown() throws Exception ... [truncated message content] |
From: <lko...@us...> - 2008-11-07 22:21:37
|
Revision: 242 http://jsptest.svn.sourceforge.net/jsptest/?rev=242&view=rev Author: lkoskela Date: 2008-11-07 22:21:33 +0000 (Fri, 07 Nov 2008) Log Message: ----------- Implemented a patch from Meinert Schwartau with minor modifications. JspTest now has the ability to stub/mock/fake individual tags, not just whole tag libraries. Modified Paths: -------------- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspCompiler.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-jsp12/src/main/java/net/sf/jsptest/compiler/jsp12/JspCompilerImpl.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspCompilerImpl.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockOptions.java trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java Added Paths: ----------- trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TagKeyTest.java Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/TestMockingTaglibs.java 2008-11-07 22:21:33 UTC (rev 242) @@ -22,6 +22,7 @@ /** * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) */ public class TestMockingTaglibs extends JspTestCase { @@ -34,7 +35,7 @@ } /** - * This taglib class gets to replace the real thing. + * This taglib class gets to replace the real thing (<c:_/>). */ public static class MockCustomTag extends CustomTag { @@ -52,9 +53,39 @@ } } - public void testRenderingJspUsingCustomTaglibs() throws Exception { + /** + * This taglib class gets to replace the real thing (<c:out/>). + */ + public static class MockCustomOutTag extends CustomTag { + + public void setValue(String value) { + } + + public int doStartTag() throws JspException { + try { + JspWriter out = pageContext.getOut(); + out.print("replaced"); + } catch (Exception e) { + throw new JspException(e); + } + return TagSupport.SKIP_BODY; + } + + public int doEndTag() throws JspException { + return TagSupport.EVAL_PAGE; + } + } + + public void testSubstitutingCustomTaglibs() throws Exception { substituteTaglib("custom", MockCustomTag.class); get("/taglibs/custom-taglib.jsp"); output().shouldContain("This content is coming from the mock CustomTag"); } + + public void testSubstitutingSpecificTagWithinTagLibrary() throws Exception { + substituteTag("c", "out", MockCustomOutTag.class); + get("/taglibs/standard-taglibs.jsp"); + output().shouldNotContain("loop-1"); + output().shouldContain("replaced-replaced"); + } } Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java 2008-11-07 22:21:33 UTC (rev 242) @@ -25,6 +25,7 @@ * find input) and add newly created information (where the output went). * * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) */ public class JspCompilationInfo { @@ -36,10 +37,12 @@ private String classOutputDir; private String webRoot; private Map taglibs; + private Map tags; private static Map compilationHistory = new HashMap(); public JspCompilationInfo() { this.taglibs = new HashMap(); + this.tags = new HashMap(); } private String absolute(String path) { @@ -116,6 +119,26 @@ this.webRoot = webRoot; } + public Map getTaglibs() { + return taglibs; + } + + public void setTaglibs(Map taglibs) { + this.taglibs = new HashMap(taglibs); + } + + public Map getTags() { + return tags; + } + + public void setTags(Map tags) { + this.tags = new HashMap(tags); + } + + public synchronized void compilationWasSuccessful() { + compilationHistory.put(jspSourceLocation, new LastCompile(taglibs, tags)); + } + public synchronized boolean jspCompilationRequired() { // TODO: only avoid compilation if there is a matching MD5 for the .jsp // file in a cache or if the file is missing altogether. @@ -123,21 +146,23 @@ File java = new File(javaSourceLocation); File clazz = new File(classFileLocation); return (doesNotExistOrIsTooOld(clazz) || doesNotExistOrIsTooOld(java) - || jsp.lastModified() > java.lastModified() || taglibsHaveChangedSinceLastCompile()); + || jsp.lastModified() > java.lastModified() || taglibsHaveChangedSinceLastCompile() || tagsHaveChangedSinceLastCompile()); } private boolean taglibsHaveChangedSinceLastCompile() { - Map taglibs = (Map) compilationHistory.get(getJspSource()); - if (taglibs == null) { - // first compilation -> must compile + LastCompile lastCompile = (LastCompile) compilationHistory.get(getJspSource()); + if (lastCompile == null) { return true; } - if (!taglibs.equals(getTaglibs())) { - // not the first compilation but taglibs were configured differently - // for the previous compilation so we need a new one + return !lastCompile.getTaglibs().equals(getTaglibs()); + } + + private boolean tagsHaveChangedSinceLastCompile() { + LastCompile lastCompile = (LastCompile) compilationHistory.get(getJspSource()); + if (lastCompile == null) { return true; } - return false; + return !lastCompile.getTags().equals(getTags()); } private boolean doesNotExistOrIsTooOld(File file) { @@ -146,15 +171,27 @@ return file.exists() == false || file.lastModified() < expirationThreshold; } - public void setTaglibs(Map taglibs) { - this.taglibs = new HashMap(taglibs); - } + /** + * Represents the tag configuration of a prior compilation. + * + * @author Meinert Schwartau (scwar32) + */ + private static final class LastCompile { - public Map getTaglibs() { - return taglibs; - } + private final Map taglibs; + private final Map tags; - public synchronized void compilationWasSuccessful() { - compilationHistory.put(jspSourceLocation, taglibs); + public LastCompile(Map taglibs, Map tags) { + this.taglibs = taglibs; + this.tags = tags; + } + + public Map getTags() { + return tags; + } + + public Map getTaglibs() { + return taglibs; + } } } Modified: trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspCompiler.java =================================================================== --- trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspCompiler.java 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspCompiler.java 2008-11-07 22:21:33 UTC (rev 242) @@ -2,9 +2,13 @@ import java.util.Map; +/** + * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) + */ public interface JspCompiler { - Jsp compile(String path, Map taglibs); + Jsp compile(String path, Map taglibs, Map tags); void setWebRoot(String directory); 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 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java 2008-11-07 22:21:33 UTC (rev 242) @@ -32,6 +32,7 @@ * renders the expected kind of output. * * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) */ public abstract class JspTestCase extends TestCase { @@ -39,6 +40,7 @@ private Map requestAttributes; private Map sessionAttributes; private Map substituteTaglibs; + private Map substituteTags; private JspExecution execution; public JspTestCase() { @@ -53,6 +55,7 @@ requestAttributes = new HashMap(); sessionAttributes = new HashMap(); substituteTaglibs = new HashMap(); + substituteTags = new HashMap(); } /** @@ -124,7 +127,7 @@ + new File(getWebRoot()).getAbsolutePath()); compiler.setWebRoot(getWebRoot()); compiler.setOutputDirectory(getOutputDirectory()); - Jsp jsp = compiler.compile(path, substituteTaglibs); + Jsp jsp = compiler.compile(path, substituteTaglibs, substituteTags); log.debug("Simulating a request to " + path); execution = jsp.request(httpMethod, requestAttributes, sessionAttributes); } @@ -164,4 +167,16 @@ protected void substituteTaglib(String name, Class newImplementation) { substituteTaglibs.put(name, newImplementation); } + + /** + * Invoke this method to substitute the specified taglib with the given implementation. + * + * @param name + * The name of the taglib to replace. + * @param newImplementation + * The new (substitute) implementation to use. + */ + protected void substituteTag(String prefix, String name, Class newImplementation) { + substituteTags.put(new TagKey(prefix, name), newImplementation); + } } Added: trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java =================================================================== --- trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java (rev 0) +++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java 2008-11-07 22:21:33 UTC (rev 242) @@ -0,0 +1,55 @@ +package net.sf.jsptest; + +/** + * @author Meinert Schwartau (scwar32) + */ +public class TagKey { + + private final String prefix; + private final String name; + + public TagKey(String prefix, String name) { + this.prefix = prefix; + this.name = name; + } + + public String toString() { + return prefix + ":" + name; + } + + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((prefix == null) ? 0 : prefix.hashCode()); + return result; + } + + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final TagKey other = (TagKey) obj; + if (name == null) { + if (other.name != null) { + return false; + } + } else if (!name.equals(other.name)) { + return false; + } + if (prefix == null) { + if (other.prefix != null) { + return false; + } + } else if (!prefix.equals(other.prefix)) { + return false; + } + return true; + } +} Added: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TagKeyTest.java =================================================================== --- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TagKeyTest.java (rev 0) +++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TagKeyTest.java 2008-11-07 22:21:33 UTC (rev 242) @@ -0,0 +1,29 @@ +package net.sf.jsptest; + +import junit.framework.TestCase; + +/** + * @author Lasse Koskela + */ +public class TagKeyTest extends TestCase { + + public void testEqualsAndHashcode() throws Exception { + // TODO: add EqualsTester to the class path and use that + TagKey subject = new TagKey("prefix", "name"); + TagKey samePrefixSameName = new TagKey("prefix", "name"); + TagKey samePrefixDifferentName = new TagKey("prefix", "different"); + TagKey differentPrefixDifferentName = new TagKey("different", "different"); + TagKey differentPrefixSameName = new TagKey("different", "different"); + assertTrue(subject.equals(subject)); + assertEquals(subject.hashCode(), subject.hashCode()); + assertTrue(subject.equals(samePrefixSameName)); + assertEquals(subject.hashCode(), samePrefixSameName.hashCode()); + assertFalse(subject.equals(samePrefixDifferentName)); + assertFalse(subject.equals(differentPrefixSameName)); + assertFalse(subject.equals(differentPrefixDifferentName)); + } + + public void testToStringPrettyPrints() throws Exception { + assertEquals("prefix:name", new TagKey("prefix", "name").toString()); + } +} 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 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java 2008-11-07 22:21:33 UTC (rev 242) @@ -5,6 +5,10 @@ import net.sf.jsptest.compiler.api.JspCompiler; import net.sf.jsptest.compiler.api.JspExecution; +/** + * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) + */ public class FakeJspCompiler implements JspCompiler { private static StringBuffer fakedOutput = new StringBuffer(2000); @@ -28,7 +32,7 @@ fakedOutput.append(content); } - public Jsp compile(String path, Map taglibs) { + public Jsp compile(String path, Map taglibs, Map tags) { lastCompiledWebRoot = getWebRoot(); lastCompiledPath = path; return new Jsp() { Modified: trunk/jsptest-jsp12/src/main/java/net/sf/jsptest/compiler/jsp12/JspCompilerImpl.java =================================================================== --- trunk/jsptest-jsp12/src/main/java/net/sf/jsptest/compiler/jsp12/JspCompilerImpl.java 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-jsp12/src/main/java/net/sf/jsptest/compiler/jsp12/JspCompilerImpl.java 2008-11-07 22:21:33 UTC (rev 242) @@ -4,9 +4,13 @@ import net.sf.jsptest.compiler.api.Jsp; import net.sf.jsptest.compiler.api.JspCompiler; +/** + * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) + */ public class JspCompilerImpl implements JspCompiler { - public Jsp compile(String path, Map taglibs) { + public Jsp compile(String path, Map taglibs, Map tags) { throw new RuntimeException("Not implemented"); } 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 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java 2008-11-07 22:21:33 UTC (rev 242) @@ -70,6 +70,7 @@ * "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 { @@ -105,10 +106,12 @@ * @param path * The path to the JSP source file to compile, given relative to the web root. * @param mockTaglibs - * Mapping of tagnames to tag handler classes + * Mapping of tag names to tag handler classes + * @param mockTags + * Mapping of <tt>TagKey</tt>s to tag handler classes */ - public JspCompilationInfo compile(String path, Map mockTaglibs) throws Exception { - JspCompilationInfo info = createJspCompilationInfo(path, mockTaglibs); + public JspCompilationInfo compile(String path, Map mockTaglibs, Map mockTags) throws Exception { + JspCompilationInfo info = createJspCompilationInfo(path, mockTaglibs, mockTags); if (info.jspCompilationRequired()) { compileJsp(info); compileJavaToBytecode(info); @@ -136,13 +139,14 @@ } } - private JspCompilationInfo createJspCompilationInfo(String jsp, Map mockTaglibs) { + private JspCompilationInfo createJspCompilationInfo(String jsp, Map mockTaglibs, Map mockTags) { JspCompilationInfo info = new JspCompilationInfo(); info.setJspPath(jsp); info.setClassOutputDir(classOutputBaseDir); info.setJspSource(resolveJspSourceFile(jsp)); info.setWebRoot(getWebRoot()); info.setTaglibs(mockTaglibs); + info.setTags(mockTags); resolveJavaSourceFile(info); resolveClassFileLocation(info); resolveClassName(info); @@ -232,7 +236,7 @@ private Options createOptions(ServletContext ctx, ServletConfig cfg, JspCompilationInfo info) { Options options = new EmbeddedServletOptions(cfg, ctx); - return new MockOptions(options, ctx, info.getTaglibs()); + return new MockOptions(options, ctx, info); } private void resolveJavaSourceFile(JspCompilationInfo info) { Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java 2008-11-07 22:21:33 UTC (rev 242) @@ -50,6 +50,7 @@ * system. * * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) */ public abstract class JasperExecution extends TestCase { @@ -184,10 +185,15 @@ } private Class compileToClass(String path) throws Exception, ClassNotFoundException { - JspCompilationInfo compilation = getCompiler().compile(path, mockTaglibs); + // TODO: why are the mocks for taglibs and tags handled differently here? + JspCompilationInfo compilation = getCompiler().compile(path, mockTaglibs, getMockTags()); return loadJspClass(compilation.getClassName()); } + protected Map getMockTags() { + return new HashMap(); + } + private JasperCompiler getCompiler() { compiler.setWebRoot(getWebRoot()); compiler.setClassOutputBaseDir(getClassOutputBaseDir()); Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspCompilerImpl.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspCompilerImpl.java 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspCompilerImpl.java 2008-11-07 22:21:33 UTC (rev 242) @@ -7,6 +7,10 @@ import net.sf.jsptest.compiler.api.JspCompiler; import net.sf.jsptest.utils.CustomClassLoader; +/** + * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) + */ public class JspCompilerImpl implements JspCompiler { private String outputDirectory = new File(System.getProperty("java.io.tmpdir"), @@ -29,12 +33,12 @@ return webRoot; } - public Jsp compile(final String jspPath, Map taglibs) { + public Jsp compile(final String jspPath, Map taglibs, Map tags) { try { JasperCompiler compiler = new JasperCompiler(); compiler.setWebRoot(getWebRoot()); compiler.setClassOutputBaseDir(getOutputDirectory()); - JspCompilationInfo info = compiler.compile(jspPath, taglibs); + JspCompilationInfo info = compiler.compile(jspPath, taglibs, tags); final Class servletClass = compileToClass(info); return new JspImpl(servletClass); } catch (Exception e) { Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockOptions.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockOptions.java 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockOptions.java 2008-11-07 22:21:33 UTC (rev 242) @@ -18,6 +18,7 @@ import java.io.File; import java.util.Map; import javax.servlet.ServletContext; +import net.sf.jsptest.compiler.JspCompilationInfo; import net.sf.jsptest.compiler.jsp20.mock.taglibs.MockTldLocationsCache; import org.apache.jasper.Options; import org.apache.jasper.compiler.JspConfig; @@ -27,17 +28,18 @@ /** * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) */ public class MockOptions implements Options { private Options options; private ServletContext servletContext; - private Map taglibs; + private JspCompilationInfo compilationInfo; - public MockOptions(Options options, ServletContext context, Map taglibs) { + public MockOptions(Options options, ServletContext context, JspCompilationInfo compilationInfo) { this.options = options; this.servletContext = context; - this.taglibs = taglibs; + this.compilationInfo = compilationInfo; } public boolean getErrorOnUseBeanInvalidClassAttribute() { @@ -130,7 +132,8 @@ } public TagPluginManager getTagPluginManager() { - return new MockTagPluginManager(servletContext, options.getTagPluginManager(), taglibs); + return new MockTagPluginManager(servletContext, options.getTagPluginManager(), + compilationInfo.getTaglibs(), compilationInfo.getTags()); } public boolean genStringAsCharArray() { Modified: trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java 2008-11-07 22:21:33 UTC (rev 242) @@ -5,16 +5,23 @@ import java.util.HashMap; import java.util.Map; import javax.servlet.ServletContext; +import net.sf.jsptest.TagKey; import org.apache.jasper.JasperException; import org.apache.jasper.compiler.Node.Nodes; +/** + * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) + */ public class MockTagPluginManager extends TagPluginManager { protected Map mockTaglibs; + protected Map mockTags; - public MockTagPluginManager(ServletContext ctx, TagPluginManager tagPluginManager, Map taglibs) { + public MockTagPluginManager(ServletContext ctx, TagPluginManager manager, Map taglibs, Map tags) { super(ctx); mockTaglibs = new HashMap(taglibs); + mockTags = new HashMap(tags); } public void apply(Nodes nodes, ErrorDispatcher errorDispatcher, PageInfo pageInfo) @@ -25,6 +32,11 @@ } private void visitPageNodes(Nodes nodes) throws JasperException { + replaceTaglibs(nodes); + replaceTags(nodes); + } + + private void replaceTaglibs(Nodes nodes) throws JasperException { nodes.visit(new Node.Visitor() { public void visit(Node.CustomTag n) throws JasperException { @@ -38,6 +50,21 @@ }); } + private void replaceTags(Nodes nodes) throws JasperException { + nodes.visit(new Node.Visitor() { + + public void visit(Node.CustomTag n) throws JasperException { + String prefix = n.getTagInfo().getTagLibrary().getPrefixString(); + String name = n.getTagInfo().getTagName(); + Class mockClass = (Class) mockTags.get(new TagKey(prefix, name)); + if (mockClass != null) { + n.setTagHandlerClass(mockClass); + } + super.visit(n); + } + }); + } + private void assignToPrivateField(String fieldName, Object value) { try { Field field = getClass().getSuperclass().getDeclaredField(fieldName); 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 2008-11-07 22:05:06 UTC (rev 241) +++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java 2008-11-07 22:21:33 UTC (rev 242) @@ -4,9 +4,13 @@ import net.sf.jsptest.compiler.api.Jsp; import net.sf.jsptest.compiler.api.JspCompiler; +/** + * @author Lasse Koskela + * @author Meinert Schwartau (scwar32) + */ public class JspCompilerImpl implements JspCompiler { - public Jsp compile(String path, Map taglibs) { + public Jsp compile(String path, Map taglibs, Map tags) { throw new RuntimeException("Not implemented"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lko...@us...> - 2008-11-08 06:33:32
|
Revision: 244 http://jsptest.svn.sourceforge.net/jsptest/?rev=244&view=rev Author: lkoskela Date: 2008-11-08 06:33:30 +0000 (Sat, 08 Nov 2008) Log Message: ----------- Refactored both types of 'mocked taglibs' to use TagKey as the hash key. This gives us consistency but also allows us to refactor the two HashMaps into one. Modified Paths: -------------- trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TagKeyTest.java trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java 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 2008-11-07 23:00:53 UTC (rev 243) +++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java 2008-11-08 06:33:30 UTC (rev 244) @@ -165,7 +165,7 @@ * The new (substitute) implementation to use. */ protected void substituteTaglib(String name, Class newImplementation) { - substituteTaglibs.put(name, newImplementation); + substituteTaglibs.put(new TagKey(name), newImplementation); } /** Modified: trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java =================================================================== --- trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java 2008-11-07 23:00:53 UTC (rev 243) +++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java 2008-11-08 06:33:30 UTC (rev 244) @@ -8,6 +8,10 @@ private final String prefix; private final String name; + public TagKey(String prefix) { + this(prefix, "*"); + } + public TagKey(String prefix, String name) { this.prefix = prefix; this.name = name; Modified: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TagKeyTest.java =================================================================== --- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TagKeyTest.java 2008-11-07 23:00:53 UTC (rev 243) +++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/TagKeyTest.java 2008-11-08 06:33:30 UTC (rev 244) @@ -26,4 +26,8 @@ public void testToStringPrettyPrints() throws Exception { assertEquals("prefix:name", new TagKey("prefix", "name").toString()); } + + public void testTagNameDefaultsToAsteriskIfNotSet() throws Exception { + assertEquals(new TagKey("prefix", "*"), new TagKey("prefix")); + } } Modified: trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java 2008-11-07 23:00:53 UTC (rev 243) +++ trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java 2008-11-08 06:33:30 UTC (rev 244) @@ -42,7 +42,7 @@ protected Class substitute(TagInfo tagInfo) { String tagName = tagInfo.getTagLibrary().getPrefixString(); - return (Class) mockTaglibs.get(tagName); + return (Class) mockTaglibs.get(new TagKey(tagName)); } }); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lko...@us...> - 2008-11-08 07:11:57
|
Revision: 246 http://jsptest.svn.sourceforge.net/jsptest/?rev=246&view=rev Author: lkoskela Date: 2008-11-08 07:11:53 +0000 (Sat, 08 Nov 2008) Log Message: ----------- Refactored mocking of taglibs to use a single HashMap of TagKey->Class instead of two. Modified Paths: -------------- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspCompiler.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-jsp12/src/main/java/net/sf/jsptest/compiler/jsp12/JspCompilerImpl.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspCompilerImpl.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockOptions.java trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/JspCompilationInfo.java 2008-11-08 07:11:53 UTC (rev 246) @@ -37,12 +37,10 @@ private String classOutputDir; private String webRoot; private Map taglibs; - private Map tags; private static Map compilationHistory = new HashMap(); public JspCompilationInfo() { this.taglibs = new HashMap(); - this.tags = new HashMap(); } private String absolute(String path) { @@ -127,16 +125,8 @@ this.taglibs = new HashMap(taglibs); } - public Map getTags() { - return tags; - } - - public void setTags(Map tags) { - this.tags = new HashMap(tags); - } - public synchronized void compilationWasSuccessful() { - compilationHistory.put(jspSourceLocation, new LastCompile(taglibs, tags)); + compilationHistory.put(jspSourceLocation, new LastCompile(taglibs)); } public synchronized boolean jspCompilationRequired() { @@ -146,7 +136,7 @@ File java = new File(javaSourceLocation); File clazz = new File(classFileLocation); return (doesNotExistOrIsTooOld(clazz) || doesNotExistOrIsTooOld(java) - || jsp.lastModified() > java.lastModified() || taglibsHaveChangedSinceLastCompile() || tagsHaveChangedSinceLastCompile()); + || jsp.lastModified() > java.lastModified() || taglibsHaveChangedSinceLastCompile()); } private boolean taglibsHaveChangedSinceLastCompile() { @@ -157,14 +147,6 @@ return !lastCompile.getTaglibs().equals(getTaglibs()); } - private boolean tagsHaveChangedSinceLastCompile() { - LastCompile lastCompile = (LastCompile) compilationHistory.get(getJspSource()); - if (lastCompile == null) { - return true; - } - return !lastCompile.getTags().equals(getTags()); - } - private boolean doesNotExistOrIsTooOld(File file) { long expirationAge = 5 * 60 * 1000L; long expirationThreshold = System.currentTimeMillis() - expirationAge; @@ -179,17 +161,11 @@ private static final class LastCompile { private final Map taglibs; - private final Map tags; - public LastCompile(Map taglibs, Map tags) { + public LastCompile(Map taglibs) { this.taglibs = taglibs; - this.tags = tags; } - public Map getTags() { - return tags; - } - public Map getTaglibs() { return taglibs; } Modified: trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspCompiler.java =================================================================== --- trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspCompiler.java 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-generic/jsptest-compiler-api/src/main/java/net/sf/jsptest/compiler/api/JspCompiler.java 2008-11-08 07:11:53 UTC (rev 246) @@ -8,7 +8,7 @@ */ public interface JspCompiler { - Jsp compile(String path, Map taglibs, Map tags); + Jsp compile(String path, Map taglibs); void setWebRoot(String directory); 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 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/JspTestCase.java 2008-11-08 07:11:53 UTC (rev 246) @@ -40,7 +40,6 @@ private Map requestAttributes; private Map sessionAttributes; private Map substituteTaglibs; - private Map substituteTags; private JspExecution execution; public JspTestCase() { @@ -55,7 +54,6 @@ requestAttributes = new HashMap(); sessionAttributes = new HashMap(); substituteTaglibs = new HashMap(); - substituteTags = new HashMap(); } /** @@ -127,7 +125,7 @@ + new File(getWebRoot()).getAbsolutePath()); compiler.setWebRoot(getWebRoot()); compiler.setOutputDirectory(getOutputDirectory()); - Jsp jsp = compiler.compile(path, substituteTaglibs, substituteTags); + Jsp jsp = compiler.compile(path, substituteTaglibs); log.debug("Simulating a request to " + path); execution = jsp.request(httpMethod, requestAttributes, sessionAttributes); } @@ -177,6 +175,6 @@ * The new (substitute) implementation to use. */ protected void substituteTag(String prefix, String name, Class newImplementation) { - substituteTags.put(new TagKey(prefix, name), newImplementation); + substituteTaglibs.put(new TagKey(prefix, name), newImplementation); } } 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 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/compiler/dummy/FakeJspCompiler.java 2008-11-08 07:11:53 UTC (rev 246) @@ -32,7 +32,7 @@ fakedOutput.append(content); } - public Jsp compile(String path, Map taglibs, Map tags) { + public Jsp compile(String path, Map taglibs) { lastCompiledWebRoot = getWebRoot(); lastCompiledPath = path; return new Jsp() { Modified: trunk/jsptest-jsp12/src/main/java/net/sf/jsptest/compiler/jsp12/JspCompilerImpl.java =================================================================== --- trunk/jsptest-jsp12/src/main/java/net/sf/jsptest/compiler/jsp12/JspCompilerImpl.java 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-jsp12/src/main/java/net/sf/jsptest/compiler/jsp12/JspCompilerImpl.java 2008-11-08 07:11:53 UTC (rev 246) @@ -10,7 +10,7 @@ */ public class JspCompilerImpl implements JspCompiler { - public Jsp compile(String path, Map taglibs, Map tags) { + public Jsp compile(String path, Map taglibs) { throw new RuntimeException("Not implemented"); } 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 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperCompiler.java 2008-11-08 07:11:53 UTC (rev 246) @@ -107,11 +107,9 @@ * 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 - * @param mockTags - * Mapping of <tt>TagKey</tt>s to tag handler classes */ - public JspCompilationInfo compile(String path, Map mockTaglibs, Map mockTags) throws Exception { - JspCompilationInfo info = createJspCompilationInfo(path, mockTaglibs, mockTags); + public JspCompilationInfo compile(String path, Map mockTaglibs) throws Exception { + JspCompilationInfo info = createJspCompilationInfo(path, mockTaglibs); if (info.jspCompilationRequired()) { compileJsp(info); compileJavaToBytecode(info); @@ -139,14 +137,13 @@ } } - private JspCompilationInfo createJspCompilationInfo(String jsp, Map mockTaglibs, Map mockTags) { + 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); - info.setTags(mockTags); resolveJavaSourceFile(info); resolveClassFileLocation(info); resolveClassName(info); Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JasperExecution.java 2008-11-08 07:11:53 UTC (rev 246) @@ -185,15 +185,10 @@ } private Class compileToClass(String path) throws Exception, ClassNotFoundException { - // TODO: why are the mocks for taglibs and tags handled differently here? - JspCompilationInfo compilation = getCompiler().compile(path, mockTaglibs, getMockTags()); + JspCompilationInfo compilation = getCompiler().compile(path, mockTaglibs); return loadJspClass(compilation.getClassName()); } - protected Map getMockTags() { - return new HashMap(); - } - private JasperCompiler getCompiler() { compiler.setWebRoot(getWebRoot()); compiler.setClassOutputBaseDir(getClassOutputBaseDir()); Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspCompilerImpl.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspCompilerImpl.java 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspCompilerImpl.java 2008-11-08 07:11:53 UTC (rev 246) @@ -33,12 +33,12 @@ return webRoot; } - public Jsp compile(final String jspPath, Map taglibs, Map tags) { + public Jsp compile(final String jspPath, Map taglibs) { try { JasperCompiler compiler = new JasperCompiler(); compiler.setWebRoot(getWebRoot()); compiler.setClassOutputBaseDir(getOutputDirectory()); - JspCompilationInfo info = compiler.compile(jspPath, taglibs, tags); + JspCompilationInfo info = compiler.compile(jspPath, taglibs); final Class servletClass = compileToClass(info); return new JspImpl(servletClass); } catch (Exception e) { Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockOptions.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockOptions.java 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockOptions.java 2008-11-08 07:11:53 UTC (rev 246) @@ -133,7 +133,7 @@ public TagPluginManager getTagPluginManager() { return new MockTagPluginManager(servletContext, options.getTagPluginManager(), - compilationInfo.getTaglibs(), compilationInfo.getTags()); + compilationInfo.getTaglibs()); } public boolean genStringAsCharArray() { Modified: trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-jsp20/src/main/java/org/apache/jasper/compiler/MockTagPluginManager.java 2008-11-08 07:11:53 UTC (rev 246) @@ -17,49 +17,35 @@ public class MockTagPluginManager extends TagPluginManager { protected Map mockTaglibs; - protected Map mockTags; - public MockTagPluginManager(ServletContext ctx, TagPluginManager manager, Map taglibs, Map tags) { + public MockTagPluginManager(ServletContext ctx, TagPluginManager manager, Map taglibs) { super(ctx); mockTaglibs = new HashMap(taglibs); - mockTags = new HashMap(tags); } public void apply(Nodes nodes, ErrorDispatcher errorDispatcher, PageInfo pageInfo) throws JasperException { invokePrivateInitWith(errorDispatcher); assignToPrivateField("pageInfo", pageInfo); - visitPageNodes(nodes); + substituteMocksFor(nodes); } - private void visitPageNodes(Nodes nodes) throws JasperException { - replaceTaglibs(nodes); - replaceTags(nodes); + private void substituteMocksFor(Nodes nodes) throws JasperException { + nodes.visit(new TagSubstitutor(mockTaglibs)); } - private void replaceTaglibs(Nodes nodes) throws JasperException { - nodes.visit(new TagSubstitutor() { + /** + * Walks through the node tree representing the JSP and replaces the <i>handler</i> of certain + * tags with a mock implementation if one has been configured. + */ + private static class TagSubstitutor extends Node.Visitor { - protected Class substitute(TagInfo tagInfo) { - String tagName = tagInfo.getTagLibrary().getPrefixString(); - return (Class) mockTaglibs.get(new TagKey(tagName)); - } - }); - } + private final Map mocks; - private void replaceTags(Nodes nodes) throws JasperException { - nodes.visit(new TagSubstitutor() { + public TagSubstitutor(Map mockTaglibs) { + this.mocks = mockTaglibs; + } - protected Class substitute(TagInfo tagInfo) { - String prefix = tagInfo.getTagLibrary().getPrefixString(); - String name = tagInfo.getTagName(); - return (Class) mockTags.get(new TagKey(prefix, name)); - } - }); - } - - private static abstract class TagSubstitutor extends Node.Visitor { - public void visit(Node.CustomTag n) throws JasperException { Class mockClass = substitute(n.getTagInfo()); if (mockClass != null) { @@ -68,7 +54,21 @@ super.visit(n); } - protected abstract Class substitute(TagInfo tagInfo); + private Class substitute(TagInfo tagInfo) { + String prefix = tagInfo.getTagLibrary().getPrefixString(); + String name = tagInfo.getTagName(); + TagKey[] matchingOrder = new TagKey[] { new TagKey(prefix, name), new TagKey(prefix) }; + return firstMatch(mocks, matchingOrder); + } + + private Class firstMatch(Map map, TagKey[] keys) { + for (int i = 0; i < keys.length; i++) { + if (map.containsKey(keys[i])) { + return (Class) mocks.get(keys[i]); + } + } + return null; + } } private void assignToPrivateField(String fieldName, Object value) { 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 2008-11-08 06:42:59 UTC (rev 245) +++ trunk/jsptest-jsp21/src/main/java/net/sf/jsptest/compiler/jsp21/JspCompilerImpl.java 2008-11-08 07:11:53 UTC (rev 246) @@ -10,7 +10,7 @@ */ public class JspCompilerImpl implements JspCompiler { - public Jsp compile(String path, Map taglibs, Map tags) { + public Jsp compile(String path, Map taglibs) { throw new RuntimeException("Not implemented"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lko...@us...> - 2008-11-08 12:00:39
|
Revision: 247 http://jsptest.svn.sourceforge.net/jsptest/?rev=247&view=rev Author: lkoskela Date: 2008-11-08 12:00:27 +0000 (Sat, 08 Nov 2008) Log Message: ----------- Added missing @author tags Modified Paths: -------------- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/SunJavaC.java trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/CustomClassLoaderTest.java 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/PathTest.java trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/StreamConsumerTest.java trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/StringsTest.java trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/XMLTest.java trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/AbstractFakeJspCompilerTestCase.java trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/assertion/TestExpectedAssertionFailure.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspExecutionImpl.java 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/JspTestServletOutputStream.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 trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockPageContext.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletContext.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletInputStream.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ClasspathTldLocator.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ExplodedTldLocator.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldLocator.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldUriMappings.java trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/WebInfLibTldLocator.java trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/TestJspImpl.java trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TestClasspathTldLocator.java Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/src/test/java/net/sf/jsptest/acceptance/jsp/RequestAndSessionAttributeTest.java 2008-11-08 12:00:27 UTC (rev 247) @@ -18,7 +18,7 @@ import net.sf.jsptest.JspTestCase; /** - * Unit testing JavaServer Pages has never been this easy! + * @author Lasse Koskela */ public class RequestAndSessionAttributeTest extends JspTestCase { Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/SunJavaC.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/SunJavaC.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/compiler/java/SunJavaC.java 2008-11-08 12:00:27 UTC (rev 247) @@ -18,10 +18,10 @@ import java.lang.reflect.Method; /** - * This implementation uses the java compiler from sun which ships with since the jdk since java - * 1.3. The code is inspired by the javac ant task implementation. + * This implementation uses the Java compiler from Sun which ships with the JDK since Java + * 1.3. The code is inspired by the <tt>javac</tt> Ant task implementation. * - * @author mathias.broekelmann + * @author Mathias Broekelmann */ public class SunJavaC implements JavaCompiler { Modified: trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java 2008-11-08 12:00:27 UTC (rev 247) @@ -22,7 +22,7 @@ import java.util.Enumeration; /** - * @author lkoskela + * @author Lasse Koskela */ public class Path extends ArrayList { Modified: trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/CustomClassLoaderTest.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/CustomClassLoaderTest.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/CustomClassLoaderTest.java 2008-11-08 12:00:27 UTC (rev 247) @@ -3,6 +3,9 @@ import java.io.File; import junit.framework.TestCase; +/** + * @author Lasse Koskela + */ public class CustomClassLoaderTest extends TestCase { private File baseDir; 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-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/IOTest.java 2008-11-08 12:00:27 UTC (rev 247) @@ -3,6 +3,9 @@ import java.io.File; import junit.framework.TestCase; +/** + * @author Lasse Koskela + */ public class IOTest extends TestCase { private File file; Modified: trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/PathTest.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/PathTest.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/PathTest.java 2008-11-08 12:00:27 UTC (rev 247) @@ -6,6 +6,9 @@ import java.util.List; import junit.framework.TestCase; +/** + * @author Lasse Koskela + */ public class PathTest extends TestCase { private Path path; Modified: trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/StreamConsumerTest.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/StreamConsumerTest.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/StreamConsumerTest.java 2008-11-08 12:00:27 UTC (rev 247) @@ -6,6 +6,9 @@ import java.io.StringWriter; import junit.framework.TestCase; +/** + * @author Lasse Koskela + */ public class StreamConsumerTest extends TestCase { private StringWriter log; Modified: trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/StringsTest.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/StringsTest.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/StringsTest.java 2008-11-08 12:00:27 UTC (rev 247) @@ -2,6 +2,9 @@ import junit.framework.TestCase; +/** + * @author Lasse Koskela + */ public class StringsTest extends TestCase { public void testReplacingNonexistentNeedle() throws Exception { Modified: trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/XMLTest.java =================================================================== --- trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/XMLTest.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-common/src/test/java/net/sf/jsptest/utils/XMLTest.java 2008-11-08 12:00:27 UTC (rev 247) @@ -8,6 +8,9 @@ import org.w3c.dom.Element; import org.xml.sax.InputSource; +/** + * @author Lasse Koskela + */ public class XMLTest extends TestCase { public void testCollectingTextContentForEmptyElement() throws Exception { Modified: trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java =================================================================== --- trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-framework/src/main/java/net/sf/jsptest/TagKey.java 2008-11-08 12:00:27 UTC (rev 247) @@ -2,6 +2,7 @@ /** * @author Meinert Schwartau (scwar32) + * @author Lasse Koskela */ public class TagKey { Modified: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/AbstractFakeJspCompilerTestCase.java =================================================================== --- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/AbstractFakeJspCompilerTestCase.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/AbstractFakeJspCompilerTestCase.java 2008-11-08 12:00:27 UTC (rev 247) @@ -3,6 +3,9 @@ import net.sf.jsptest.compiler.dummy.FakeJspCompiler; import junit.framework.TestCase; +/** + * @author Lasse Koskela + */ public abstract class AbstractFakeJspCompilerTestCase extends TestCase { protected void setUp() throws Exception { Modified: trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/assertion/TestExpectedAssertionFailure.java =================================================================== --- trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/assertion/TestExpectedAssertionFailure.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-generic/jsptest-framework/src/test/java/net/sf/jsptest/assertion/TestExpectedAssertionFailure.java 2008-11-08 12:00:27 UTC (rev 247) @@ -4,6 +4,9 @@ import junit.framework.TestCase; import net.sf.jsptest.HtmlTestCase; +/** + * @author Lasse Koskela + */ public class TestExpectedAssertionFailure extends TestCase { private HtmlTestCase testcase; Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspExecutionImpl.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspExecutionImpl.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspExecutionImpl.java 2008-11-08 12:00:27 UTC (rev 247) @@ -2,6 +2,9 @@ import net.sf.jsptest.compiler.api.JspExecution; +/** + * @author Lasse Koskela + */ public class JspExecutionImpl implements JspExecution { private final String renderedOutput; 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 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/JspImpl.java 2008-11-08 12:00:27 UTC (rev 247) @@ -21,6 +21,9 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +/** + * @author Lasse Koskela + */ public class JspImpl implements Jsp { private static final Log log = LogFactory.getLog(JspImpl.class); Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/JspTestServletOutputStream.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/JspTestServletOutputStream.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/JspTestServletOutputStream.java 2008-11-08 12:00:27 UTC (rev 247) @@ -4,6 +4,9 @@ import java.io.OutputStream; import javax.servlet.ServletOutputStream; +/** + * @author Lasse Koskela + */ public class JspTestServletOutputStream extends ServletOutputStream { private final OutputStream stream; 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 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletRequest.java 2008-11-08 12:00:27 UTC (rev 247) @@ -36,6 +36,9 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; +/** + * @author Lasse Koskela + */ public class MockHttpServletRequest implements HttpServletRequest { private Map headers = new HashMap(); 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 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockHttpServletResponse.java 2008-11-08 12:00:27 UTC (rev 247) @@ -28,6 +28,9 @@ import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; +/** + * @author Lasse Koskela + */ public class MockHttpServletResponse implements HttpServletResponse { private ServletOutputStream servletOutputStream; Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockPageContext.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockPageContext.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockPageContext.java 2008-11-08 12:00:27 UTC (rev 247) @@ -20,6 +20,9 @@ import org.apache.commons.el.ExpressionEvaluatorImpl; import org.apache.commons.el.VariableResolverImpl; +/** + * @author Lasse Koskela + */ public class MockPageContext extends PageContext { private static final String VALID_SCOPES_DESCRIPTION = "Valid scopes are PageContext.PAGE_SCOPE, " Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletContext.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletContext.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletContext.java 2008-11-08 12:00:27 UTC (rev 247) @@ -10,6 +10,9 @@ import javax.servlet.ServletContext; import javax.servlet.ServletException; +/** + * @author Lasse Koskela + */ public class MockServletContext implements ServletContext { public Set getResourcePaths(String reference) { Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletInputStream.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletInputStream.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/MockServletInputStream.java 2008-11-08 12:00:27 UTC (rev 247) @@ -6,6 +6,8 @@ /** * Mock implementation of <code>ServletInputStream</code>. + * + * @author Lasse Koskela */ public class MockServletInputStream extends ServletInputStream { Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ClasspathTldLocator.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ClasspathTldLocator.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ClasspathTldLocator.java 2008-11-08 12:00:27 UTC (rev 247) @@ -17,6 +17,9 @@ import java.net.URL; +/** + * @author Lasse Koskela + */ public class ClasspathTldLocator implements TldLocator { public TldLocation find(String filename) { Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ExplodedTldLocator.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ExplodedTldLocator.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/ExplodedTldLocator.java 2008-11-08 12:00:27 UTC (rev 247) @@ -17,6 +17,9 @@ import java.io.File; +/** + * @author Lasse Koskela + */ public class ExplodedTldLocator implements TldLocator { private final String webRoot; Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldLocator.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldLocator.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldLocator.java 2008-11-08 12:00:27 UTC (rev 247) @@ -15,6 +15,9 @@ */ package net.sf.jsptest.compiler.jsp20.mock.taglibs; +/** + * @author Lasse Koskela + */ public interface TldLocator { /** Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldUriMappings.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldUriMappings.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TldUriMappings.java 2008-11-08 12:00:27 UTC (rev 247) @@ -5,6 +5,9 @@ import java.util.List; import java.util.Map; +/** + * @author Lasse Koskela + */ public class TldUriMappings { private static final Map standardTlds = new HashMap(); Modified: trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/WebInfLibTldLocator.java =================================================================== --- trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/WebInfLibTldLocator.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/main/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/WebInfLibTldLocator.java 2008-11-08 12:00:27 UTC (rev 247) @@ -21,6 +21,9 @@ import java.util.jar.JarEntry; import java.util.jar.JarFile; +/** + * @author Lasse Koskela + */ public class WebInfLibTldLocator implements TldLocator { private final String webRoot; 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 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/TestJspImpl.java 2008-11-08 12:00:27 UTC (rev 247) @@ -16,6 +16,9 @@ import net.sf.jsptest.compiler.api.JspExecution; import net.sf.jsptest.compiler.jsp20.mock.MockJspWriter; +/** + * @author Lasse Koskela + */ public class TestJspImpl extends TestCase { public static class FakeServlet extends javax.servlet.http.HttpServlet { Modified: trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TestClasspathTldLocator.java =================================================================== --- trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TestClasspathTldLocator.java 2008-11-08 07:11:53 UTC (rev 246) +++ trunk/jsptest-jsp20/src/test/java/net/sf/jsptest/compiler/jsp20/mock/taglibs/TestClasspathTldLocator.java 2008-11-08 12:00:27 UTC (rev 247) @@ -3,6 +3,9 @@ import java.io.File; import junit.framework.TestCase; +/** + * @author Lasse Koskela + */ public class TestClasspathTldLocator extends TestCase { private TldLocator locator; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lko...@us...> - 2008-11-09 12:08:10
|
Revision: 249 http://jsptest.svn.sourceforge.net/jsptest/?rev=249&view=rev Author: lkoskela Date: 2008-11-09 12:08:04 +0000 (Sun, 09 Nov 2008) Log Message: ----------- Formatted POM files with Eclipse 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-generic/jsptest-common/pom.xml trunk/jsptest-generic/jsptest-compiler-api/pom.xml trunk/jsptest-generic/jsptest-framework/pom.xml trunk/jsptest-jsp12/pom.xml trunk/jsptest-jsp20/pom.xml trunk/jsptest-jsp21/pom.xml Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-11-09 11:48:28 UTC (rev 248) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-11-09 12:08:04 UTC (rev 249) @@ -1,19 +1,24 @@ <?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 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> Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-11-09 11:48:28 UTC (rev 248) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-11-09 12:08:04 UTC (rev 249) @@ -1,19 +1,24 @@ <?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 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> Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-11-09 11:48:28 UTC (rev 248) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-11-09 12:08:04 UTC (rev 249) @@ -1,20 +1,25 @@ <?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 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> Modified: trunk/jsptest-generic/jsptest-common/pom.xml =================================================================== --- trunk/jsptest-generic/jsptest-common/pom.xml 2008-11-09 11:48:28 UTC (rev 248) +++ trunk/jsptest-generic/jsptest-common/pom.xml 2008-11-09 12:08:04 UTC (rev 249) @@ -1,34 +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-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 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> Modified: trunk/jsptest-generic/jsptest-compiler-api/pom.xml =================================================================== --- trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2008-11-09 11:48:28 UTC (rev 248) +++ trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2008-11-09 12:08:04 UTC (rev 249) @@ -1,14 +1,19 @@ <?xml version="1.0"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>net.sf.jsptest</groupId> - <artifactId>jsptest-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 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> Modified: trunk/jsptest-generic/jsptest-framework/pom.xml =================================================================== --- trunk/jsptest-generic/jsptest-framework/pom.xml 2008-11-09 11:48:28 UTC (rev 248) +++ trunk/jsptest-generic/jsptest-framework/pom.xml 2008-11-09 12:08:04 UTC (rev 249) @@ -1,26 +1,30 @@ <?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 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> Modified: trunk/jsptest-jsp12/pom.xml =================================================================== --- trunk/jsptest-jsp12/pom.xml 2008-11-09 11:48:28 UTC (rev 248) +++ trunk/jsptest-jsp12/pom.xml 2008-11-09 12:08:04 UTC (rev 249) @@ -1,48 +1,53 @@ <?xml version="1.0"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>net.sf.jsptest</groupId> - <artifactId>jsptest</artifactId> - <version>0.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 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> Modified: trunk/jsptest-jsp20/pom.xml =================================================================== --- trunk/jsptest-jsp20/pom.xml 2008-11-09 11:48:28 UTC (rev 248) +++ trunk/jsptest-jsp20/pom.xml 2008-11-09 12:08:04 UTC (rev 249) @@ -1,48 +1,53 @@ <?xml version="1.0"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>net.sf.jsptest</groupId> - <artifactId>jsptest</artifactId> - <version>0.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 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> Modified: trunk/jsptest-jsp21/pom.xml =================================================================== --- trunk/jsptest-jsp21/pom.xml 2008-11-09 11:48:28 UTC (rev 248) +++ trunk/jsptest-jsp21/pom.xml 2008-11-09 12:08:04 UTC (rev 249) @@ -1,43 +1,48 @@ <?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 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> 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:04:05
|
Revision: 251 http://jsptest.svn.sourceforge.net/jsptest/?rev=251&view=rev Author: lkoskela Date: 2008-11-19 13:04:03 +0000 (Wed, 19 Nov 2008) Log Message: ----------- [maven-release-plugin] prepare release jsptest-0.18 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 12:59:11 UTC (rev 250) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp12/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -1,11 +1,8 @@ -<?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"> +<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> + <version>0.18</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jsptest-acceptance-jsp12</artifactId> @@ -21,4 +18,4 @@ <artifactId>jsptest-jsp12</artifactId> </dependency> </dependencies> -</project> +</project> \ No newline at end of file Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-11-19 12:59:11 UTC (rev 250) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp20/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -1,11 +1,8 @@ -<?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"> +<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> + <version>0.18</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jsptest-acceptance-jsp20</artifactId> @@ -21,4 +18,4 @@ <artifactId>jsptest-jsp20</artifactId> </dependency> </dependencies> -</project> +</project> \ No newline at end of file Modified: trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml =================================================================== --- trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-11-19 12:59:11 UTC (rev 250) +++ trunk/jsptest-acceptance/jsptest-acceptance-jsp21/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -1,15 +1,12 @@ -<?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"> +<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> + <version>0.18</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jsptest-acceptance-jsp21</artifactId> - <version>0.18-SNAPSHOT</version> + <version>0.18</version> <packaging>jar</packaging> <name> Acceptance tests for the JspTest variant for the JSP 2.1 @@ -22,4 +19,4 @@ <artifactId>jsptest-jsp21</artifactId> </dependency> </dependencies> -</project> +</project> \ No newline at end of file Modified: trunk/jsptest-acceptance/pom.xml =================================================================== --- trunk/jsptest-acceptance/pom.xml 2008-11-19 12:59:11 UTC (rev 250) +++ trunk/jsptest-acceptance/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -3,7 +3,7 @@ <parent> <groupId>net.sf.jsptest</groupId> <artifactId>jsptest</artifactId> - <version>0.18-SNAPSHOT</version> + <version>0.18</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 12:59:11 UTC (rev 250) +++ trunk/jsptest-generic/jsptest-common/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -1,15 +1,12 @@ -<?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"> +<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> + <version>0.18</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jsptest-common</artifactId> - <version>0.18-SNAPSHOT</version> + <version>0.18</version> <packaging>jar</packaging> <name>Common utilities</name> <description> @@ -38,4 +35,4 @@ </dependencies> </profile> </profiles> -</project> +</project> \ No newline at end of file Modified: trunk/jsptest-generic/jsptest-compiler-api/pom.xml =================================================================== --- trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2008-11-19 12:59:11 UTC (rev 250) +++ trunk/jsptest-generic/jsptest-compiler-api/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -1,19 +1,16 @@ -<?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"> +<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> + <version>0.18</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jsptest-compiler-api</artifactId> - <version>0.18-SNAPSHOT</version> + <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> +</project> \ No newline at end of file Modified: trunk/jsptest-generic/jsptest-framework/pom.xml =================================================================== --- trunk/jsptest-generic/jsptest-framework/pom.xml 2008-11-19 12:59:11 UTC (rev 250) +++ trunk/jsptest-generic/jsptest-framework/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -1,15 +1,12 @@ -<?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"> +<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> + <version>0.18</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jsptest-framework</artifactId> - <version>0.18-SNAPSHOT</version> + <version>0.18</version> <packaging>jar</packaging> <name>Core framework</name> <description> @@ -19,12 +16,12 @@ <dependency> <groupId>net.sf.jsptest</groupId> <artifactId>jsptest-compiler-api</artifactId> - <version>0.18-SNAPSHOT</version> + <version>0.18</version> </dependency> <dependency> <groupId>net.sf.jsptest</groupId> <artifactId>jsptest-common</artifactId> - <version>0.18-SNAPSHOT</version> + <version>0.18</version> </dependency> </dependencies> -</project> +</project> \ No newline at end of file Modified: trunk/jsptest-generic/pom.xml =================================================================== --- trunk/jsptest-generic/pom.xml 2008-11-19 12:59:11 UTC (rev 250) +++ trunk/jsptest-generic/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -3,11 +3,11 @@ <parent> <groupId>net.sf.jsptest</groupId> <artifactId>jsptest</artifactId> - <version>0.18-SNAPSHOT</version> + <version>0.18</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jsptest-generic</artifactId> - <version>0.18-SNAPSHOT</version> + <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> Modified: trunk/jsptest-jsp12/pom.xml =================================================================== --- trunk/jsptest-jsp12/pom.xml 2008-11-19 12:59:11 UTC (rev 250) +++ trunk/jsptest-jsp12/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -1,11 +1,8 @@ -<?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"> +<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> + <version>0.18</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jsptest-jsp12</artifactId> @@ -50,4 +47,4 @@ </resource> </resources> </build> -</project> +</project> \ No newline at end of file Modified: trunk/jsptest-jsp20/pom.xml =================================================================== --- trunk/jsptest-jsp20/pom.xml 2008-11-19 12:59:11 UTC (rev 250) +++ trunk/jsptest-jsp20/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -1,11 +1,8 @@ -<?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"> +<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> + <version>0.18</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jsptest-jsp20</artifactId> @@ -50,4 +47,4 @@ </resource> </resources> </build> -</project> +</project> \ No newline at end of file Modified: trunk/jsptest-jsp21/pom.xml =================================================================== --- trunk/jsptest-jsp21/pom.xml 2008-11-19 12:59:11 UTC (rev 250) +++ trunk/jsptest-jsp21/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -1,11 +1,8 @@ -<?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"> +<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> + <version>0.18</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jsptest-jsp21</artifactId> @@ -45,4 +42,4 @@ </resource> </resources> </build> -</project> +</project> \ No newline at end of file Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2008-11-19 12:59:11 UTC (rev 250) +++ trunk/pom.xml 2008-11-19 13:04:03 UTC (rev 251) @@ -3,7 +3,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>net.sf.jsptest</groupId> <artifactId>jsptest</artifactId> - <version>0.18-SNAPSHOT</version> + <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> @@ -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/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> 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...> - 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-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 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 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...> - 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: <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-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-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 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. |