Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 45071 invoked from network); 3 Dec 2008 20:51:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2008 20:51:07 -0000 Received: (qmail 89993 invoked by uid 500); 3 Dec 2008 20:51:19 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 89934 invoked by uid 500); 3 Dec 2008 20:51:18 -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 89925 invoked by uid 99); 3 Dec 2008 20:51:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2008 12:51:18 -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; Wed, 03 Dec 2008 20:49:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3A65923888A6; Wed, 3 Dec 2008 12:50:46 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r723065 - in /ant/ivy/core/trunk: ./ src/java/org/apache/ivy/plugins/resolver/ test/java/org/apache/ivy/core/resolve/ test/repositories/norev/ test/repositories/norev/module3/ Date: Wed, 03 Dec 2008 20:50:45 -0000 To: notifications@ant.apache.org From: maartenc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081203205046.3A65923888A6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: maartenc Date: Wed Dec 3 12:50:45 2008 New Revision: 723065 URL: http://svn.apache.org/viewvc?rev=723065&view=rev Log: FIX: NullPointerException when resolving module wihout revision in the pattern (IVY-980) + junit test Added: ant/ivy/core/trunk/test/repositories/norev/ivy-latest.xml ant/ivy/core/trunk/test/repositories/norev/module3/ ant/ivy/core/trunk/test/repositories/norev/module3/module3.jar Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=723065&r1=723064&r2=723065&view=diff ============================================================================== --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Wed Dec 3 12:50:45 2008 @@ -94,6 +94,7 @@ - FIX: IO problem while parsing ivy file (Resetting to invalid mark) (IVY-975) - FIX: Cannot parse maven2 poms containing an UTF-8 BOM - FIX: listing possible token values doesn't work properly for the ibiblio resolver +- FIX: NullPointerException when resolving module wihout revision in the pattern (IVY-980) 2.0.0-rc2 ===================================== Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java?rev=723065&r1=723064&r2=723065&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java Wed Dec 3 12:50:45 2008 @@ -456,6 +456,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/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java?rev=723065&r1=723064&r2=723065&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java Wed Dec 3 12:50:45 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( Added: ant/ivy/core/trunk/test/repositories/norev/ivy-latest.xml URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/norev/ivy-latest.xml?rev=723065&view=auto ============================================================================== --- ant/ivy/core/trunk/test/repositories/norev/ivy-latest.xml (added) +++ ant/ivy/core/trunk/test/repositories/norev/ivy-latest.xml Wed Dec 3 12:50:45 2008 @@ -0,0 +1,27 @@ + + + + + + + + + + Added: ant/ivy/core/trunk/test/repositories/norev/module3/module3.jar URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/norev/module3/module3.jar?rev=723065&view=auto ============================================================================== --- ant/ivy/core/trunk/test/repositories/norev/module3/module3.jar (added) +++ ant/ivy/core/trunk/test/repositories/norev/module3/module3.jar Wed Dec 3 12:50:45 2008 @@ -0,0 +1 @@ +. \ No newline at end of file