From f9343a4fbadbb6807ea01d1360f00df108bb1ffd Mon Sep 17 00:00:00 2001 From: niuxuetao Date: Mon, 8 Feb 2016 14:05:57 +0100 Subject: [PATCH] r2.0.1 --- PaxmlAll/pom.xml | 2 +- PaxmlCore/pom.xml | 2 +- .../src/main/java/org/paxml/util/DBUtils.java | 14 ++++++++++---- .../src/main/java/org/paxml/util/PaxmlUtils.java | 5 +---- PaxmlExample/pom.xml | 2 +- PaxmlExecutable/pom.xml | 2 +- PaxmlSelenium/pom.xml | 2 +- PaxmlTestNG/pom.xml | 2 +- PaxmlWeb/pom.xml | 2 +- pom.xml | 2 +- 10 files changed, 19 insertions(+), 16 deletions(-) diff --git a/PaxmlAll/pom.xml b/PaxmlAll/pom.xml index e6047b9..f8b3cc7 100644 --- a/PaxmlAll/pom.xml +++ b/PaxmlAll/pom.xml @@ -8,7 +8,7 @@ paxml-root org.paxml - 2.0.0 + 2.0.1 4.0.0 diff --git a/PaxmlCore/pom.xml b/PaxmlCore/pom.xml index 0526273..8394b94 100644 --- a/PaxmlCore/pom.xml +++ b/PaxmlCore/pom.xml @@ -6,7 +6,7 @@ paxml-root org.paxml - 2.0.0 + 2.0.1 diff --git a/PaxmlCore/src/main/java/org/paxml/util/DBUtils.java b/PaxmlCore/src/main/java/org/paxml/util/DBUtils.java index f93b64d..2f10d31 100644 --- a/PaxmlCore/src/main/java/org/paxml/util/DBUtils.java +++ b/PaxmlCore/src/main/java/org/paxml/util/DBUtils.java @@ -17,6 +17,7 @@ package org.paxml.util; import java.io.ByteArrayInputStream; +import java.io.File; import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; @@ -38,10 +39,15 @@ public class DBUtils { public static final String H2_DRIVER_CLASS = "org.h2.Driver"; public static final String H2_USER = "sa"; public static final String H2_PASSWORD = ""; - - public static String getDefaultH2Url(){ - String file = PaxmlUtils.getFileUnderPaxmlHome("/data/h2", true).getAbsolutePath(); - return "jdbc:h2:" + file +";AUTO_SERVER=TRUE"; + + public static String getDefaultH2Url() { + String h2File = "/data/h2"; + File h2 = PaxmlUtils.getFileUnderPaxmlHome(h2File, false); + if (h2 == null) { + h2 = PaxmlUtils.getFileUnderUserHome(h2File); + } + String file = h2.getAbsolutePath(); + return "jdbc:h2:" + file + ";AUTO_SERVER=TRUE"; } public static void initDatabase(DataSource ds) { diff --git a/PaxmlCore/src/main/java/org/paxml/util/PaxmlUtils.java b/PaxmlCore/src/main/java/org/paxml/util/PaxmlUtils.java index 574155b..9374e3f 100644 --- a/PaxmlCore/src/main/java/org/paxml/util/PaxmlUtils.java +++ b/PaxmlCore/src/main/java/org/paxml/util/PaxmlUtils.java @@ -51,10 +51,7 @@ public class PaxmlUtils { public static final String PAXML_HOME_ENV_KEY = "PAXML_HOME"; public static File getPaxmlHome(boolean assert_PAXML_HOME) { - String paxmlHome = System.getenv(PAXML_HOME_ENV_KEY); - if (paxmlHome == null) { - paxmlHome = System.getProperty(PAXML_HOME_ENV_KEY); - } + String paxmlHome = getSystemProperty(PAXML_HOME_ENV_KEY); if (paxmlHome == null) { if (assert_PAXML_HOME) { throw new PaxmlRuntimeException("System environment variable 'PAXML_HOME' not set!"); diff --git a/PaxmlExample/pom.xml b/PaxmlExample/pom.xml index 4af368b..0953f55 100644 --- a/PaxmlExample/pom.xml +++ b/PaxmlExample/pom.xml @@ -8,7 +8,7 @@ paxml-root org.paxml - 2.0.0 + 2.0.1 PaxmlExample diff --git a/PaxmlExecutable/pom.xml b/PaxmlExecutable/pom.xml index f08cedb..018696e 100644 --- a/PaxmlExecutable/pom.xml +++ b/PaxmlExecutable/pom.xml @@ -6,7 +6,7 @@ paxml-root org.paxml - 2.0.0 + 2.0.1 4.0.0 diff --git a/PaxmlSelenium/pom.xml b/PaxmlSelenium/pom.xml index 4ebdaf1..cc338c8 100644 --- a/PaxmlSelenium/pom.xml +++ b/PaxmlSelenium/pom.xml @@ -7,7 +7,7 @@ paxml-root org.paxml - 2.0.0 + 2.0.1 PaxmlSelenium diff --git a/PaxmlTestNG/pom.xml b/PaxmlTestNG/pom.xml index bd54c6b..9836335 100644 --- a/PaxmlTestNG/pom.xml +++ b/PaxmlTestNG/pom.xml @@ -7,7 +7,7 @@ paxml-root org.paxml - 2.0.0 + 2.0.1 PaxmlTestNG diff --git a/PaxmlWeb/pom.xml b/PaxmlWeb/pom.xml index e7399c2..70669a7 100644 --- a/PaxmlWeb/pom.xml +++ b/PaxmlWeb/pom.xml @@ -7,7 +7,7 @@ paxml-root org.paxml - 2.0.0 + 2.0.1 PaxmlWeb diff --git a/pom.xml b/pom.xml index 2ca002c..7ae06eb 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ paxml-root org.paxml Paxml - 2.0.0 + 2.0.1 pom Paxml - Process Automation eXtensible Markup Language