Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 98878 invoked from network); 16 Aug 2007 13:33:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Aug 2007 13:33:26 -0000 Received: (qmail 79379 invoked by uid 500); 16 Aug 2007 13:33:23 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 79342 invoked by uid 500); 16 Aug 2007 13:33:23 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 79323 invoked by uid 500); 16 Aug 2007 13:33:23 -0000 Received: (qmail 79320 invoked by uid 99); 16 Aug 2007 13:33:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2007 06:33:23 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2007 13:33:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CFA831A981A; Thu, 16 Aug 2007 06:33:01 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r566707 - in /ant/core/trunk/src: main/org/apache/tools/ant/taskdefs/Pack.java tests/antunit/taskdefs/gzip-test.xml Date: Thu, 16 Aug 2007 13:33:01 -0000 To: ant-cvs@apache.org From: jkf@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070816133301.CFA831A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jkf Date: Thu Aug 16 06:33:00 2007 New Revision: 566707 URL: http://svn.apache.org/viewvc?view=rev&rev=566707 Log: Pr 43016 improved error reporting on nothing to compress. Added: ant/core/trunk/src/tests/antunit/taskdefs/gzip-test.xml Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Pack.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Pack.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Pack.java?view=diff&rev=566707&r1=566706&r2=566707 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Pack.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Pack.java Thu Aug 16 06:33:00 2007 @@ -88,9 +88,14 @@ * @param a the resource to pack as a single element Resource collection. */ public void addConfigured(ResourceCollection a) { + if (a.size() == 0) { + throw new BuildException("No resource selected, " + getTaskName() + + " needs exactly one resource."); + } if (a.size() != 1) { - throw new BuildException("only single argument resource collections" - + " are supported as archives"); + throw new BuildException(getTaskName() + + " cannot handle multiple resources at once. (" + a.size() + + " resources were selected.)"); } setSrcResource((Resource) a.iterator().next()); } Added: ant/core/trunk/src/tests/antunit/taskdefs/gzip-test.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/gzip-test.xml?view=auto&rev=566707 ============================================================================== --- ant/core/trunk/src/tests/antunit/taskdefs/gzip-test.xml (added) +++ ant/core/trunk/src/tests/antunit/taskdefs/gzip-test.xml Thu Aug 16 06:33:00 2007 @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org