aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLexManos <LexManos@gmail.com>2018-11-06 11:12:45 -0800
committerLexManos <LexManos@gmail.com>2018-11-06 11:12:45 -0800
commit564ddae6a4dbc6946092821183708283356c618d (patch)
treef3f78c464f77b5bf62a897f91612ba99d14aeaf2 /src
parent7fcba8a90b00ede253ba75a697ec6ce9bdd20d39 (diff)
downloadArtifactural-564ddae6a4dbc6946092821183708283356c618d.tar.gz
Artifactural-564ddae6a4dbc6946092821183708283356c618d.tar.bz2
Artifactural-564ddae6a4dbc6946092821183708283356c618d.zip
Quiet debug messages.
Diffstat (limited to 'src')
-rw-r--r--src/gradlecomp/java/com/amadornes/artifactural/gradle/GradleRepositoryAdapter.java20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gradlecomp/java/com/amadornes/artifactural/gradle/GradleRepositoryAdapter.java b/src/gradlecomp/java/com/amadornes/artifactural/gradle/GradleRepositoryAdapter.java
index de629fc..834905c 100644
--- a/src/gradlecomp/java/com/amadornes/artifactural/gradle/GradleRepositoryAdapter.java
+++ b/src/gradlecomp/java/com/amadornes/artifactural/gradle/GradleRepositoryAdapter.java
@@ -190,6 +190,12 @@ public class GradleRepositoryAdapter extends AbstractArtifactRepository implemen
private class GeneratingFileResourceRepository implements FileResourceRepository {
private final FileSystem fileSystem = FileSystems.getDefault();
+ private void debug(String message) {
+ //System.out.println(message);
+ }
+ private void log(String message) {
+ System.out.println(message);
+ }
@Override
public ExternalResourceRepository withProgressLogging() {
@@ -198,13 +204,13 @@ public class GradleRepositoryAdapter extends AbstractArtifactRepository implemen
@Override
public LocalBinaryResource localResource(File file) {
- System.out.println("localResource: " + file);
+ debug("localResource: " + file);
return null;
}
@Override
public LocallyAvailableExternalResource resource(File file) {
- System.out.println("resource(File): " + file);
+ debug("resource(File): " + file);
return findArtifact(file.getAbsolutePath().replace('\\', '/'));
}
@@ -215,23 +221,23 @@ public class GradleRepositoryAdapter extends AbstractArtifactRepository implemen
@Override
public LocallyAvailableExternalResource resource(ExternalResourceName location, boolean revalidate) {
- System.out.println("resource(ExternalResourceName,boolean): " + location + ", " + revalidate);
+ debug("resource(ExternalResourceName,boolean): " + location + ", " + revalidate);
return findArtifact(location.getUri().getPath().replace('\\', '/'));
}
@Override
public LocallyAvailableExternalResource resource(File file, URI originUri, ExternalResourceMetaData originMetadata) {
- System.out.println("resource(File,URI,ExternalResourceMetaData): " + file + ", " + originUri + ", " + originMetadata);
+ debug("resource(File,URI,ExternalResourceMetaData): " + file + ", " + originUri + ", " + originMetadata);
return findArtifact(file.getAbsolutePath().replace('\\', '/'));
}
private LocallyAvailableExternalResource findArtifact(String path) {
if (path.startsWith(root)) {
String relative = path.substring(root.length());
- System.out.println(" Relative: " + relative);
+ debug(" Relative: " + relative);
Matcher matcher = URL_PATTERN.matcher(relative);
if (!matcher.matches()) {
- System.out.println(" Matcher Failed: " + relative);
+ log(" Matcher Failed: " + relative);
} else {
ArtifactIdentifier identifier = new SimpleArtifactIdentifier(
matcher.group("group").replace('/', '.'),
@@ -243,7 +249,7 @@ public class GradleRepositoryAdapter extends AbstractArtifactRepository implemen
return wrap(artifact, identifier);
}
} else {
- System.out.println("Unknown root: " + path);
+ log("Unknown root: " + path);
}
return new LocalFileStandInExternalResource(new File(path), fileSystem);
}