From: <one...@us...> - 2003-01-31 08:50:00
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2ddl In directory sc8-pr-cvs1:/tmp/cvs-serv21385/sf/hibernate/tool/hbm2ddl Modified Files: SchemaExport.java Log Message: fixed some silly errors in new config stuff added a warning to the javadoc added --config option to SchemaExport Index: SchemaExport.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2ddl/SchemaExport.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SchemaExport.java 26 Jan 2003 01:33:36 -0000 1.6 --- SchemaExport.java 31 Jan 2003 08:49:50 -0000 1.7 *************** *** 230,234 **** public static void main(String[] args) { try { ! Configuration ds = new Configuration(); boolean script = true; --- 230,234 ---- public static void main(String[] args) { try { ! Configuration cfg = new Configuration(); boolean script = true; *************** *** 263,274 **** delimiter = args[i].substring(12); } } else { String filename = args[i]; if ( filename.endsWith( ".jar" ) ) { ! ds.addJar(filename); } else { ! ds.addFile(filename); } } --- 263,277 ---- delimiter = args[i].substring(12); } + else if ( args[i].startsWith("--config=") ) { + cfg.configure( args[i].substring(9) ); + } } else { String filename = args[i]; if ( filename.endsWith( ".jar" ) ) { ! cfg.addJar(filename); } else { ! cfg.addFile(filename); } } *************** *** 278,285 **** Properties props = new Properties(); props.load( new FileInputStream(propFile) ); ! new SchemaExport(ds, props).setOutputFile(outputFile).execute(script, export, drop, formatSQL, delimiter); } else { ! new SchemaExport(ds).setOutputFile(outputFile).execute(script, export, drop, formatSQL, delimiter); } } --- 281,288 ---- Properties props = new Properties(); props.load( new FileInputStream(propFile) ); ! new SchemaExport(cfg, props).setOutputFile(outputFile).execute(script, export, drop, formatSQL, delimiter); } else { ! new SchemaExport(cfg).setOutputFile(outputFile).execute(script, export, drop, formatSQL, delimiter); } } |