Skip to content

Commit 47116e7

Browse files
committed
DbURL can be configured with an environment variable
1 parent ef684c2 commit 47116e7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

utplsql-maven-plugin/src/main/java/org/utplsql/maven/plugin/UtPLSQLMojo.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public class UtPLSQLMojo extends AbstractMojo
126126
public void execute() throws MojoExecutionException
127127
{
128128
getLog().debug("Java Api Version = "+JavaApiVersionInfo.getVersion());
129-
loadDefaultCredentials();
129+
loadConfFromEnvironment();
130130

131131
Connection connection = null;
132132
try
@@ -190,11 +190,16 @@ public void execute() throws MojoExecutionException
190190
}
191191

192192
/**
193-
* Load
193+
* Load some configuration from env variables.
194194
*
195195
*/
196-
private void loadDefaultCredentials ()
196+
private void loadConfFromEnvironment ()
197197
{
198+
if (StringUtils.isEmpty(url))
199+
{
200+
url = System.getProperty("dbUrl");
201+
}
202+
198203
if (StringUtils.isEmpty(user))
199204
{
200205
user = System.getProperty("dbUser");

0 commit comments

Comments
 (0)