forked from openmrs/openmrs-standalone
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDbInitializer.java
More file actions
32 lines (27 loc) · 1.09 KB
/
DbInitializer.java
File metadata and controls
32 lines (27 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* The contents of this file are subject to the OpenMRS Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://license.openmrs.org
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*
* Copyright (C) OpenMRS, LLC. All Rights Reserved.
*/
package org.openmrs.standalone;
import java.io.File;
import static org.openmrs.standalone.OpenmrsUtil.importSqlFile;
public class DbInitializer {
// This is to be called via pom-step-04 with id 'import-demo-sql'
public static void main(String[] args) throws Exception {
Class.forName("org.mariadb.jdbc.Driver").newInstance();
String sqlFilePath = args[0];
String jdbcUrl = args[1];
String username = args[2];
String password = args[3];
importSqlFile(new File(sqlFilePath), jdbcUrl, username, password);
}
}