Using the Examples

Importing

Creating the credentials.properties

source.driver: org.hsqldb.jdbc.JDBCDriver
source.classpath: ./lib/hsqldb-2.2.4.jar
source.url: jdbc:hsqldb:res:work/export/data;shutdown=true
source.schema: PUBLIC
source.username: SA
source.password: 
target.driver: com.mysql.jdbc.Driver
target.classpath: ./lib/mysql-connector-java-5.1.14-bin.jar
target.url: jdbc:mysql://localhost:3306/test2
target.schema: test2
target.username: test
target.password: test

Running the ant build.xml

Open a shell to the project directory/examples/import-with-data

% ant -Dchangelog.directory=changelogs/   migrate

The migrate task will migrate files in the changelogs/ path that are prefixed with the schema name. For example:

leo@behemoth~/projects/git/lbcopy/examples/import-with-data
(15:34:01) [176] ls changelogs/
data.jar        schema-cst.xml  schema-seq.xml  schema-vw.xml   test-dat.xml    test2-cst.xml   test2-seq.xml   test2-vw.xml
data.zip        schema-idx.xml  schema-tab.xml  schema.jar      test.jar        test2-idx.xml   test2-tab.xml

the test2 files will be imported.

Exporting

Creating the credentials.properties

source.driver: com.mysql.jdbc.Driver
source.classpath: ./lib/mysql-connector-java-5.1.14-bin.jar
source.url: jdbc:mysql://localhost:3306/TEM
source.schema: TEM
source.username: TEM
source.password: TEMPORARY
target.driver: com.mysql.jdbc.Driver
target.classpath: ./lib/mysql-connector-java-5.1.14-bin.jar
target.url: jdbc:mysql://localhost:3306/kfs_cloud
target.schema: kfs_cloud
target.username: TEM
target.password: TEMPORARY

Running the ant build.xml

% ant -Dchangelog.directory=changelogs/   export

Migrating

Creating the credentials.properties

target.driver: com.mysql.jdbc.Driver
target.classpath: ./lib/mysql-connector-java-5.1.14-bin.jar
target.url: jdbc:mysql://localhost:3306/TEM
target.schema: TEM
target.username: TEM
target.password: TEM                                                            
target.driver: com.mysql.jdbc.Driver
target.classpath: ./lib/mysql-connector-java-5.1.14-bin.jar
target.url: jdbc:mysql://localhost:3306/test2
target.schema: test2
target.username: test
target.password: test                                                            

Running the ant build.xml

Open a shell to the project directory/examples/import-with-data

% ant -Dchangelog.directory=changelogs/                                             

Using the Tasks