Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 20460 invoked from network); 15 Dec 2008 22:13:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Dec 2008 22:13:16 -0000 Received: (qmail 82418 invoked by uid 500); 15 Dec 2008 22:13:29 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 82395 invoked by uid 500); 15 Dec 2008 22:13:29 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 82381 invoked by uid 99); 15 Dec 2008 22:13:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2008 14:13:28 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2008 22:13:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7FCF323888A4; Mon, 15 Dec 2008 14:12:55 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r726842 - in /ant/ivy/core/branches/2.0.x: ./ src/java/org/apache/ivy/plugins/resolver/ test/java/org/apache/ivy/core/resolve/ test/repositories/norev/ test/repositories/norev/module3/ Date: Mon, 15 Dec 2008 22:12:55 -0000 To: notifications@ant.apache.org From: maartenc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081215221255.7FCF323888A4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: maartenc Date: Mon Dec 15 14:12:54 2008 New Revision: 726842 URL: http://svn.apache.org/viewvc?rev=726842&view=rev Log: FIX: NullPointerException when resolving module wihout revision in the pattern (IVY-980) (merged from trunk) Added: ant/ivy/core/branches/2.0.x/test/repositories/norev/ivy-latest.xml - copied unchanged from r723065, ant/ivy/core/trunk/test/repositories/norev/ivy-latest.xml ant/ivy/core/branches/2.0.x/test/repositories/norev/module3/ - copied from r723065, ant/ivy/core/trunk/test/repositories/norev/module3/ ant/ivy/core/branches/2.0.x/test/repositories/norev/module3/module3.jar - copied unchanged from r723065, ant/ivy/core/trunk/test/repositories/norev/module3/module3.jar Modified: ant/ivy/core/branches/2.0.x/ (props changed) ant/ivy/core/branches/2.0.x/CHANGES.txt ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java Propchange: ant/ivy/core/branches/2.0.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Dec 15 14:12:54 2008 @@ -1,2 +1,2 @@ /ant/ivy/core/branches/2.0.0-rc2:707177-709027 -/ant/ivy/core/trunk:695737,696014-696031,696442,698318-706770,709027-709034,709039-710178,720308-720591 +/ant/ivy/core/trunk:695737,696014-696031,696442,698318-706770,709027-709034,709039-710178,720308-720591,721305-723065 Modified: ant/ivy/core/branches/2.0.x/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/CHANGES.txt?rev=726842&r1=726841&r2=726842&view=diff ============================================================================== --- ant/ivy/core/branches/2.0.x/CHANGES.txt (original) +++ ant/ivy/core/branches/2.0.x/CHANGES.txt Mon Dec 15 14:12:54 2008 @@ -87,6 +87,7 @@ - FIX: Log levels aren't respected in certain cases using the standalone functionality (IVY-960) (thanks to Patrick Woodworth) - FIX: NPE in LogReportOutputter (IVY-961) +- FIX: NullPointerException when resolving module wihout revision in the pattern (IVY-980) 2.0.0-rc2 ===================================== Modified: ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java?rev=726842&r1=726841&r2=726842&view=diff ============================================================================== --- ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java (original) +++ ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java Mon Dec 15 14:12:54 2008 @@ -454,6 +454,8 @@ if (!isDynamic) { resolvedMrid = ModuleRevisionId.newInstance( resolvedMrid, dependencyConstraint.getRevision()); + } else if (ivyRef == null) { + resolvedMrid = systemMd.getMetadataArtifact().getModuleRevisionId(); } else if (ivyRef.getRevision() == null || ivyRef.getRevision().length() == 0) { resolvedMrid = ModuleRevisionId.newInstance(resolvedMrid, "working@" + getName()); Modified: ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java?rev=726842&r1=726841&r2=726842&view=diff ============================================================================== --- ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java (original) +++ ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java Mon Dec 15 14:12:54 2008 @@ -267,6 +267,15 @@ assertFalse(report.hasError()); } + public void testResolveLatestWithNoRevisionInPattern() throws Exception { + Ivy ivy = new Ivy(); + ivy.configure(new File("test/repositories/norev/ivysettings.xml").toURL()); + ResolveReport report = ivy.resolve(new File("test/repositories/norev/ivy-latest.xml").toURL(), + getResolveOptions(new String[] {"*"})); + assertNotNull(report); + assertFalse(report.hasError()); + } + public void testResolveNoRevisionInDep() throws Exception { // mod1.4 depends on mod1.6, in which the ivy file has no revision ResolveReport report = ivy.resolve(new File(