From scm-return-11125-apmail-geronimo-scm-archive=geronimo.apache.org@geronimo.apache.org Fri Apr 07 01:26:03 2006 Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 24981 invoked from network); 7 Apr 2006 01:26:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Apr 2006 01:26:01 -0000 Received: (qmail 71481 invoked by uid 500); 7 Apr 2006 01:26:01 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 71450 invoked by uid 500); 7 Apr 2006 01:26:00 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 71430 invoked by uid 99); 7 Apr 2006 01:26:00 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Apr 2006 18:26:00 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 06 Apr 2006 18:26:00 -0700 Received: (qmail 24527 invoked by uid 65534); 7 Apr 2006 01:25:39 -0000 Message-ID: <20060407012539.24522.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r392149 - /geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java Date: Fri, 07 Apr 2006 01:25:39 -0000 To: scm@geronimo.apache.org From: ammulder@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: ammulder Date: Thu Apr 6 18:25:36 2006 New Revision: 392149 URL: http://svn.apache.org/viewcvs?rev=392149&view=rev Log: Don't ignore CARs that are unpacked directories (a bit of a hack, but hey) Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java?rev=392149&r1=392148&r2=392149&view=diff ============================================================================== --- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java (original) +++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java Thu Apr 6 18:25:36 2006 @@ -103,15 +103,34 @@ File file = files[i]; if (file.canRead()) { if (file.isDirectory()) { + File test = new File(file, "META-INF"); + if(test.exists() && test.isDirectory() && test.canRead() && groupId != null) { + String version = versionDir.getName(); + String fileHeader = artifactId + "-" + version + "."; - String nextGroupId; - if (groupId == null) { - nextGroupId = artifactId; - } else { - nextGroupId = groupId + "." + artifactId; - } + String fileName = file.getName(); + if (fileName.startsWith(fileHeader)) { + // type is everything after the file header + String type = fileName.substring(fileHeader.length()); + + if (!type.endsWith(".sha1") && !type.endsWith(".md5")) { + artifacts.add(new Artifact(groupId, + artifactId, + version, + type + )); + } + } + } else { // this is just part of the path to the artifact + String nextGroupId; + if (groupId == null) { + nextGroupId = artifactId; + } else { + nextGroupId = groupId + "." + artifactId; + } - artifacts.addAll(getArtifacts(nextGroupId, file)); + artifacts.addAll(getArtifacts(nextGroupId, file)); + } } else if (groupId != null) { String version = versionDir.getName(); String fileHeader = artifactId + "-" + version + ".";