Removed unnecessary extra layer in resource folder structure.
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
|
@ -32,13 +32,13 @@ public class HalContext {
|
|||
static {
|
||||
if (FileUtil.find("build/resources/") != null)
|
||||
RESOURCE_ROOT = "build/resources";
|
||||
else if (FileUtil.find("resource/resource/") != null)
|
||||
RESOURCE_ROOT = "resource";
|
||||
else if (FileUtil.find("resources/") != null)
|
||||
RESOURCE_ROOT = "resources";
|
||||
else
|
||||
RESOURCE_ROOT = ".";
|
||||
}
|
||||
|
||||
public static final String RESOURCE_WEB_ROOT = HalContext.RESOURCE_ROOT + "/resource/web";
|
||||
public static final String RESOURCE_WEB_ROOT = HalContext.RESOURCE_ROOT + "/web";
|
||||
|
||||
private static final String CONF_FILE = "hal.conf";
|
||||
static final String DB_FILE = "hal.db";
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public class HalCoreDatabaseUpgrader extends HalDatabaseUpgrader {
|
|||
private static final Logger logger = LogUtil.getLogger();
|
||||
|
||||
private static final int REFERENCE_DB_VERSION = 17;
|
||||
private static final String REFERENCE_DB_PATH = HalContext.RESOURCE_ROOT + "/resource/hal-core-reference.db";
|
||||
private static final String REFERENCE_DB_PATH = HalContext.RESOURCE_ROOT + "/hal-core-reference.db";
|
||||
|
||||
private static final int CLEAR_INTERNAL_AGGR_DATA_DB_VERSION = 11;
|
||||
private static final int CLEAR_EXTERNAL_AGGR_DATA_DB_VERSION = 0;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import zutil.log.LogUtil;
|
|||
import java.sql.PreparedStatement;
|
||||
|
||||
public class SensorDataAggregationDaemonTest {
|
||||
private static final String DEFAULT_DB_FILE = "resource/resource/hal-core-reference.db";
|
||||
private static final String DEFAULT_DB_FILE = HalContext.RESOURCE_ROOT + "/hal-core-reference.db";
|
||||
|
||||
private static DBConnection db;
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ public class SensorDataAggregationDaemonTest {
|
|||
db = new DBConnection(DBConnection.DBMS.SQLite, ":memory:");
|
||||
HalContext.setDB(db);
|
||||
|
||||
//upgrade the database to latest version
|
||||
//upgrade the database to the latest version
|
||||
System.out.println("Upgrading in-memory database to latest version");
|
||||
DBConnection referenceDB = new DBConnection(DBConnection.DBMS.SQLite, DEFAULT_DB_FILE);
|
||||
final DBUpgradeHandler handler = new DBUpgradeHandler(referenceDB);
|
||||
|
|
|
|||