You need to replace the parseOptions method in liquibase.commandline.main with the following version (note: I haven't actually tested it because my version is lying in small pieces on the floor of my IDE. It works for me with my mental JVM though... )
protected void parseOptions(String[] args) throws CommandLineParsingException { args = fixupArgs(args); boolean seenCommand = false; for (String arg : args) { if (isCommand(arg)) { this.command = arg; if (this.command.equalsIgnoreCase("migrate")) { this.command = "update"; } else if (this.command.equalsIgnoreCase("migrateSQL")) { this.command = "updateSQL"; } seenCommand = true; } else if (seenCommand) { if (arg.startsWith("-D")) { String[] splitArg = splitArg(arg); String attributeName = splitArg[0].replaceFirst("^-D", ""); String value = splitArg[1]; changeLogParameters.put(attributeName, value); } else { commandParams.add(arg); } } else if (arg.startsWith("--")) { String[] splitArg = splitArg(arg); String attributeName = splitArg[0]; String value = splitArg[1]; try { Field field = getClass().getDeclaredField(attributeName); if (field.getType().equals(Boolean.class)) { field.set(this, Boolean.valueOf(value)); } else { field.set(this, value); } } catch (Exception e) { throw new CommandLineParsingException("Unknown parameter: '" + attributeName + "'"); } } else { throw new CommandLineParsingException("Unexpected value " + arg + ": parameters must start with a '--'"); } } } -----Original Message----- From: jfrapper [mailto:jfrap...@lycos.com] Sent: Tuesday, April 28, 2009 1:56 PM To: liquibase-user@lists.sourceforge.net Subject: Re: [Liquibase-user] Changelog parameters A patch would be great if you have it ;) Thanks for the help Nathan... Cheers, JF Voxland, Nathan wrote: > > I think I figured out where the bug is. It is in the command line app > class, and how it parses the parameters. How important is it to you to > have it run as a command line app? Do you need a custom build (or want > the patch so you can build it yourself), or can you hold off until the > next release comes out? > > Nathan > > -----Original Message----- > From: jfrapper [mailto:jfrap...@lycos.com] > Sent: Tuesday, April 28, 2009 1:35 PM > To: liquibase-user@lists.sourceforge.net > Subject: Re: [Liquibase-user] Changelog parameters > > > I get the help message, for example: > > liquibase --driver=oracle.jdbc.OracleDriver > --classpath=C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar > --changeLogFile=sql\base.changelog.xml > -url="jdbc:oracle:thin:@local:1521:asdf" --username=my_user > --password=my_pass Dschemaname=my_schema -Dtablespacedata=_data > -Dtablespaceindex=_index updateSQL > Usage: java -jar liquibase.jar [options] [command] > > Standard Commands: > update Updates database to current version > updateSQL Writes SQL to update database to current > version to STDOUT > updateCount <num> Applies next NUM changes to the database > > > > Voxland, Nathan wrote: >> >> What if you move your paremeters to before the update: >> >> liquibase --driver=oracle.jdbc.OracleDriver >> --classpath=C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar >> --changeLogFile=sql\base.changelog.xml > --url="jdbc:oracle:thin:@myjdbc" >> -username=my_username --password=my_password --logLevel=finest >> -Dschema.name=my_schema -Dtablespace.data=data > -Dtablespace.index=index >> update >> >> > -- > View this message in context: > http://www.nabble.com/Changelog-parameters-tp23265536p23283567.html > Sent from the LiquiBase - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------ > ------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Liquibase-user mailing list > Liquibase-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/liquibase-user > > ------------------------------------------------------------------------ ------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Liquibase-user mailing list > Liquibase-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/liquibase-user > > -- View this message in context: http://www.nabble.com/Changelog-parameters-tp23265536p23283895.html Sent from the LiquiBase - User mailing list archive at Nabble.com. ------------------------------------------------------------------------ ------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Liquibase-user mailing list Liquibase-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/liquibase-user ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Liquibase-user mailing list Liquibase-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/liquibase-user