File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
src/main/java/org/utplsql/maven/plugin Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 5
5
6
6
<groupId >org.utplsql</groupId >
7
7
<artifactId >utplsql-maven-plugin</artifactId >
8
- <version >3.1.2 -SNAPSHOT</version >
8
+ <version >3.1.3 -SNAPSHOT</version >
9
9
<packaging >maven-plugin</packaging >
10
10
11
11
<name >utPLSQL Maven Plugin</name >
Original file line number Diff line number Diff line change 2
2
3
3
import java .io .File ;
4
4
import java .sql .Connection ;
5
- import java .sql .DriverManager ;
6
5
import java .sql .SQLException ;
7
6
import java .util .ArrayList ;
8
7
import java .util .List ;
9
-
8
+ import oracle . jdbc . pool . OracleDataSource ;
10
9
import org .apache .commons .lang3 .StringUtils ;
11
10
import org .apache .maven .model .Resource ;
12
11
import org .apache .maven .plugin .AbstractMojo ;
@@ -135,8 +134,11 @@ public void execute() throws MojoExecutionException {
135
134
try {
136
135
FileMapperOptions sourceMappingOptions = buildSourcesOptions ();
137
136
FileMapperOptions testMappingOptions = buildTestsOptions ();
138
-
139
- connection = DriverManager .getConnection (url , user , password );
137
+ OracleDataSource ds = new OracleDataSource ();
138
+ ds .setURL (url );
139
+ ds .setUser (user );
140
+ ds .setPassword (password );
141
+ connection = ds .getConnection ();
140
142
141
143
Version utlVersion = DBHelper .getDatabaseFrameworkVersion (connection );
142
144
getLog ().info ("utPLSQL Version = " + utlVersion );
@@ -173,6 +175,7 @@ public void execute() throws MojoExecutionException {
173
175
try {
174
176
if (null != connection ) {
175
177
reporterWriter .writeReporters (connection );
178
+ connection .close ();
176
179
}
177
180
} catch (Exception e ) {
178
181
getLog ().error (e .getMessage (), e );
You can’t perform that action at this time.
0 commit comments