aboutsummaryrefslogtreecommitdiff
path: root/src/gradlecomp/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/gradlecomp/java/com')
-rw-r--r--src/gradlecomp/java/com/amadornes/artifactural/gradle/GradleRepositoryAdapter.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gradlecomp/java/com/amadornes/artifactural/gradle/GradleRepositoryAdapter.java b/src/gradlecomp/java/com/amadornes/artifactural/gradle/GradleRepositoryAdapter.java
index 834905c..64d6652 100644
--- a/src/gradlecomp/java/com/amadornes/artifactural/gradle/GradleRepositoryAdapter.java
+++ b/src/gradlecomp/java/com/amadornes/artifactural/gradle/GradleRepositoryAdapter.java
@@ -236,9 +236,7 @@ public class GradleRepositoryAdapter extends AbstractArtifactRepository implemen
String relative = path.substring(root.length());
debug(" Relative: " + relative);
Matcher matcher = URL_PATTERN.matcher(relative);
- if (!matcher.matches()) {
- log(" Matcher Failed: " + relative);
- } else {
+ if (matcher.matches()) {
ArtifactIdentifier identifier = new SimpleArtifactIdentifier(
matcher.group("group").replace('/', '.'),
matcher.group("name"),
@@ -247,6 +245,19 @@ public class GradleRepositoryAdapter extends AbstractArtifactRepository implemen
matcher.group("extension"));
Artifact artifact = repository.getArtifact(identifier);
return wrap(artifact, identifier);
+ } else if (relative.endsWith("maven-metadata.xml")) {
+ String tmp = relative.substring(0, relative.length() - "maven-metadata.xml".length() - 1);
+ int idx = tmp.lastIndexOf('/');
+ if (idx != -1) {
+ File ret = repository.getMavenMetadata(tmp.substring(0, idx - 1), tmp.substring(idx));
+ if (ret != null) {
+ return new LocalFileStandInExternalResource(ret, fileSystem);
+ }
+ }
+ } else if (relative.endsWith("/")) {
+ debug(" Directory listing not supported");
+ } else {
+ log(" Matcher Failed: " + relative);
}
} else {
log("Unknown root: " + path);