asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Blow (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[release-0.9.4-pre-rc]: [NO ISSUE] Support dir names in generated license files
Date Wed, 04 Apr 2018 03:06:09 GMT
Michael Blow has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2565

Change subject: [NO ISSUE] Support dir names in generated license files
......................................................................

[NO ISSUE] Support dir names in generated license files

Change-Id: I5af9d85fc95835d6177bdd32c9df6306e87255e3
---
M hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GenerateFileMojo.java
M hyracks-fullstack/hyracks/hyracks-test-support/src/main/java/org/apache/hyracks/test/support/LicensingTestBase.java
2 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/65/2565/1

diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GenerateFileMojo.java
b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GenerateFileMojo.java
index 0245eb3..e8625fc 100644
--- a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GenerateFileMojo.java
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/GenerateFileMojo.java
@@ -182,8 +182,8 @@
                 throw new IOException("Could not load template " + generation.getTemplate());
             }
 
-            outputDir.mkdirs();
             final File file = new File(outputDir, generation.getOutputFile());
+            file.getParentFile().mkdirs();
             getLog().info("Writing " + file + "...");
             try (final FileOutputStream fos = new FileOutputStream(file);
                     final Writer writer = new OutputStreamWriter(fos, StandardCharsets.UTF_8))
{
diff --git a/hyracks-fullstack/hyracks/hyracks-test-support/src/main/java/org/apache/hyracks/test/support/LicensingTestBase.java
b/hyracks-fullstack/hyracks/hyracks-test-support/src/main/java/org/apache/hyracks/test/support/LicensingTestBase.java
index 2fb8446..e2ab3a3 100644
--- a/hyracks-fullstack/hyracks/hyracks-test-support/src/main/java/org/apache/hyracks/test/support/LicensingTestBase.java
+++ b/hyracks-fullstack/hyracks/hyracks-test-support/src/main/java/org/apache/hyracks/test/support/LicensingTestBase.java
@@ -55,7 +55,7 @@
     protected void verifyMissingLicenses() throws IOException {
         for (String licenseArtifactName : getLicenseArtifactNames()) {
             final File licenseFile =
-                    new File(FileUtil.joinPath(installerDir, pathToLicensingFiles(), licenseArtifactName));
+                    new File(FileUtil.joinPath(getInstallerDir(), pathToLicensingFiles(),
licenseArtifactName));
             List<String> badLines = new ArrayList<>();
             for (String line : FileUtils.readLines(licenseFile, StandardCharsets.UTF_8))
{
                 if (line.matches("^\\s*MISSING:.*")) {
@@ -66,9 +66,13 @@
         }
     }
 
+    protected String getInstallerDir() {
+        return installerDir;
+    }
+
     protected void verifyAllRequiredArtifactsPresent() {
         for (String name : getRequiredArtifactNames()) {
-            final String fileName = FileUtil.joinPath(installerDir, pathToLicensingFiles(),
name);
+            final String fileName = FileUtil.joinPath(getInstallerDir(), pathToLicensingFiles(),
name);
             Assert.assertTrue(fileName + " missing", new File(fileName).exists());
         }
     }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2565
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5af9d85fc95835d6177bdd32c9df6306e87255e3
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: release-0.9.4-pre-rc
Gerrit-Owner: Michael Blow <mblow@apache.org>

Mime
View raw message