[jOOQ/jOOQ#9506] Explicit loading of the JDBC driver, if available
This commit is contained in:
parent
b60b5c524b
commit
d334f61aa3
@ -163,6 +163,9 @@ abstract class AbstractMigrationsMojo extends AbstractMojo {
|
||||
if (jdbc == null || jdbc.url == null)
|
||||
throw new MojoExecutionException("JDBC URL is required");
|
||||
|
||||
if (jdbc.driver != null)
|
||||
Class.forName(jdbc.driver);
|
||||
|
||||
try (CloseableDSLContext ctx = DSL.using(jdbc.url, defaultIfNull(jdbc.user, jdbc.username), jdbc.password)) {
|
||||
|
||||
// Initialise Settings
|
||||
|
||||
@ -39,6 +39,7 @@ package org.jooq.codegen.maven;
|
||||
|
||||
public class Jdbc {
|
||||
|
||||
public String driver;
|
||||
public String url;
|
||||
public String user;
|
||||
public String username;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user