1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.rsmart.kuali.tools.ant.tasks;
18
19 import org.apache.tools.ant.BuildException;
20 import org.apache.tools.ant.DirectoryScanner;
21 import org.apache.tools.ant.Task;
22 import org.apache.tools.ant.types.FileSet;
23
24 import static org.apache.tools.ant.Project.MSG_DEBUG;
25
26
27
28
29
30
31
32 public class LiquibaseSetup extends Task {
33 private String rdbmsConfigId;
34
35
36
37
38
39
40 public final String getRdbmsConfigId() {
41 return this.rdbmsConfigId;
42 }
43
44
45
46
47
48
49 public final void setRdbmsConfigId(final String argRdbmsConfigId) {
50 this.rdbmsConfigId = argRdbmsConfigId;
51 }
52
53 public void execute() {
54 final RdbmsConfig config = (RdbmsConfig) getProject().getReference(getRdbmsConfigId());
55 getProject().setProperty("lb.database.url", config.getUrl());
56 getProject().setProperty("lb.database.username", config.getUsername());
57 getProject().setProperty("lb.database.password", config.getPassword());
58 }
59 }