drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [6/9] drill git commit: DRILL-3994: make classpath scanning work on windows
Date Thu, 05 Nov 2015 05:56:44 GMT
DRILL-3994: make classpath scanning work on windows


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/8d56962b
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/8d56962b
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/8d56962b

Branch: refs/heads/master
Commit: 8d56962bb8084724df9c89f007f0b1f1b99f8f95
Parents: 2bc16a9
Author: Julien Le Dem <julien@ledem.net>
Authored: Fri Oct 30 16:51:09 2015 -0700
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Wed Nov 4 20:55:54 2015 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/drill/common/scanner/BuildTimeScan.java  | 3 +++
 tools/fmpp/src/main/java/org/apache/drill/fmpp/mojo/FMPPMojo.java | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/8d56962b/common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java b/common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java
index ca4a37d..1de819e 100644
--- a/common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java
+++ b/common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java
@@ -123,6 +123,9 @@ public class BuildTimeScan {
     if (!basePath.endsWith("/")) {
       basePath = basePath + "/";
     }
+    if (!basePath.startsWith("/")) {
+      basePath = "/" + basePath;
+    }
     URL url = new URL("file:" + basePath);
     Set<URL> markedPaths = ClassPathScanner.getMarkedPaths();
     if (!markedPaths.contains(url)) {

http://git-wip-us.apache.org/repos/asf/drill/blob/8d56962b/tools/fmpp/src/main/java/org/apache/drill/fmpp/mojo/FMPPMojo.java
----------------------------------------------------------------------
diff --git a/tools/fmpp/src/main/java/org/apache/drill/fmpp/mojo/FMPPMojo.java b/tools/fmpp/src/main/java/org/apache/drill/fmpp/mojo/FMPPMojo.java
index dc6b5e3..e2756b0 100644
--- a/tools/fmpp/src/main/java/org/apache/drill/fmpp/mojo/FMPPMojo.java
+++ b/tools/fmpp/src/main/java/org/apache/drill/fmpp/mojo/FMPPMojo.java
@@ -120,7 +120,7 @@ public class FMPPMojo extends AbstractMojo {
           scope, config.getAbsolutePath(), templatesPath));
       final File tmp = Files.createTempDirectory("freemarker-tmp").toFile();
       String tmpPath = tmp.getAbsolutePath();
-      final String tmpPathNormalized = tmpPath.endsWith("/") ? tmpPath : tmpPath + "/";
+      final String tmpPathNormalized = tmpPath.endsWith(File.separator) ? tmpPath : tmpPath
+ File.separator;
       Settings settings = new Settings(new File("."));
       settings.set("sourceRoot", templatesPath);
       settings.set("outputRoot", tmp.getAbsolutePath());


Mime
View raw message