Change Log Properties doesn't work

I’m trying to specify change log properties running from the command line, and it seems that it always stops with unknown parameter:

./liquibase --driver=com.mysql.jdbc.Driver --classpath=/usr/share/jdbc-mysql/lib/jdbc-mysql.jar --changeLogFile=logfile.xml --url=“jdbc:mysql://localhost/test” --username=test --password=test -Dsomething=42

Errors:
  Unexpected value -Dsomething=42: parameters must start with a ‘–’

If I try with '–Dsomething=42" it responses with

Errors:
  Unknown parameter: ‘Dsomething’

Similar problem, If I add this to the liquibase.properties

What version of liquibase are you running?

Nathan

I have the same problem 1.9.5

Same in 2.0rc5

Bug?

/Lasse

hi Guys…

    It’s working for me… I had the same issue (1.9.5 doesn’t work at all, but from 2.0-rc1 works) please make sure you pass the parameter after the liquibase command like:

liquibase.bat … update -Dkey_param=key_value

Yep that works. Maybe this could exist as an example somewhere in the docs.

Thanks /Lasse

I added it to the command line docs page

Nathan

Still some problems.

Version 1.9.5

First, -Dparam=value does not work for me. However, with --Dparam=value it works fine.

Second, I have a parameter ${myparam} in a liquibase xml-file. I want to substute that by running liqiubase from the command line.
I try liquibase.bat --changeLogFile=changeLog.xml updateSQL --Dmyparam=substitutewiththis
But no luck.

What am I doing wrong? I have tried 2.0rc5 but ran into other problems there.

The example you added to the docs page -Dengine=myisam is supposed to replace ${engine} somewhere in a liquibase xml-file I suppose?

Best regards /Lasse

For setting default mysql engine I’m using this trick (I’m on liquibase 1.9.5 now):

    url: jdbc:mysql://localhost/my_db?zeroDateTimeBehavior=convertToNull&characterEncoding=utf8&characterSetResults=utf8&sessionVariables=storage_engine=InnoDB
note sessionVariables syntax, see http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html for details.

That is the better option for setting the default storage engine.  My use of it was mainly as an example for setting and using a parameter, and should normally not be used.  I should come up with a better example.

There are some bugs/limitations with the parameter passsing in 1.9 that have been resolved in 2.0 such as the command line passing ability, and where the substitutions can occur (it used to just be XML attributes for example).

I’ll look at your other 2.0 issues, and see if you can get it going with that first.

Nathan