Passing command line arguments

I cannot figure out how to pass command line args for replacement.

I keep getting “Unexpected value -DPassword: parameters must start with a ‘–’”

Please advise…

C:\liquibase\liquibase-1.9.4\liquibase --classpath=C:\Oracle\OracleXE\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar --driver=oracle.jdbc.OracleDriver --changeLogFile=C:\Projects\Chapter33\Trunk\Product\Production\Database\Sys.Changelog.xml --url=“jdbc:oracle:thin:@localhost:1521:XE” --username=“sys as sysdba” --password=oracle --contexts=windows --logLevel=finest -DPassword=oracle status

Why are you including the “-DPassword”  parameter?  You are already specifying it with --password=oracle.  Is it a JVM flag you are trying to pass?

Nathan

Hi

I’m evaluating liquidbase for use on our internal project and also have this problem.

I’m running liquidbase 2.0-RC1 on windows.

Also i would like to be able to pass parameter values to the changeset using the properties file. Is it possible?

Regards.

After looking at the code in http://liquibase.jira.com/svn/CORE/trunk/liquibase-core-jvm/src/main/java/liquibase/integration/commandline/Main.java I think that the problem (in windows at least) is that the -Dparameter=value inputed in the command line is changed to -Dparameter value when it arrives to the java class (probably by the cmd line interpreter). There it expects to split the string on the = char, but its not there.

I’m reading the code right?

HTH.

If you put quotes around the “-Dparamname=value” param it will work.  I’ll look into fixing the issue, though.  http://liquibase.jira.com/browse/CORE-503

Nathan

Nathan, I tried with quotes like you say in 1.9.5 but without luck. /Lasse

Tried it with 2.0rc5 as well. Same behaviour unfortunately. :frowning:

It should work in 2.0 without the quotes.  The -D param goes after the update, though. 

    liquibase update -Dparamname=value

Nathan