-
1. Re: system environment variables with cli
jaikiran Apr 12, 2015 1:52 AM (in response to demarcojb)What is the exact command you are using in the CLI to add that system property?
-
2. Re: system environment variables with cli
ctomc Apr 13, 2015 5:51 AM (in response to demarcojb)not sure what exactly are you facing but just in case.
${MY_SERVER} would lookup system property aka System.getProperty("MY_SERVER")
${env.MY_SERVER} would lookup environment property aka System.getEnv("MY_SERVER")
not sure what you want to use
-
3. Re: system environment variables with cli
jaikiran Apr 13, 2015 8:21 AM (in response to ctomc)I think the user meant that he wants to literally set the connection URL to contain the ${MY_SERVER} sub string, but isn't able to do so from the CLI apparently because he isn't aware how to escape the $ sign.
... and I don't know myself if the \ (backslash) would work in this case, so I just asked the user to paste his command so someone might be able to fix it.
-
4. Re: system environment variables with cli
demarcojb Apr 13, 2015 11:06 AM (in response to jaikiran)Hi together. Thanks for your answers!
jaikiran pai; that's exactly what I want! The command is f.e.:
data-source add \
--name=mydatabase \
--jndi-name=java:/MYDATABASE \
--driver-name=maxdb_7_6 \
--connection-url=jdbc:sapdb://${MY_SERVER} \
--user-name=myuser \
--password=mypassword \
--min-pool-size=10 \
--max-pool-size=100 \
--idle-timeout-minutes=15 \
--blocking-timeout-wait-millis=5000
Problem is that I don't know how to quote the "$". "\" also seems not working...
Thanks for your effort and best regards
Marco
-
5. Re: system environment variables with cli
demarcojb May 8, 2015 9:01 AM (in response to demarcojb)Are there any news? It seems to be a missing feature...?!
-
6. Re: system environment variables with cli
pahuang Aug 7, 2016 11:04 PM (in response to demarcojb)In case anyone is searching for a solution:
There is a workaround posted here http://stackoverflow.com/a/29824058/345718
So basically you put a : after the variable like --connection-url=jdbc:sapdb://${MY_SERVER:}
Sometimes you may have complains "WFLYCTL0113: '' is an invalid value for parameter user-name. Values must have a minimum length of 1 characters"}. Just put a dummy value after : to get pass it. e.g. --user-name=${env.DB_ENV_POSTGRES_USER:postgres}