When using Maven to run test for MariaDB Connector J, you can specify dbUrl
using dbUrl
option like follows:
mvn -DdbUrl="jdbc:mysql://myhost:3306/testj?user=myuser&password=mypassword" package
My question is how to pass the dbUrl
value dynamically when running from shell, i.e. something like this:
export myUrl="abcd"
mvn -DdbUrl=$myUrl package
But this does not work. May I ask is there a way to pass shell variables when using mvn
command?