debian/0000755000000000000000000000000011630666663007203 5ustar debian/patches/0000755000000000000000000000000011630666663010632 5ustar debian/patches/series0000644000000000000000000000005411227646757012052 0ustar 01_dont_copy_test_lib.diff 02_junit_45.diff debian/patches/02_junit_45.diff0000644000000000000000000002335611534553563013434 0ustar Description: compatibility patch for JUnit 4.5 Author: Damien Raude-Morvan Origin: vendor Forwarded: no Last-Update: 2009-07-16 --- a/src/test/java/org/apache/velocity/tools/test/whitebox/GenericToolsTests.java +++ b/src/test/java/org/apache/velocity/tools/test/whitebox/GenericToolsTests.java @@ -78,9 +78,9 @@ assertEquals(disp,dateTool.format(date)); assertEquals(disp2,dateTool.format("yyyy/MM/dd",date)); /* test parsing */ - assertEquals(2007,dateTool.getYear(disp)); - assertEquals(0,dateTool.getMonth(disp)); - assertEquals(2,dateTool.getDay(disp)); + assertEquals(new Integer(2007), dateTool.getYear(disp)); + assertEquals(new Integer(0), dateTool.getMonth(disp)); + assertEquals(new Integer(2), dateTool.getDay(disp)); } public @Test void testEscapeTool() { @@ -147,24 +147,24 @@ assertNotNull(mathTool); assertEquals(1,mathTool.abs(-1)); assertEquals(2,mathTool.add(1,1)); - assertEquals(3,mathTool.ceil(2.5)); + assertEquals(new Integer(3),mathTool.ceil(2.5)); assertEquals(4,mathTool.div(8,2)); - assertEquals(5,mathTool.floor(5.1)); + assertEquals(new Integer(5),mathTool.floor(5.1)); assertEquals(6,mathTool.getAverage(new long[] {5,6,7})); /* getTotal() watches the type of its first argument, so assertEquals needs a long */ assertEquals((long)7,mathTool.getTotal(new long[] {2,2,3})); - assertEquals(8,mathTool.idiv(130,16)); + assertEquals(new Integer(8),mathTool.idiv(130,16)); assertEquals(9,mathTool.max(9,-10)); assertEquals(10,mathTool.min(10,20)); - assertEquals(11,mathTool.mod(37,13)); + assertEquals(new Integer(11),mathTool.mod(37,13)); assertEquals(12,mathTool.mul(3,4)); - assertEquals(13,mathTool.round(12.8)); - assertEquals(14.2,mathTool.roundTo(1,14.18)); - assertEquals(-5.0,mathTool.roundTo(2,-4.999)); + assertEquals(new Integer(13),mathTool.round(12.8)); + assertEquals(new Double(14.2),mathTool.roundTo(1,14.18)); + assertEquals(new Double(-5.0),mathTool.roundTo(2,-4.999)); assertEquals(15,mathTool.sub(30,15)); assertEquals(16,mathTool.pow(4,2)); - assertEquals(17,mathTool.toInteger("17")); - assertEquals(18.1,mathTool.toDouble("18.1")); + assertEquals(new Integer(17),mathTool.toInteger("17")); + assertEquals(new Double(18.1),mathTool.toDouble("18.1")); } public @Test void testNumberTool() { --- a/src/test/java/org/apache/velocity/tools/generic/DisplayToolTests.java +++ b/src/test/java/org/apache/velocity/tools/generic/DisplayToolTests.java @@ -119,11 +119,11 @@ display.configure(conf); assertEquals(";", display.getListDelimiter()); assertEquals(" und ", display.getListFinalDelimiter()); - assertEquals(5, display.getTruncateLength()); + assertEquals((double)5, display.getTruncateLength()); assertEquals(">", display.getTruncateSuffix()); assertEquals(true, display.getTruncateAtWord()); assertEquals("~", display.getCellSuffix()); - assertEquals(4, display.getCellLength()); + assertEquals((double)4, display.getCellLength()); assertEquals("n/a", display.getDefaultAlternate()); String[] tags = display.getAllowedTags(); assertNotNull(tags); @@ -142,14 +142,14 @@ assertNull(display.measure(null)); DisplayTool.Measurements dims = display.measure(""); assertNotNull(dims); - assertEquals(1, dims.getHeight()); - assertEquals(0, dims.getWidth()); + assertEquals((double)1, dims.getHeight()); + assertEquals((double)0, dims.getWidth()); dims = display.measure("twelve chars"); - assertEquals(12, dims.getWidth()); - assertEquals(1, dims.getHeight()); + assertEquals((double)12, dims.getWidth()); + assertEquals((double)1, dims.getHeight()); dims = display.measure("one\ntwo\nthree"); - assertEquals(5, dims.getWidth()); - assertEquals(3, dims.getHeight()); + assertEquals((double)5, dims.getWidth()); + assertEquals((double)3, dims.getHeight()); } public @Test void methodMessage_StringObjectVarArgs() throws Exception @@ -242,7 +242,7 @@ { DisplayTool display = new DisplayTool(); display.setCellLength(10); - assertEquals(10, display.getCellLength()); + assertEquals((double)10, display.getCellLength()); } public @Test void methodSetCellSuffix_String() throws Exception @@ -277,7 +277,7 @@ { DisplayTool display = new DisplayTool(); display.setTruncateLength(5); - assertEquals(5, display.getTruncateLength()); + assertEquals((double)5, display.getTruncateLength()); } public @Test void methodSetTruncateSuffix_String() throws Exception @@ -457,4 +457,4 @@ } } -} \ No newline at end of file +} --- a/src/test/java/org/apache/velocity/tools/generic/LinkToolTests.java +++ b/src/test/java/org/apache/velocity/tools/generic/LinkToolTests.java @@ -248,7 +248,7 @@ LinkTool link = newInstance(); assertNull(link.getPort()); link = newInstance(LinkTool.PORT_KEY, 42); - assertEquals(42, link.getPort()); + assertEquals(new Integer(42), link.getPort()); } public @Test void methodPort_Object() throws Exception @@ -256,15 +256,15 @@ LinkTool link = newInstance(); assertNull(link.port(null).getPort()); assertNull(link.port(":asd").getPort()); - assertEquals(1, link.port(1).getPort()); - assertEquals(42, link.port("42").getPort()); + assertEquals(new Integer(1), link.port(1).getPort()); + assertEquals(new Integer(42), link.port("42").getPort()); } public @Test void methodSetPort_Object() throws Exception { LinkTool link = newInstance(); link.setPort(42); - assertEquals(42, link.getPort()); + assertEquals(new Integer(42), link.getPort()); } public @Test void methodGetPath() throws Exception @@ -845,4 +845,4 @@ } } - \ No newline at end of file + --- a/src/test/java/org/apache/velocity/tools/generic/LoopToolTests.java +++ b/src/test/java/org/apache/velocity/tools/generic/LoopToolTests.java @@ -323,45 +323,45 @@ { LoopTool loop = new LoopTool(); Iterator i = loop.watch(ARRAY); - assertEquals(0, loop.getCount()); + assertEquals(new Integer(0), loop.getCount()); assertNull(loop.getIndex()); i.next(); - assertEquals(1, loop.getCount()); - assertEquals(0, loop.getIndex()); + assertEquals(new Integer(1), loop.getCount()); + assertEquals(new Integer(0), loop.getIndex()); i.next(); - assertEquals(2, loop.getCount()); - assertEquals(1, loop.getIndex()); + assertEquals(new Integer(2), loop.getCount()); + assertEquals(new Integer(1), loop.getIndex()); i.next(); - assertEquals(3, loop.getCount()); - assertEquals(2, loop.getIndex()); + assertEquals(new Integer(3), loop.getCount()); + assertEquals(new Integer(2), loop.getIndex()); loop.pop(); // test that skipped iterations are still included i = loop.watch(ARRAY); loop.skip(2); - assertEquals(2, loop.getCount()); - assertEquals(1, loop.getIndex()); + assertEquals(new Integer(2), loop.getCount()); + assertEquals(new Integer(1), loop.getIndex()); } public @Test void methodGetCountOrGetIndex_String() throws Exception { LoopTool loop = new LoopTool(); Iterator i = loop.watch(ARRAY, "i"); - assertEquals(0, loop.getCount("i")); + assertEquals(new Integer(0), loop.getCount("i")); assertNull(loop.getIndex("i")); i.next(); - assertEquals(1, loop.getCount("i")); - assertEquals(0, loop.getIndex("i")); + assertEquals(new Integer(1), loop.getCount("i")); + assertEquals(new Integer(0), loop.getIndex("i")); Iterator j = loop.watch(ARRAY, "j"); loop.skip(2); - assertEquals(2, loop.getCount("j")); - assertEquals(1, loop.getIndex("j")); - assertEquals(1, loop.getCount("i")); - assertEquals(0, loop.getIndex("i")); + assertEquals(new Integer(2), loop.getCount("j")); + assertEquals(new Integer(1), loop.getIndex("j")); + assertEquals(new Integer(1), loop.getCount("i")); + assertEquals(new Integer(0), loop.getIndex("i")); // check short syntax too - assertEquals(2, loop.get("count_j")); - assertEquals(1, loop.get("index_j")); - assertEquals(1, loop.get("count_i")); - assertEquals(0, loop.get("index_i")); + assertEquals(new Integer(2), loop.get("count_j")); + assertEquals(new Integer(1), loop.get("index_j")); + assertEquals(new Integer(1), loop.get("count_i")); + assertEquals(new Integer(0), loop.get("index_i")); } public @Test void aliasMethods() throws Exception @@ -403,15 +403,15 @@ public @Test void method_getDepth() throws Exception { LoopTool loop = new LoopTool(); - assertEquals(0, loop.getDepth()); + assertEquals((double)0, loop.getDepth()); loop.watch(ARRAY); - assertEquals(1, loop.getDepth()); + assertEquals((double)1, loop.getDepth()); loop.watch(ARRAY); - assertEquals(2, loop.getDepth()); + assertEquals((double)2, loop.getDepth()); loop.pop(); - assertEquals(1, loop.getDepth()); + assertEquals((double)1, loop.getDepth()); loop.pop(); - assertEquals(0, loop.getDepth()); + assertEquals((double)0, loop.getDepth()); } } debian/patches/01_dont_copy_test_lib.diff0000644000000000000000000000303211534553563015642 0ustar Description: Don't try to copy some JAR files into "lib" directory. Author: Damien Raude-Morvan Origin: vendor Forwarded: not-needed Last-Update: 2011-03-06 --- a/download.xml +++ b/download.xml @@ -352,8 +352,6 @@ - - --- a/examples.xml +++ b/examples.xml @@ -53,13 +53,6 @@ - - - - - - - @@ -69,8 +62,6 @@ - - debian/docs0000644000000000000000000000006311534553563010052 0ustar CONTRIBUTORS README.txt STATUS WHY_THREE_JARS.txt debian/control0000644000000000000000000000414211630545655010604 0ustar Source: velocity-tools Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Damien Raude-Morvan Build-Depends: cdbs, debhelper (>= 7), default-jdk, ant Build-Depends-Indep: antlr, libcommons-beanutils-java, libcommons-collections3-java, libcommons-digester-java, libcommons-lang-java, libcommons-logging-java, libcommons-validator-java, liboro-java, libservlet2.5-java, libdom4j-java, velocity, junit4, ant-optional, maven-repo-helper Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/velocity-tools Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/velocity-tools Homepage: http://velocity.apache.org/tools/ Package: libvelocity-tools-java Architecture: all Depends: ${misc:Depends}, libcommons-beanutils-java, libcommons-collections3-java, libcommons-digester-java, libcommons-lang-java, libcommons-logging-java, libcommons-validator-java, liboro-java, libservlet2.5-java, velocity, libdom4j-java Description: collection of useful tools for Velocity template engine The VelocityTools project is a collection of useful Java classes (aka tools), as well as infrastructure to easily, automatically and transparently make these tools available to Velocity templates. . Project include easy integration of Velocity into the view-layer of web applications (via the VelocityViewTag and VelocityViewServlet) and integration with Struts 1.x applications. Package: libvelocity-tools-java-doc Architecture: all Section: doc Depends: ${misc:Depends} Suggests: libvelocity-tools-java Description: collection of useful tools for Velocity template engine - documentation The VelocityTools project is a collection of useful Java classes (aka tools), as well as infrastructure to easily, automatically and transparently make these tools available to Velocity templates. . Project include easy integration of Velocity into the view-layer of web applications (via the VelocityViewTag and VelocityViewServlet) and integration with Struts 1.x applications. . This package provides the API documentation for Velocity Tools. debian/watch0000644000000000000000000000016311161257774010232 0ustar version=3 http://www.apache.org/dist/velocity/tools/([\d\.]+)/velocity-tools-([\d\.]+)-src\.tar\.gz debian uupdate debian/source/0000755000000000000000000000000011630666663010503 5ustar debian/source/format0000644000000000000000000000001411360175200011667 0ustar 3.0 (quilt) debian/libvelocity-tools-java.poms0000644000000000000000000000001011257234650014464 0ustar pom.xml debian/changelog0000644000000000000000000000525411630666470011057 0ustar velocity-tools (2.0-2) unstable; urgency=low * d/control: Depends on servlet2.5 instead of 2.4. * d/control: Bump Standards-Version to 3.9.2 (no changes needed). -- Damien Raude-Morvan Sun, 04 Sep 2011 14:21:11 +0200 velocity-tools (2.0-1) unstable; urgency=low * New upstream release. * Bump Standards-Version to 3.9.1 (no changes needed). * d/README.source: drop, useless since 3.0 (quilt) switch. * d/rules: Add servlet-api-2.5 jsp-api-2.1 dom4j to DEB_JARS * d/control: Build-Depends on libdom4j-java -- Damien Raude-Morvan Sun, 06 Mar 2011 01:33:58 +0100 velocity-tools (1.4-4) unstable; urgency=low * Team Upload [ Damien Raude-Morvan ] * Bump debhelper compat to 7 * Use commons-collections 3.x: - Build-Depends and Depends on libcommons-collection3-java - Update classpath in DEB_JARS from debian/rules [ Torsten Werner ] * Let 'maintainers' start with uppercase M. * Update Standards-Version: 3.8.4. * Switch to source format 3.0. -- Torsten Werner Sun, 11 Apr 2010 00:20:58 +0200 velocity-tools (1.4-3) unstable; urgency=low * Set Maintainer field to Debian Java Team * Add myself as Uploaders * Switch to Quilt patch system: - Refresh all patchs - Remove B-D on dpatch, Add B-D on quilt - Include patchsys-quilt.mk in debian/rules * Bump Standards-Version to 3.8.3: - Add a README.source to describe patch system * Build-Depends on default-jdk instead of default-jdk-builddep because we don't build a native GCJ package. * Install api documentation to /usr/share/doc/libvelocity-tools-java/api/ * Maven POMs: - Add a Build-Depends-Indep dependency on maven-repo-helper - Use mh_installpoms and mh_installjar to install the POM and the jar to the Maven repository * Update my email address -- Damien Raude-Morvan Fri, 25 Sep 2009 23:38:50 +0200 velocity-tools (1.4-2) unstable; urgency=low * debian/patches/02_junit_45.dpatch: compatibility patch for JUnit 4.5. (Closes: #533967) * debian/docs: include WHY_THREE_JARS.txt in package * debian/rules: New generic.jar module activated - Add "jar.generic" Ant target to DEB_ANT_BUILD_TARGET - Install generic.jar file * Bump Standards-Version to 3.8.2: no changes needed. -- Damien Raude-Morvan Wed, 24 Jun 2009 00:25:56 +0200 velocity-tools (1.4-1) unstable; urgency=low * Initial release. (Closes: #497436) * Build-Depend on default-jdk-builddep instead of java-gcj-compat-dev * Include showcase and simple examples in libvelocity-tools-java-doc -- Damien Raude-Morvan Mon, 16 Mar 2009 00:35:33 +0100 debian/rules0000755000000000000000000000270311534553563010262 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk JAVA_HOME := /usr/lib/jvm/default-java ANT_HOME := /usr/share/ant DEB_JARS := antlr commons-beanutils commons-collections3 commons-digester commons-lang commons-logging commons-validator oro servlet-api-2.5 jsp-api-2.1 velocity junit4 ant-junit dom4j DEB_ANT_BUILD_TARGET := jar.view jar.generic javadoc #DEB_ANT_CHECK_TARGET := test.generic DEB_ANT_CLEAN_TARGET := clean DEB_ANT_ARGS := -Dskip-download=true API_DOCS := docs/javadoc/* binary-post-install/lib$(DEB_SOURCE_PACKAGE)-java:: # Generic JAR mh_installpoms -plib$(DEB_SOURCE_PACKAGE)-java mh_installjar -plib$(DEB_SOURCE_PACKAGE)-java -l pom.xml -n$(DEB_SOURCE_PACKAGE)-generic dist/$(DEB_SOURCE_PACKAGE)-generic-$(DEB_UPSTREAM_VERSION).jar # View JAR dh_install -plib$(DEB_SOURCE_PACKAGE)-java dist/$(DEB_SOURCE_PACKAGE)-view-$(DEB_UPSTREAM_VERSION).jar usr/share/java dh_link -plib$(DEB_SOURCE_PACKAGE)-java usr/share/java/$(DEB_SOURCE_PACKAGE)-view-$(DEB_UPSTREAM_VERSION).jar usr/share/java/$(DEB_SOURCE_PACKAGE)-view.jar clean:: -rm -rf debian/tmp binary-post-install/lib$(DEB_SOURCE_PACKAGE)-java-doc:: dh_install -plib$(DEB_SOURCE_PACKAGE)-java-doc $(API_DOCS) usr/share/doc/lib$(DEB_SOURCE_PACKAGE)-java/api # Rename content directory to velocity-tools-X.Y in orig.tar.gz get-orig-source: uscan --force-download --rename --repack debian/copyright0000644000000000000000000000217311257234650011131 0ustar This package was debianized by Damien Raude-Morvan on Thu, 27 Aug 2008 20:59:38 +0200. It was downloaded from http://www.apache.org/dist/velocity/tools/ Upstream Author: The Apache Software Foundation. Copyright: Copyright (C) 2000-2006 The Apache Software Foundation License: 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. The full text of the Apache-2.0 license can be found in `/usr/share/common-licenses/Apache-2.0' on Debian systems. The Debian packaging is Copyright 2008, Damien Raude-Morvan and is licensed under the Apache-2.0, see `/usr/share/common-licenses/Apache-2.0'. debian/README.Debian0000644000000000000000000000047211161257774011245 0ustar VelocityStruts module --------------------- This package doesn't contains the struts part (a.k.a. VelocityStruts module) because it need Struts 1.3.x which is not yet in Debian (see Debian bug #419761). For now, we only provide VelocityView (including Generic tools). -- Damien Raude-Morvan debian/compat0000644000000000000000000000000211303602253010357 0ustar 7 debian/libvelocity-tools-java-doc.doc-base0000644000000000000000000000051111257234650015734 0ustar Document: libvelocity-tools-java-doc Title: API Javadoc for Velocity Tools Author: Velocity Tools developers Abstract: This is the API Javadoc provided by the Velocity Tools library. Section: Programming Format: HTML Index: /usr/share/doc/libvelocity-tools-java/api/index.html Files: /usr/share/doc/libvelocity-tools-java/api/* debian/maven.rules0000644000000000000000000000013211257235074011352 0ustar javax.servlet servlet-api jar * commons-collections commons-collections jar s/3\..*/3.x/ debian/libvelocity-tools-java-doc.examples0000644000000000000000000000004511161257774016105 0ustar examples/showcase/ examples/simple/ debian/TODO0000644000000000000000000000034511161257774007673 0ustar - Launch FULL unit tests (the "test.view" Ant target) during build need a Jetty servlet/JSP container and some more B-D. - Package the struts 1.3.x module need Struts 1.3.x which is not yet in Debian (see Debian bug #419761)