debian/0000775000000000000000000000000011770113372007172 5ustar debian/rules0000775000000000000000000000146411770075524010265 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk PACKAGE := $(DEB_SOURCE_PACKAGE) VERSION := $(DEB_UPSTREAM_VERSION) JAVA_HOME := /usr/lib/jvm/default-java DEB_JARS := ant-nodeps junit commons-lang ant-junit DEB_ANT_BUILD_TARGET := package #javadoc DEB_ANT_BUILDFILE := /usr/share/maven-ant-helper/maven-build.xml DEB_ANT_ARGS := -Dbasedir=$(realpath .) -Dpackage=$(PACKAGE) -Dbin.package=$(PACKAGE) -Dversion=$(VERSION) binary-post-install/$(PACKAGE):: mh_installpoms -p$(PACKAGE) mh_installjar -p$(PACKAGE) -l pom.xml target/commons-cli-$(VERSION).jar clean:: -rm -rf debian/tmp get-orig-source: -uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename debian/maven.rules0000664000000000000000000000003511770075524011360 0ustar junit junit jar s/3\..*/3.x/ debian/control0000664000000000000000000000175211770103243010576 0ustar Source: libcommons-cli-java Section: java Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian Java Maintainers Uploaders: Michael Koch , Ludovic Claude Build-Depends: debhelper (>= 5), cdbs (>= 0.4.8), default-jdk Build-Depends-Indep: maven-ant-helper, maven-repo-helper, ant, ant-optional, libcommons-lang-java (>= 2.0), junit Standards-Version: 3.8.4 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/libcommons-cli-java Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/libcommons-cli-java/ Homepage: http://commons.apache.org/cli/ Package: libcommons-cli-java Architecture: all Depends: ${misc:Depends}, libcommons-lang-java (>= 2.0) Description: API for working with the command line arguments and options You define arguments you want to parse, parse arguments the user entered and then you can retrieve them like properties debian/copyright0000664000000000000000000000145711770075524011142 0ustar This package was debianized by Arnaud Vandyck on Mon, 27 Oct 2003 15:07:08 +0200. It was downloaded from http://commons.apache.org/cli Upstream Authors: James Strachan , Bob McWhirter , John Keyes , Rob Oxspring , Emmanuel Bourg , Peter Donald, Brian Egge, Berin Loritsch , Peter Maddocks , Andrew Shirley Copyright: 2002-2009 The Apache Software Foundation License: Apache-2.0 On Debian systems the full text of the Apache License can be found in `/usr/share/common-licenses/Apache-2.0'. debian/build.properties0000664000000000000000000000027411770112602012405 0ustar javadoc.dir=target/api build.sourceDirectory=src/java build.testSourceDirectory=src/test build.directory=target #maven.test.skip=true ant.build.javac.target=1.4 ant.build.javac.source=1.4 debian/docs0000664000000000000000000000004411770075524010051 0ustar README.txt RELEASE-NOTES.txt docs/* debian/watch0000664000000000000000000000014511770075524010231 0ustar version=3 http://www.apache.org/dist/commons/cli/source/commons-cli-(.*)-src\.tar\.gz debian uupdate debian/changelog0000664000000000000000000001721511770112731011050 0ustar libcommons-cli-java (1.2-3ubuntu1) quantal; urgency=low * d/patches/CLI-193.patch: Cherry picked patch from upstream VCS to ensure that wrap width is never exceeded when printing help messages which can result in exceptions (LP: #944546). * d/build.properties: Fix test source directory location and enable test suite execution during build process. -- James Page Tue, 19 Jun 2012 15:00:56 +0100 libcommons-cli-java (1.2-3build1) quantal; urgency=low * No-change rebuild with openjdk-7 as default-jdk. -- James Page Fri, 18 May 2012 11:41:30 +0100 libcommons-cli-java (1.2-3) unstable; urgency=low * Team upload. * Merge changes from Ubuntu: - debian/ant.properties: Build java2 compatible code. * Remove Arnaud and Paul from Uploaders list. * Switch to source format 3.0. * Update Standards-Version: 3.8.4. -- Torsten Werner Sat, 08 May 2010 21:14:11 +0200 libcommons-cli-java (1.2-2ubuntu1) lucid; urgency=low * Merge with Debian; remaining changes: - debian/ant.properties: Build java2 compatible code. -- Matthias Klose Tue, 27 Oct 2009 15:21:49 +0100 libcommons-cli-java (1.2-2) unstable; urgency=low * Upload to unstable. -- Torsten Werner Sun, 09 Aug 2009 11:55:13 +0200 libcommons-cli-java (1.2-1) experimental; urgency=low [ Ludovic Claude ] * New upstream version (Closes: #530623) * Add myself to Uploaders * Change section to java, bump up Standards-Version to 3.8.1 * Change the dependency on java-gcj to default-jdk for Build-Depend * Add Build-Depends on maven-ant-helper and use its maven-build.xml file to build the package as the build system has switched to Maven. * Remove the dependencies on java runtimes on the binary package as it's a library (avoids introducing dependencies on graphics in a headless environment) * Add ${misc:Depends} to Depends to clear Lintian warnings * Add the Maven POM to the package, * Add a Build-Depends-Indep dependency on maven-repo-helper * Use mh_installpom and mh_installjar to install the POM and the jar to the Maven repository * Remove MultOption patch as it doesn't apply anymore and seems solved upstream. [ Emmanuel Bourg ] * Update of the URLs * Rename Jakarta Commons to Apache Commons -- Ludovic Claude Thu, 02 Jul 2009 11:30:49 +0100 libcommons-cli-java (1.1-3ubuntu3) karmic; urgency=low * Pick the following changes from version 1.2-1: - Add the Maven POM to the package, - Add a Build-Depends-Indep dependency on maven-repo-helper - Use mh_installpom and mh_installjar to install the POM and the jar to the Maven repository -- Torsten Werner Sun, 18 Oct 2009 20:30:27 +0200 libcommons-cli-java (1.1-3ubuntu2) karmic; urgency=low * debian/ant.properties: Build java2 compatible code. -- Thierry Carrez Mon, 24 Aug 2009 11:19:04 +0200 libcommons-cli-java (1.1-3ubuntu1) karmic; urgency=low * debian/control: Set libcommons-cli-java runtime dependency on "default-jre-headless | java2-runtime-headless" (LP: #387884) * debian/control, debian/rules: Build-depend on default-jdk -- Thierry Carrez Tue, 16 Jun 2009 15:15:53 +0200 libcommons-cli-java (1.1-3) unstable; urgency=low * Added build-depends-indep for ant-optional. (Closes: #473954) -- Paul Cager Wed, 02 Apr 2008 23:38:26 +0100 libcommons-cli-java (1.1-2) unstable; urgency=low * Corrected copyright - contained wrong license (Closes: #468947) * Handles mulitple options (e.g. -D) (Closes: #469082) - patch MultOptions.patch * Run Junit tests during build. - removed sysclasspath=only in ant.properties. - added ant's JUnit jar to classpath. * New format commons homepage URL. * Added myself to Uploaders. -- Paul Cager Sat, 22 Mar 2008 12:40:55 +0000 libcommons-cli-java (1.1-1) unstable; urgency=low * New upstream release. - added patches/disable-testsuite.patch to make build work * Added Vcs-Svn and Vcs-Browser fields. * Updated Standards-Version to 3.7.3. -- Michael Koch Mon, 31 Dec 2007 00:15:26 +0100 libcommons-cli-java (1.0-11) unstable; urgency=low * Fixed Homepage field in debian/control. Closes: #446792. -- Michael Koch Tue, 23 Oct 2007 21:03:48 +0200 libcommons-cli-java (1.0-10) unstable; urgency=low * Fixed jar name and link to jar. Closes: #446008. -- Michael Koch Tue, 09 Oct 2007 22:02:45 +0200 libcommons-cli-java (1.0-9) unstable; urgency=low * Let libcommons-cli-java depend on libcommons-lang-java. Closes: #445508. * Removed dependency on libcommons-loggig-java. Not used. * Use java-gcj-compat instead of kaffe. * Removed debian/dirs, debian/install and debian/links and do this in debian/rules. * Removed debian/README.Debian as it didn't apply anymore. * Moved debhelper and cdbs to Build-Depends. * Updated debhelper level to 5. * Updated watch file to match new upstream naming scheme. * Removed Wolfgang and added myself to Uploaders. * Updated Standards-Version to 3.7.2. -- Michael Koch Sat, 06 Oct 2007 17:15:10 +0200 libcommons-cli-java (1.0-8) unstable; urgency=low * Removed explicit usage of jikes build compiler property for kaffe jikes -> ecj transition * Removed jikes from build-dependencies * Removed Takashi, Ola, Stefan from Uploaders - never uploaded this package * Standards-Version 3.6.2 (no changes) * Added myself to uploaders -- Wolfgang Baer Fri, 6 Jan 2006 19:25:50 +0100 libcommons-cli-java (1.0-7) unstable; urgency=low * libant1.6-java to ant transition -- Arnaud Vandyck Sat, 20 Aug 2005 19:44:58 +0200 libcommons-cli-java (1.0-6) unstable; urgency=low * corrected the epoch version of kaffe dependency (closes: #302011) -- Arnaud Vandyck Sun, 3 Apr 2005 12:50:38 +0200 libcommons-cli-java (1.0-5) unstable; urgency=low * debian/control: typo. Thanks to Stuart Brady (closes: #286586) * added a watch file. * changed dependency from libant1.5-java to libant1.6-java -- Arnaud Vandyck Mon, 7 Feb 2005 12:13:43 +0100 libcommons-cli-java (1.0-4) unstable; urgency=low * Move to main: libcommons-logging-java is now in main, every dependencies are in main, the package is ready to move to main * removed dpatch dependency and using the cdbs simple patch sys facility, also, dependency with kaffe updated to 1.1.4 so the patch is no more needed * added gij and sablevm as alternative JVM * package now build with kaffe (1.1.4), libant1.5-java and jikes * debian/patches: no more patch neeeded -- Arnaud Vandyck Tue, 4 May 2004 17:11:58 +0200 libcommons-cli-java (1.0-3) unstable; urgency=low * debian/control (Section): goes to contrib because of libcommons-logging-java (will investigate why this package is in contrib), and because of libcommons-lang-java. This package is in contrib because it fails building with kaffe 1.1.1 because of the java.util.TimeZone.SHORT property that does not exist in this version! -- Arnaud Vandyck Fri, 7 Nov 2003 11:21:41 +0100 libcommons-cli-java (1.0-2) unstable; urgency=low * debian/changelog: - added uploader field. -- Arnaud Vandyck Wed, 29 Oct 2003 11:00:45 +0100 libcommons-cli-java (1.0-1) unstable; urgency=low * Initial Release (closes: #217804). -- Arnaud Vandyck Mon, 27 Oct 2003 15:19:33 +0100 debian/compat0000664000000000000000000000000211770075524010376 0ustar 5 debian/source/0000775000000000000000000000000011770113372010472 5ustar debian/source/format0000664000000000000000000000001411770075524011706 0ustar 3.0 (quilt) debian/libcommons-cli-java.poms0000664000000000000000000000002411770075524013722 0ustar pom.xml --no-parent debian/patches/0000775000000000000000000000000011770113372010621 5ustar debian/patches/CLI-193.patch0000664000000000000000000000753311770103007012565 0ustar Description: Ensure the wrap width is never exceeded and cut the words longer that the width if necessary. Origin: https://github.com/apache/commons-cli/commit/777cb81088d47472df21a452edd5ba568d4b3fdf Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libcommons-cli-java/+bug/944546 Index: libcommons-cli-java/src/java/org/apache/commons/cli/HelpFormatter.java =================================================================== --- libcommons-cli-java.orig/src/java/org/apache/commons/cli/HelpFormatter.java 2012-06-19 14:18:14.240915000 +0100 +++ libcommons-cli-java/src/java/org/apache/commons/cli/HelpFormatter.java 2012-06-19 14:58:33.611532761 +0100 @@ -853,8 +853,9 @@ /** * Finds the next text wrap position after startPos for the * text in text with the column width width. - * The wrap point is the last postion before startPos+width having a - * whitespace character (space, \n, \r). + * The wrap point is the last position before startPos+width having a + * whitespace character (space, \n, \r). If there is no whitespace character + * before startPos+width, it will return startPos+width. * * @param text The text being searched for the wrap position * @param width width of the wrapped text @@ -865,8 +866,8 @@ */ protected int findWrapPos(String text, int width, int startPos) { - int pos = -1; - + int pos; + // the line ends before the max wrap pos or a new line char found if (((pos = text.indexOf('\n', startPos)) != -1 && pos <= width) || ((pos = text.indexOf('\t', startPos)) != -1 && pos <= width)) @@ -896,17 +897,10 @@ return pos; } - // must look for the first whitespace chearacter after startPos - // + width + // if we didn't find one, simply chop at startPos+width pos = startPos + width; - - while ((pos <= text.length()) && ((c = text.charAt(pos)) != ' ') - && (c != '\n') && (c != '\r')) - { - ++pos; - } - - return (pos == text.length()) ? (-1) : pos; + + return pos == text.length() ? -1 : pos; } /** Index: libcommons-cli-java/src/test/org/apache/commons/cli/HelpFormatterTest.java =================================================================== --- libcommons-cli-java.orig/src/test/org/apache/commons/cli/HelpFormatterTest.java 2012-06-19 14:18:14.000000000 +0100 +++ libcommons-cli-java/src/test/org/apache/commons/cli/HelpFormatterTest.java 2012-06-19 14:58:33.611532761 +0100 @@ -44,9 +44,28 @@ assertEquals("wrap position", 7, hf.findWrapPos(text, 8, 0)); //starting from 8 must give -1 - the wrap pos is after end assertEquals("wrap position 2", -1, hf.findWrapPos(text, 8, 8)); - //if there is no a good position before width to make a wrapping look for the next one + + // words longer than the width are cut text = "aaaa aa"; - assertEquals("wrap position 3", 4, hf.findWrapPos(text, 3, 0)); + assertEquals("wrap position 3", 3, hf.findWrapPos(text, 3, 0)); + + // last word length is equal to the width + text = "aaaaaa aaaaaa"; + assertEquals("wrap position 4", 6, hf.findWrapPos(text, 6, 0)); + assertEquals("wrap position 4", -1, hf.findWrapPos(text, 6, 7)); + } + + public void testRenderWrappedTextWordCut() + { + int width = 7; + int padding = 0; + String text = "Thisisatest."; + String expected = "Thisisa" + EOL + + "test."; + + StringBuffer sb = new StringBuffer(); + new HelpFormatter().renderWrappedText(sb, width, padding, text); + assertEquals("cut and wrap", expected, sb.toString()); } public void testPrintWrapped() throws Exception debian/patches/series0000664000000000000000000000001611770102606012031 0ustar CLI-193.patch