01: /*
02: * Created by IntelliJ IDEA.
03: * User: sg426575
04: * Date: May 13, 2006
05: * Time: 9:28:03 PM
06: */
07: package com.tacitknowledge.util.migration.jdbc;
08:
09: import java.util.Properties;
10:
11: import org.apache.commons.logging.Log;
12: import org.apache.commons.logging.LogFactory;
13:
14: import com.technoetic.xplanner.db.hsqldb.HsqlServer;
15:
16: /**
17: * Launches the migration process as a standalone application.
18: * <p>
19: * This class expects the following Java environment parameters:
20: * <ul>
21: * <li>migration.systemname - the name of the logical system being migrated</li>
22: * </ul>
23: * <p>
24: * Below is an example of how this class can be configured in build.xml:
25: * <pre>
26: * ...
27: * <target name="patch.database" description="Runs the migration system">
28: * <java
29: * fork="true"
30: * classpathref="patch.classpath"
31: * failonerror="true"
32: * classname="com.tacitknowledge.util.migration.jdbc.StandaloneMigrationLauncher">
33: * <sysproperty key="migration.systemname" value="${application.name}"/>
34: * </java>
35: * </target>
36: * ...
37: * </pre>
38: *
39: * @author Mike Hardy (mike@tacitknowledge.com)
40: * @version $Id: StandaloneMigrationLauncher.java,v 1.7 2005/09/07 22:20:34 chrisa Exp $
41: * @see com.tacitknowledge.util.migration.MigrationProcess
42: */
43: public class HsqlAwareStandaloneMigrationLauncher {
44: /**
45: * Run the migrations for the given system name
46: *
47: * @param arguments the command line arguments, if any (none are used)
48: * @exception Exception if anything goes wrong
49: */
50: public static void main(String[] arguments) throws Exception {
51: HsqlServer.start();
52: StandaloneMigrationLauncher.main(arguments);
53: HsqlServer.shutdown();
54: }
55:
56: }
|