VYPR
High severityNVD Advisory· Published Apr 5, 2018· Updated Sep 16, 2024

CVE-2018-1000146

CVE-2018-1000146

Description

Liquibase Runner Plugin <=1.3.0 lets attackers with job-configure permission execute arbitrary code on the Jenkins master JVM.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Liquibase Runner Plugin <=1.3.0 lets attackers with job-configure permission execute arbitrary code on the Jenkins master JVM.

Vulnerability

An arbitrary code execution vulnerability exists in the Liquibase Runner Plugin for Jenkins, affecting version 1.3.0 and earlier [1][2]. The flaw allows an attacker who has permission to configure jobs (i.e., Job/Configure) to load and execute arbitrary code on the Jenkins master JVM [1]. The vulnerable code path originates from the ability to specify arbitrary JDBC driver class names via the driverClassname configuration field, which the plugin then loads using the context class loader of the current thread [3]. The commit at 382a1ea removes the driverClassname field entirely, and the commit at 7726ce4 refactors classloader management to no longer use Thread.currentThread().getContextClassLoader() for driver loading [3][4].

Exploitation

An attacker must have Job/Configure permission in Jenkins [1]. The exploitation involves configuring a job that uses the Liquibase Runner Plugin and providing a malicious class name in the driver classname field or via the liquibase.driver property [4]. When the build runs, the plugin loads the attacker-specified class using the current thread's context class loader, which can reference arbitrary classes reachable on the Jenkins master's classpath or via an additional classpath entry [3]. No user interaction beyond job configuration is required; the attack occurs during job execution.

Impact

Successful exploitation allows the attacker to execute arbitrary code on the Jenkins master JVM [1][2]. This results in a full compromise of the Jenkins controller, enabling the attacker to exfiltrate credentials, modify configuration, execute arbitrary commands, or pivot to other systems accessible from the master. The confidentiality, integrity, and availability of the Jenkins instance and all managed jobs are at risk. The privilege level achieved is that of the Jenkins master process (typically the Jenkins controller user).

Mitigation

The vulnerability is fixed in Liquibase Runner Plugin version 1.4.0, released on 2018-03-26 [1]. Users should upgrade to version 1.4.0 or later [1][2]. The fix removes the ability to specify arbitrary driver class names and refactors class loading to not rely on the thread context classloader [3][4]. No workaround is available for versions prior to 1.4.0; upgrading is mandatory. The CVE is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.jenkins-ci.plugins:liquibase-runnerMaven
< 1.4.31.4.3

Affected products

1

Patches

3
1817af0b5bb1

Refactored classloader management to not change the Thread's context classloader

2 files changed · +6 26
  • src/main/java/org/jenkinsci/plugins/liquibase/common/Util.java+6 1 modified
    @@ -75,7 +75,12 @@ public static ClassLoader createClassLoader(boolean isUnix, final FilePath works
                 //jenkins FilePath prefers unix style, even on windows
                 filePath = filePath.replace("\\", "/");
     
    -            FilePath file = workspace.child(filePath);
    +            FilePath file;
    +            if (workspace == null) {
    +                file = new FilePath(new File(filePath));
    +            } else {
    +                file = workspace.child(filePath);
    +            }
                 try {
     
                     if (file.isDirectory()) {
    
  • src/test/java/org/jenkinsci/plugins/liquibase/integration/ChangesetEvaluatorBuildResultTest.java+0 25 modified
    @@ -89,31 +89,6 @@ public void should_indicate_success_with_yaml_formatted_changeset()
             assertThat(build, isSuccessful());
         }
     
    -    @Test
    -    public void should_mark_liquibase_setup_problem_as_failure()
    -            throws IOException, ExecutionException, InterruptedException {
    -
    -        Properties properties = new Properties();
    -        properties.setProperty("driver", "nosuch.driver");
    -        properties.setProperty("changeLogFile", "sunny-day-changeset.xml");
    -        LiquibaseTestUtil.createFileFromResource(temporaryFolder.getRoot(), "/example-changesets/sunny-day-changeset.xml");
    -
    -        FreeStyleProject project = jenkinsRule.createFreeStyleProject();
    -        project.setCustomWorkspace(temporaryFolder.getRoot().getAbsolutePath());
    -
    -        File propertiesFile = temporaryFolder.newFile();
    -        properties.store(new FileOutputStream(propertiesFile), "Liquibase Test Properties");
    -
    -        ChangesetEvaluator evaluator = new ChangesetEvaluator();
    -        evaluator.setLiquibasePropertiesPath(propertiesFile.getAbsolutePath());
    -
    -        project.getBuildersList().add(evaluator);
    -        FreeStyleBuild build = launchBuildForProject(project);
    -        assertThat(build , isFailure());
    -
    -    }
    -
    -
     
         /**
          * Covers https://github.com/jenkinsci/liquibase-runner-plugin/issues/8
    
7726ce4569a2

Refactored classloader management to not change the Thread's context classloader

4 files changed · +54 74
  • src/main/java/org/jenkinsci/plugins/liquibase/common/Util.java+40 54 modified
    @@ -1,32 +1,28 @@
     package org.jenkinsci.plugins.liquibase.common;
     
    +import com.google.common.base.Splitter;
    +import com.google.common.collect.Iterables;
     import hudson.FilePath;
     import liquibase.changelog.ChangeSet;
     import liquibase.changelog.DatabaseChangeLog;
    +import liquibase.util.StringUtils;
    +import org.jenkinsci.plugins.liquibase.exception.LiquibaseRuntimeException;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
     
     import java.io.File;
     import java.io.IOException;
     import java.net.MalformedURLException;
     import java.net.URI;
     import java.net.URL;
     import java.net.URLClassLoader;
    +import java.nio.file.Path;
     import java.nio.file.Paths;
    -import java.security.AccessController;
    -import java.security.PrivilegedAction;
     import java.sql.Driver;
     import java.sql.DriverManager;
     import java.sql.SQLException;
    -
    -import javax.annotation.Nullable;
    -
    -import org.jenkinsci.plugins.liquibase.exception.LiquibaseRuntimeException;
    -import org.slf4j.Logger;
    -import org.slf4j.LoggerFactory;
    -
    -import com.google.common.base.Function;
    -import com.google.common.base.Splitter;
    -import com.google.common.base.Strings;
    -import com.google.common.collect.Iterables;
    +import java.util.ArrayList;
    +import java.util.List;
     
     public class Util {
         private static final Logger LOG = LoggerFactory.getLogger(Util.class);
    @@ -47,62 +43,52 @@ public static String formatChangeset(ChangeSet changeSet) {
             return filePath + "::" + changeSetName.replace(filePath + "::", "");
         }
     
    -    public static void registerDatabaseDriver(String driverName, String classpath)
    -            throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {
    +    public static void registerDatabaseDriver(String driverName, ClassLoader liquibaseClassLoader) throws SQLException {
             Driver driver;
    -        if (!Strings.isNullOrEmpty(classpath)) {
    -            Driver actualDriver =
    -                    (Driver) Class.forName(driverName, true, Thread.currentThread().getContextClassLoader())
    -                                  .newInstance();
    +        try {
    +            Driver actualDriver = (Driver) Class.forName(driverName, true, liquibaseClassLoader).getDeclaredConstructor().newInstance();
                 driver = new DriverShim(actualDriver);
    -        } else {
    -            driver = (Driver) Class.forName(driverName).newInstance();
    -        }
     
    -        DriverManager.registerDriver(driver);
    +            DriverManager.registerDriver(driver);
    +        } catch (ReflectiveOperationException e) {
    +            throw new SQLException("Cannot create driver " + driverName + ": " + e.getMessage(), e);
    +        }
         }
     
    -    public static void addClassloader(boolean isUnix, final FilePath workspace, String classpath) {
    +    public static ClassLoader createClassLoader(boolean isUnix, final FilePath workspace, String classpath) {
             String separator;
             if (isUnix) {
                 separator = ":";
             } else {
                 separator = ";";
             }
    +
    +        List<URL> classpathUrls = new ArrayList<>();
             Iterable<String> classPathElements = Splitter.on(separator).trimResults().split(classpath);
    -        final Iterable<URL> urlIterable = Iterables.transform(classPathElements, new Function<String, URL>() {
    -            @Override
    -            public URL apply(@Nullable String filePath) {
    -                URL url = null;
    -                if (filePath != null) {
    -                    try {
    -                        if (Paths.get(filePath).isAbsolute()) {
    -                            url = new File(filePath).toURI().toURL();
    -                        } else {
    -                            URI workspaceUri = workspace.toURI();
    -                            File workspace = new File(workspaceUri);
    -                            url = new File(workspace, filePath).toURI().toURL();
    -                        }
    -                    } catch (MalformedURLException e) {
    -                        LOG.warn("Unable to transform classpath element " + filePath, e);
    -                    } catch (InterruptedException e) {
    -                        throw new LiquibaseRuntimeException("Error during database driver resolution", e);
    -                    } catch (IOException e) {
    -                        throw new LiquibaseRuntimeException("Error during database driver resolution", e);
    -                    }
    -                }
    -                return url;
    +
    +        for (String filePath : classPathElements) {
    +            filePath = StringUtils.trimToNull(filePath);
    +            if (filePath == null) {
    +                continue;
                 }
    -        });
     
    -        URLClassLoader urlClassLoader = AccessController.doPrivileged(new PrivilegedAction<URLClassLoader>() {
    -            @Override
    -            public URLClassLoader run() {
    -                return new URLClassLoader(Iterables.toArray(urlIterable, URL.class),
    -                        Thread.currentThread().getContextClassLoader());
    +            //jenkins FilePath prefers unix style, even on windows
    +            filePath = filePath.replace("\\", "/");
    +
    +            FilePath file = workspace.child(filePath);
    +            try {
    +
    +                if (file.isDirectory()) {
    +                    for (FilePath jarFile : file.list("*.jar")) {
    +                        classpathUrls.add(jarFile.toURI().toURL());
    +                    }
    +                }
    +                classpathUrls.add(file.toURI().toURL());
    +            } catch (Exception e) {
    +                LOG.warn("Error handling classpath " + file+": "+e.getMessage(), e);
                 }
    -        });
    -        Thread.currentThread().setContextClassLoader(urlClassLoader);
    +        }
     
    +        return new URLClassLoader(Iterables.toArray(classpathUrls, URL.class), Util.class.getClassLoader());
         }
     }
    
  • src/main/java/org/jenkinsci/plugins/liquibase/evaluator/AbstractLiquibaseBuilder.java+10 16 modified
    @@ -27,7 +27,6 @@
     import java.sql.Connection;
     import java.sql.DriverManager;
     import java.sql.SQLException;
    -import java.util.List;
     import java.util.Map;
     import java.util.Properties;
     
    @@ -149,12 +148,14 @@ public Liquibase createLiquibase(Run<?, ?> build,
             EnvVars environment = build.getEnvironment(listener);
     
             try {
    +            ClassLoader liquibaseClassLoader = this.getClass().getClassLoader();
    +
                 if (!Strings.isNullOrEmpty(resolvedClasspath)) {
    -                Util.addClassloader(launcher.isUnix(), workspace, resolvedClasspath);
    +                liquibaseClassLoader = Util.createClassLoader(launcher.isUnix(), workspace, resolvedClasspath);
                 }
    -            JdbcConnection jdbcConnection = createJdbcConnection(configProperties);
    +            JdbcConnection jdbcConnection = createJdbcConnection(configProperties, liquibaseClassLoader);
                 Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(jdbcConnection);
    -            ResourceAccessor resourceAccessor = createResourceAccessor(workspace, environment, resolveMacros);
    +            ResourceAccessor resourceAccessor = createResourceAccessor(workspace, environment, resolveMacros, liquibaseClassLoader);
     
                 String changeLogFile = getProperty(configProperties, LiquibaseProperty.CHANGELOG_FILE);
                 liquibase = new Liquibase(changeLogFile, resourceAccessor, database);
    @@ -172,7 +173,8 @@ public Liquibase createLiquibase(Run<?, ?> build,
     
         private ResourceAccessor createResourceAccessor(FilePath workspace,
                                                         Map environment,
    -                                                    boolean resolveMacros) {
    +                                                    boolean resolveMacros,
    +                                                    ClassLoader liquibaseClassLoader) {
             String resolvedBasePath;
             if (resolveMacros) {
                 resolvedBasePath = hudson.Util.replaceMacro(basePath,  environment);
    @@ -188,8 +190,7 @@ private ResourceAccessor createResourceAccessor(FilePath workspace,
     
             ResourceAccessor filePathAccessor = new FilePathAccessor(filePath);
             return new CompositeResourceAccessor(filePathAccessor,
    -                new ClassLoaderResourceAccessor(Thread.currentThread().getContextClassLoader()),
    -                new ClassLoaderResourceAccessor(ClassLoader.getSystemClassLoader())
    +                new ClassLoaderResourceAccessor(liquibaseClassLoader)
             );
         }
     
    @@ -213,25 +214,18 @@ protected static void populateChangeLogParameters(Liquibase liquibase,
             }
         }
     
    -    private static JdbcConnection createJdbcConnection(Properties configProperties) {
    +    private static JdbcConnection createJdbcConnection(Properties configProperties, ClassLoader liquibaseClassLoader) {
             Connection connection;
             String dbUrl = getProperty(configProperties, LiquibaseProperty.URL);
             final String driverName = DatabaseFactory.getInstance().findDefaultDriver(dbUrl);
             try {
    -            Util.registerDatabaseDriver(driverName,
    -                    configProperties.getProperty(LiquibaseProperty.CLASSPATH.propertyName()));
    +            Util.registerDatabaseDriver(driverName, liquibaseClassLoader);
                 String userName = getProperty(configProperties, LiquibaseProperty.USERNAME);
                 String password = getProperty(configProperties, LiquibaseProperty.PASSWORD);
                 connection = DriverManager.getConnection(dbUrl, userName, password);
             } catch (SQLException e) {
                 throw new RuntimeException(
                         "Error getting database connection using driver " + driverName + " using url '" + dbUrl + "'", e);
    -        } catch (InstantiationException e) {
    -            throw new RuntimeException("Error registering database driver " + driverName, e);
    -        } catch (IllegalAccessException e) {
    -            throw new RuntimeException("Error registering database driver " + driverName, e);
    -        } catch (ClassNotFoundException e) {
    -            throw new RuntimeException("Error registering database driver " + driverName, e);
             }
             return new JdbcConnection(connection);
         }
    
  • src/main/resources/org/jenkinsci/plugins/liquibase/evaluator/AbstractLiquibaseBuilder/liquibase-common-config.jelly+2 2 modified
    @@ -5,7 +5,7 @@
              xmlns:c="/lib/credentials">
     
         <f:section title="Connection Details">
    -        <f:entry title="Database URL" field="url" description="example: jdbc:mysql://localhost:3306/sampledb">
    +        <f:entry title="Database URL" field="url" description="example: jdbc:mysql://localhost:3306/sampledb. The JDBC driver must be available in the classpath">
                 <f:textbox value="${instance.url}"/>
             </f:entry>
     
    @@ -35,7 +35,7 @@
                 <f:expandableTextbox name="labels" value="${instance.labels}"/>
             </f:entry>
             <f:entry title="Classpath" field="classpath"
    -                 description="Classpath containing migration files and JDBC Driver">
    +                 description="Classpath containing migration files and JDBC Driver. Can be relative to working directory or absolute. Jar files in listed directories are automatically added. Drivers for PostgreSQL, Mysql, H2, and Hsql come pre-bundled with this plugin.">
                 <f:textbox value="${instance.classpath}"/>
             </f:entry>
             <f:entry title="Changelog Parameters" field="changeLogParameters"
    
  • src/main/resources/org/jenkinsci/plugins/liquibase/workflow/AbstractLiquibaseStep/config.jelly+2 2 modified
    @@ -5,7 +5,7 @@
              xmlns:c="/lib/credentials">
     
         <f:section title="Connection Details">
    -        <f:entry title="Database URL" field="url" description="example: jdbc:mysql://localhost:3306/sampledb">
    +        <f:entry title="Database URL" field="url" description="example: jdbc:mysql://localhost:3306/sampledb. The JDBC driver must be available in the classpath">
                 <f:textbox/>
             </f:entry>
             <f:entry field="credentialsId" title="Credentials">
    @@ -35,7 +35,7 @@
                 <f:expandableTextbox name="labels"/>
             </f:entry>
             <f:entry title="Classpath" field="classpath"
    -                 description="Classpath containing migration files and JDBC Driver">
    +                 description="Classpath containing migration files and JDBC Driver. Can be relative to working directory or absolute. Jar files in listed directories are automatically added. Drivers for PostgreSQL, Mysql, H2, and Hsql come pre-bundled with this plugin.">
                 <f:textbox/>
             </f:entry>
             <f:entry title="Changelog Parameters" field="changeLogParameters"
    
382a1ea84910

Remove ability to specify arbitrary driver classnames

21 files changed · +21 354
  • pom.xml+7 1 modified
    @@ -72,7 +72,7 @@
             <dependency>
                 <groupId>org.jenkins-ci.plugins</groupId>
                 <artifactId>credentials</artifactId>
    -            <version>2.3.5</version>
    +            <version>2.3.7</version>
             </dependency>
             <dependency>
                 <groupId>org.jenkins-ci.plugins.workflow</groupId>
    @@ -104,6 +104,12 @@
                 <scope>test</scope>
             </dependency>
     
    +        <dependency>
    +            <groupId>com.cloudbees.jenkins.plugins</groupId>
    +            <artifactId>cloudbees-credentials</artifactId>
    +            <version>3.3</version>
    +        </dependency>
    +
             <dependency>
                 <groupId>org.jenkins-ci.plugins</groupId>
                 <artifactId>job-dsl</artifactId>
    
  • src/docs/jobdsl.md+1 5 modified
    @@ -28,9 +28,6 @@ job() {
               changeLogFile('changeset.yml')
               testRollbacks(true)
               url('jdbc:postgresql://localhost:5432/sample-db')
    -          driverClassname('org.postgresql.Driver')
    -          // instead of driverClassname, you can set databaseEngine to MySQL, Derby, Postgres, Derby, or Hypersonic
    -          databaseEngine('MySQL')
               credentialsId('database_password_credentials_id')
               liquibasePropertiesPath('/etc/liquibase.properties')
               contexts('staging')  // can be comma delimited list
    @@ -57,7 +54,6 @@ job() {
                 changeLogFile('changeset.yml')
                 testRollbacks(true)
                 url('jdbc:postgresql://localhost:5432/sample-db')
    -            driverClassname('org.postgresql.Driver')
                 credentialsId('database_password_credentials_id')
                 rollbackToTag('deploy-2.5')
                 rollbackCount(2)
    @@ -66,4 +62,4 @@ job() {
           }
         } 
     }
    -```
    \ No newline at end of file
    +```
    
  • src/docs/pipeline.md+1 6 modified
    @@ -21,10 +21,7 @@ node {
       liquibaseUpdate(changeLogFile: 'changeset.yml',
               testRollbacks: true,
               url: 'jdbc:postgresql://localhost:5432/sample-db',
    -          driverClassname: 'org.postgresql.Driver',
               classpath: 'path/to/additional/classes', // may be relative or absolute
    -          // instead of driverClassname, you can set databaseEngine to MySQL, Derby, Postgres, Derby, or Hypersonic
    -          databaseEngine: 'MySQL',
               credentialsId: 'database_password_credentials_id',
               liquibasePropertiesPath: '/etc/liquibase.properties',
               contexts: 'staging',
    @@ -47,7 +44,6 @@ node {
       // rollbackCount, rollbackToTag, rollbackToDate, or rollbackLastHours.
       liquibaseRollback(changeLogFile: 'changeset.yml',
               url: 'jdbc:postgresql://localhost:5432/sample-db',
    -          driverClassname: 'org.postgresql.Driver',
               credentialsId: 'database_password_credentials_id',
               liquibasePropertiesPath: '/etc/liquibase.properties',
               rollbackToTag: 'deploy-2.5',
    @@ -65,7 +61,6 @@ DbDoc Generation
     node {
        liquibaseDbDoc( changeLogFile: 'changeset.yml',   // same basic configuration parameters
                        url: 'jdbc:postgresql://localhost:5432/sample-db',
    -                   driverClassname: 'org.postgresql.Driver',
                        outputDirectory: 'dbdoc')
                        
        // works great with the HTML publisher plugin (sold separately)                   
    @@ -76,4 +71,4 @@ node {
                        
     
     }
    -```
    \ No newline at end of file
    +```
    
  • src/main/java/org/jenkinsci/plugins/liquibase/common/LiquibaseProperty.java+1 2 modified
    @@ -11,8 +11,7 @@ public enum LiquibaseProperty {
         URL(),
         DEFAULT_SCHEMA_NAME("defaultSchemaName"),
         LOG_LEVEL("logLevel"),
    -    DEFAULT_CATALOG_NAME("defaultCatalogName"),
    -    DRIVER();
    +    DEFAULT_CATALOG_NAME("defaultCatalogName");
     
     
         private String cliOption;
    
  • src/main/java/org/jenkinsci/plugins/liquibase/common/PropertiesAssembler.java+0 39 modified
    @@ -12,7 +12,6 @@
     
     import org.apache.commons.io.IOUtils;
     import org.jenkinsci.plugins.liquibase.evaluator.AbstractLiquibaseBuilder;
    -import org.jenkinsci.plugins.liquibase.evaluator.IncludedDatabaseDriver;
     import org.jenkinsci.plugins.liquibase.exception.LiquibaseRuntimeException;
     import org.slf4j.Logger;
     import org.slf4j.LoggerFactory;
    @@ -26,7 +25,6 @@
     public class PropertiesAssembler {
         private static final Logger LOG = LoggerFactory.getLogger(PropertiesAssembler.class);
         private static final String DEFAULT_JDBC_URL = "jdbc:h2:mem:builder-db";
    -    private static final String DEFAULT_DB_DRIVER = "org.h2.Driver";
     
         /**
          * Creates a properties instance for use with liquibase execution.  Property values may come from these sources,
    @@ -100,30 +98,8 @@ protected static void assembleFromProjectConfiguration(AbstractLiquibaseBuilder
                     environment, build);
             addPropertyIfDefined(properties, LiquibaseProperty.LABELS, liquibaseBuilder.getLabels(), environment, build);
             addPropertyIfDefined(properties, LiquibaseProperty.CONTEXTS, liquibaseBuilder.getContexts(), environment, build);
    -        resolveDatabaseDriver(liquibaseBuilder, properties, environment, build);
         }
     
    -    private static void resolveDatabaseDriver(AbstractLiquibaseBuilder liquibaseBuilder,
    -                                              Properties properties,
    -                                              Map environment, Run<?, ?> build) {
    -
    -
    -        boolean useIncludedDriver = isBuilderUsingIncludedDriver(liquibaseBuilder);
    -        if (useIncludedDriver) {
    -            setDriverFromDBEngine(liquibaseBuilder, properties);
    -        } else {
    -            addPropertyIfDefined(properties, LiquibaseProperty.DRIVER, liquibaseBuilder.getDriverClassname(),
    -                    environment, build);
    -        }
    -    }
    -
    -    private static boolean isBuilderUsingIncludedDriver(AbstractLiquibaseBuilder liquibaseBuilder) {
    -        boolean useIncludedDriver =
    -                liquibaseBuilder.hasUseIncludedDriverBeenSet() && liquibaseBuilder.isUseIncludedDriver();
    -        return useIncludedDriver && !Strings.isNullOrEmpty(liquibaseBuilder.getDatabaseEngine());
    -    }
    -
    -
         private static void assembleFromPropertiesFile(Properties properties,
                                                        String liquibasePropertiesPath,
                                                        FilePath workspace) {
    @@ -153,22 +129,7 @@ private static void assembleFromPropertiesFile(Properties properties,
             }
         }
     
    -    public static void setDriverFromDBEngine(AbstractLiquibaseBuilder liquibaseBuilder, Properties properties) {
    -        if (!Strings.isNullOrEmpty(liquibaseBuilder.getDatabaseEngine())) {
    -            for (IncludedDatabaseDriver includedDatabaseDriver : liquibaseBuilder.getDrivers()) {
    -                if (includedDatabaseDriver.getDisplayName().equals(liquibaseBuilder.getDatabaseEngine())) {
    -                    setProperty(properties, LiquibaseProperty.DRIVER, includedDatabaseDriver.getDriverClassName());
    -                    if (LOG.isDebugEnabled()) {
    -                        LOG.debug("using db driver class[" + includedDatabaseDriver.getDriverClassName() + "] ");
    -                    }
    -                    break;
    -                }
    -            }
    -        }
    -    }
    -
         private static void assembleDefaults(Properties properties) {
    -        setProperty(properties, LiquibaseProperty.DRIVER, DEFAULT_DB_DRIVER);
             setProperty(properties, LiquibaseProperty.URL, DEFAULT_JDBC_URL);
         }
     
    
  • src/main/java/org/jenkinsci/plugins/liquibase/dsl/LiquibaseContext.java+0 27 modified
    @@ -9,18 +9,15 @@
      */
     public class LiquibaseContext implements Context {
     
    -    protected String databaseEngine;
         protected String changeLogFile;
         protected String url;
         protected String defaultSchemaName;
         protected String contexts;
         protected String liquibasePropertiesPath;
         protected String classpath;
    -    protected String driverClassname;
         protected String labels;
         private Map<String, String> changeLogParameters;
         private String basePath;
    -    private Boolean useIncludedDriver;
         private String credentialsId;
         protected Integer rollbackCount = 0;
         private Integer rollbackLastHours;
    @@ -31,11 +28,6 @@ public class LiquibaseContext implements Context {
         protected boolean tagOnSuccessfulBuild;
         private String outputDirectory;
     
    -
    -    void databaseEngine(String databaseEngine) {
    -        this.databaseEngine = databaseEngine;
    -    }
    -
         void changeLogFile(String changeLogFile) {
             this.changeLogFile = changeLogFile;
         }
    @@ -63,10 +55,6 @@ void classpath(String classpath) {
             this.classpath = classpath;
         }
     
    -    void driverClassname(String driverClassname) {
    -        this.driverClassname = driverClassname;
    -    }
    -
         void labels(String labels) {
             this.labels = labels;
         }
    @@ -82,9 +70,6 @@ void basePath(String basePath) {
         void rollbackCount(int rollbackCount) {
             this.rollbackCount = rollbackCount;
         }
    -    public String getDatabaseEngine() {
    -        return databaseEngine;
    -    }
     
         public String getChangeLogFile() {
             return changeLogFile;
    @@ -110,10 +95,6 @@ public String getClasspath() {
             return classpath;
         }
     
    -    public String getDriverClassname() {
    -        return driverClassname;
    -    }
    -
         public String getLabels() {
             return labels;
         }
    @@ -126,14 +107,6 @@ public String getBasePath() {
             return basePath;
         }
     
    -    public Boolean getUseIncludedDriver() {
    -        return useIncludedDriver;
    -    }
    -
    -    public void setUseIncludedDriver(Boolean useIncludedDriver) {
    -        this.useIncludedDriver = useIncludedDriver;
    -    }
    -
         public String getCredentialsId() {
             return credentialsId;
         }
    
  • src/main/java/org/jenkinsci/plugins/liquibase/dsl/LiquibaseRunnerDslExtension.java+0 5 modified
    @@ -79,13 +79,8 @@ private static void setCommonBuilderProperties(AbstractLiquibaseBuilder builder,
             builder.setContexts(context.getContexts());
             builder.setLiquibasePropertiesPath(context.getLiquibasePropertiesPath());
             builder.setClasspath(context.getClasspath());
    -        builder.setDriverClassname(context.getDriverClassname());
             builder.setLabels(context.getLabels());
             builder.setCredentialsId(context.getCredentialsId());
             builder.setBasePath(context.getBasePath());
    -        if (context.getDatabaseEngine() != null) {
    -            builder.setUseIncludedDriver(true);
    -        }
    -
         }
     }
    
  • src/main/java/org/jenkinsci/plugins/liquibase/evaluator/AbstractLiquibaseBuilder.java+4 41 modified
    @@ -53,11 +53,9 @@ public abstract class AbstractLiquibaseBuilder extends Builder implements Simple
         protected String contexts;
         protected String liquibasePropertiesPath;
         protected String classpath;
    -    protected String driverClassname;
         protected String labels;
         private String changeLogParameters;
         private String basePath;
    -    private Boolean useIncludedDriver;
         private String credentialsId;
     
     
    @@ -74,23 +72,20 @@ public AbstractLiquibaseBuilder(String databaseEngine,
                                         String contexts,
                                         String liquibasePropertiesPath,
                                         String classpath,
    -                                    String driverClassname,
                                         String changeLogParameters,
                                         String labels,
                                         String basePath,
    -                                    boolean useIncludedDriver, String credentialsId) {
    +                                    String credentialsId) {
             this.databaseEngine = databaseEngine;
             this.changeLogFile = changeLogFile;
             this.url = url;
             this.defaultSchemaName = defaultSchemaName;
             this.contexts = contexts;
             this.liquibasePropertiesPath = liquibasePropertiesPath;
             this.classpath = classpath;
    -        this.driverClassname = driverClassname;
             this.changeLogParameters = changeLogParameters;
             this.labels = labels;
             this.basePath = basePath;
    -        this.useIncludedDriver = useIncludedDriver;
             this.credentialsId = credentialsId;
         }
     
    @@ -99,9 +94,6 @@ public AbstractLiquibaseBuilder() {
         }
     
         protected Object readResolve() {
    -        if (useIncludedDriver == null) {
    -            useIncludedDriver = Strings.isNullOrEmpty(driverClassname);
    -        }
             return this;
         }
     
    @@ -151,7 +143,6 @@ public Liquibase createLiquibase(Run<?, ?> build,
                                          Properties configProperties,
                                          Launcher launcher, FilePath workspace) throws IOException, InterruptedException {
             Liquibase liquibase;
    -        String driverName = getProperty(configProperties, LiquibaseProperty.DRIVER);
             String resolvedClasspath = getProperty(configProperties, LiquibaseProperty.CLASSPATH);
     
             boolean resolveMacros = build instanceof AbstractBuild;
    @@ -161,7 +152,7 @@ public Liquibase createLiquibase(Run<?, ?> build,
                 if (!Strings.isNullOrEmpty(resolvedClasspath)) {
                     Util.addClassloader(launcher.isUnix(), workspace, resolvedClasspath);
                 }
    -            JdbcConnection jdbcConnection = createJdbcConnection(configProperties, driverName);
    +            JdbcConnection jdbcConnection = createJdbcConnection(configProperties);
                 Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(jdbcConnection);
                 ResourceAccessor resourceAccessor = createResourceAccessor(workspace, environment, resolveMacros);
     
    @@ -222,11 +213,11 @@ protected static void populateChangeLogParameters(Liquibase liquibase,
             }
         }
     
    -    private static JdbcConnection createJdbcConnection(Properties configProperties, String driverName) {
    +    private static JdbcConnection createJdbcConnection(Properties configProperties) {
             Connection connection;
             String dbUrl = getProperty(configProperties, LiquibaseProperty.URL);
    +        final String driverName = DatabaseFactory.getInstance().findDefaultDriver(dbUrl);
             try {
    -
                 Util.registerDatabaseDriver(driverName,
                         configProperties.getProperty(LiquibaseProperty.CLASSPATH.propertyName()));
                 String userName = getProperty(configProperties, LiquibaseProperty.USERNAME);
    @@ -266,10 +257,6 @@ private static void closeLiquibase(Liquibase liquibase) {
             }
         }
     
    -    public List<IncludedDatabaseDriver> getDrivers() {
    -        return ChangesetEvaluator.DESCRIPTOR.getIncludedDatabaseDrivers();
    -    }
    -
         public String getDatabaseEngine() {
             return databaseEngine;
         }
    @@ -333,15 +320,6 @@ public void setClasspath(String classpath) {
             this.classpath = classpath;
         }
     
    -    public String getDriverClassname() {
    -        return driverClassname;
    -    }
    -
    -    @DataBoundSetter
    -    public void setDriverClassname(String driverClassname) {
    -        this.driverClassname = driverClassname;
    -    }
    -
         public String getChangeLogParameters() {
             return changeLogParameters;
         }
    @@ -368,25 +346,10 @@ public String getBasePath() {
         public void setBasePath(String basePath) {
             this.basePath = basePath;
         }
    -    public void clearDriverClassname() {
    -        driverClassname = null;
    -    }
     
         public void clearDatabaseEngine() {
             databaseEngine=null;
         }
    -    public boolean hasUseIncludedDriverBeenSet() {
    -        return useIncludedDriver!=null;
    -    }
    -
    -    public boolean isUseIncludedDriver() {
    -        return useIncludedDriver;
    -    }
    -
    -    @DataBoundSetter
    -    public void setUseIncludedDriver(Boolean useIncludedDriver) {
    -        this.useIncludedDriver = useIncludedDriver;
    -    }
     
         public String getCredentialsId() {
             return credentialsId;
    
  • src/main/java/org/jenkinsci/plugins/liquibase/evaluator/AbstractLiquibaseDescriptor.java+0 16 modified
    @@ -19,7 +19,6 @@
     import static com.cloudbees.plugins.credentials.CredentialsMatchers.instanceOf;
     
     public abstract class AbstractLiquibaseDescriptor extends BuildStepDescriptor<Builder> {
    -    private List<IncludedDatabaseDriver> includedDatabaseDrivers;
     
         public AbstractLiquibaseDescriptor(Class<? extends Builder> clazz) {
             super(clazz);
    @@ -29,26 +28,11 @@ public AbstractLiquibaseDescriptor() {
             super();
         }
     
    -    public List<IncludedDatabaseDriver> getIncludedDatabaseDrivers() {
    -        if (includedDatabaseDrivers == null) {
    -            initDriverList();
    -        }
    -        return includedDatabaseDrivers;
    -    }
    -
         public ListBoxModel doFillCredentialsIdItems(@AncestorInPath Project project) {
             return new StandardListBoxModel()
                     .withEmptySelection()
                     .withMatching(anyOf(
                             instanceOf(UsernamePasswordCredentials.class)),
                             CredentialsProvider.lookupCredentials(StandardUsernameCredentials.class, project));
         }
    -
    -    private void initDriverList() {
    -        includedDatabaseDrivers = Lists.newArrayList(new IncludedDatabaseDriver("MySQL", "com.mysql.jdbc.Driver"),
    -                new IncludedDatabaseDriver("PostgreSQL", "org.postgresql.Driver"),
    -                new IncludedDatabaseDriver("Derby", "org.apache.derby.jdbc.EmbeddedDriver"),
    -                new IncludedDatabaseDriver("Hypersonic", "org.hsqldb.jdbcDriver"),
    -                new IncludedDatabaseDriver("H2", "org.h2.Driver"));
    -    }
     }
    
  • src/main/java/org/jenkinsci/plugins/liquibase/evaluator/ChangesetEvaluator.java+2 4 modified
    @@ -95,18 +95,16 @@ public ChangesetEvaluator(String databaseEngine,
                                   String contexts,
                                   String liquibasePropertiesPath,
                                   String classpath,
    -                              String driverClassname,
                                   String changeLogParameters,
                                   boolean testRollbacks,
                                   boolean dropAll,
                                   String labels,
                                   String basePath,
                                   boolean tagOnSuccessfulBuild,
    -                              boolean useIncludedDriver,
                                   String credentialsId) {
             super(databaseEngine, changeLogFile, url, defaultSchemaName, contexts,
                     liquibasePropertiesPath,
    -                classpath, driverClassname, changeLogParameters, labels, basePath, useIncludedDriver, credentialsId);
    +                classpath, changeLogParameters, labels, basePath, credentialsId);
             this.testRollbacks = testRollbacks;
             this.dropAll = dropAll;
             this.tagOnSuccessfulBuild = tagOnSuccessfulBuild;
    @@ -166,4 +164,4 @@ public String getDisplayName() {
             }
         }
     
    -}
    \ No newline at end of file
    +}
    
  • src/main/java/org/jenkinsci/plugins/liquibase/evaluator/IncludedDatabaseDriver.java+0 23 removed
    @@ -1,23 +0,0 @@
    -package org.jenkinsci.plugins.liquibase.evaluator;
    -
    -/**
    - * Describes database drivers that are included with the plugin.
    - */
    -public class IncludedDatabaseDriver {
    -    private String displayName;
    -    private String driverClassName;
    -
    -
    -    public IncludedDatabaseDriver(String displayName, String driverClassName) {
    -        this.displayName = displayName;
    -        this.driverClassName = driverClassName;
    -    }
    -
    -    public String getDisplayName() {
    -        return displayName;
    -    }
    -
    -    public String getDriverClassName() {
    -        return driverClassName;
    -    }
    -}
    
  • src/main/java/org/jenkinsci/plugins/liquibase/evaluator/RollbackBuilder.java+2 3 modified
    @@ -107,18 +107,17 @@ public RollbackBuilder(String databaseEngine,
                                String contexts,
                                String liquibasePropertiesPath,
                                String classpath,
    -                           String driverClassname,
                                String changeLogParameters,
                                String labels,
                                String basePath,
                                String rollbackType,
                                String numberOfChangesetsToRollback,
                                String rollbackLastHours,
    -                           String rollbackToTag, String rollbackToDate, boolean useIncludedDriver,
    +                           String rollbackToTag, String rollbackToDate,
                                String credentialsId) {
             super(databaseEngine, changeLogFile, url, defaultSchemaName, contexts,
                     liquibasePropertiesPath,
    -                classpath, driverClassname, changeLogParameters, labels, basePath, useIncludedDriver, credentialsId);
    +                classpath, changeLogParameters, labels, basePath, credentialsId);
     
             this.rollbackType = rollbackType;
             this.numberOfChangesetsToRollback = numberOfChangesetsToRollback;
    
  • src/main/java/org/jenkinsci/plugins/liquibase/workflow/AbstractLiquibaseStep.java+0 10 modified
    @@ -15,7 +15,6 @@ public abstract class AbstractLiquibaseStep extends AbstractStepImpl {
         protected String contexts = null;
         protected String liquibasePropertiesPath = null;
         protected String classpath = null;
    -    protected String driverClassname = null;
         protected String labels = null;
         private String basePath = null;
         private List<String> changeLogParameterList = null;
    @@ -62,11 +61,6 @@ public void setClasspath(String classpath) {
             this.classpath = Util.fixEmptyAndTrim(classpath);
         }
     
    -    @DataBoundSetter
    -    public void setDriverClassname(String driverClassname) {
    -        this.driverClassname = Util.fixEmptyAndTrim(driverClassname);
    -    }
    -
         @DataBoundSetter
         public void setLabels(String labels) {
             this.labels = Util.fixEmptyAndTrim(labels);
    @@ -116,10 +110,6 @@ public String getClasspath() {
             return classpath;
         }
     
    -    public String getDriverClassname() {
    -        return driverClassname;
    -    }
    -
         public String getLabels() {
             return labels;
         }
    
  • src/main/java/org/jenkinsci/plugins/liquibase/workflow/LiquibaseWorkflowUtil.java+0 4 modified
    @@ -14,7 +14,6 @@ public static void setCommonConfiguration(AbstractLiquibaseBuilder builder, Abst
             builder.setContexts(step.getContexts());
             builder.setLiquibasePropertiesPath(step.getLiquibasePropertiesPath());
             builder.setClasspath(step.getClasspath());
    -        builder.setDriverClassname(step.getDriverClassname());
             builder.setLabels(step.getLabels());
             builder.setCredentialsId(step.getCredentialsId());
             builder.setBasePath(step.getBasePath());
    @@ -24,9 +23,6 @@ public static void setCommonConfiguration(AbstractLiquibaseBuilder builder, Abst
                 builder.setChangeLogParameters(parameterList);
             }
             builder.setDatabaseEngine(step.getDatabaseEngine());
    -        if (step.getDatabaseEngine() != null) {
    -            builder.setUseIncludedDriver(true);
    -        }
         }
     
         protected static String composeParameters(AbstractLiquibaseStep step) {
    
  • src/main/resources/org/jenkinsci/plugins/liquibase/evaluator/AbstractLiquibaseBuilder/liquibase-common-config.jelly+0 24 modified
    @@ -4,30 +4,6 @@
              xmlns:f="/lib/form"
              xmlns:c="/lib/credentials">
     
    -    <f:section title="Database Driver">
    -        <f:radioBlock inline="true" name="useIncludedDriver"
    -                      checked="${instance.databaseEngine!=null &amp;&amp; instance.databaseEngine!=''}" value="true"
    -                      title="${%Use one of the included drivers}">
    -            <f:entry title="${%Database engine}" field="databaseEngine">
    -                <select class="setting-input" name="LiquibaseBuilder.databaseEngine">
    -                    <option value="">Select included driver</option>
    -                    <j:forEach var="engine" items="${descriptor.getIncludedDatabaseDrivers()}">
    -                        <f:option selected="${instance.databaseEngine==engine.displayName}"
    -                                  value="${engine.displayName}">${engine.displayName}
    -                        </f:option>
    -                    </j:forEach>
    -                </select>
    -            </f:entry>
    -        </f:radioBlock>
    -
    -        <f:radioBlock inline="true" name="useIncludedDriver"
    -                      checked="${instance.driverClassname!=null &amp;&amp; instance.driverClassname!=''}" value="false"
    -                      title="${%Specify driver classname}">
    -            <f:entry title="${%Database driver classname}" field="driverClassname">
    -                <f:textbox value="${instance.driverClassname}"/>
    -            </f:entry>
    -        </f:radioBlock>
    -    </f:section>
         <f:section title="Connection Details">
             <f:entry title="Database URL" field="url" description="example: jdbc:mysql://localhost:3306/sampledb">
                 <f:textbox value="${instance.url}"/>
    
  • src/main/resources/org/jenkinsci/plugins/liquibase/workflow/AbstractLiquibaseStep/config.jelly+1 4 modified
    @@ -5,9 +5,6 @@
              xmlns:c="/lib/credentials">
     
         <f:section title="Connection Details">
    -        <f:entry title="${%Database driver classname}" field="driverClassname">
    -            <f:textbox/>
    -        </f:entry>
             <f:entry title="Database URL" field="url" description="example: jdbc:mysql://localhost:3306/sampledb">
                 <f:textbox/>
             </f:entry>
    @@ -46,4 +43,4 @@
                 <f:textarea/>
             </f:entry>
         </f:section>
    -</j:jelly>
    \ No newline at end of file
    +</j:jelly>
    
  • src/test/java/org/jenkinsci/plugins/liquibase/dsl/LiquibaseRunnerDslExtensionTest.java+1 2 modified
    @@ -75,7 +75,6 @@ public void should_spawn_liquibase_project() throws IOException, ExecutionExcept
             assertThat(builder.getChangeLogFile(), is("sunny-day-changeset.xml"));
             assertThat(builder.isTestRollbacks(), is(true));
             assertThat(builder.getUrl(), is("jdbc:postgresql://localhost:5432/sample-db"));
    -        assertThat(builder.getDriverClassname(), is("org.postgresql.Driver"));
             assertThat(builder.getContexts(), is("staging"));
             assertThat(builder.getChangeLogParameters(), containsString("sample.table.name=blue"));
             assertThat(builder.getChangeLogParameters(), containsString("favorite.food=spaghetti"));
    @@ -166,4 +165,4 @@ static String formatLogForLog(Iterable<String> buildLog) {
             return sb.substring(0, sb.length() - 1);
         }
     
    -}
    \ No newline at end of file
    +}
    
  • src/test/java/org/jenkinsci/plugins/liquibase/integration/DriverSelectionFormTest.java+0 131 removed
    @@ -1,131 +0,0 @@
    -package org.jenkinsci.plugins.liquibase.integration;
    -
    -import hudson.model.FreeStyleProject;
    -
    -import java.io.IOException;
    -import java.util.List;
    -
    -import org.apache.commons.lang3.RandomStringUtils;
    -import org.jenkinsci.plugins.liquibase.evaluator.ChangesetEvaluator;
    -import org.junit.Before;
    -import org.junit.ClassRule;
    -import org.junit.Rule;
    -import org.junit.Test;
    -import org.junit.rules.TemporaryFolder;
    -import org.jvnet.hudson.test.JenkinsRule;
    -import org.slf4j.Logger;
    -import org.slf4j.LoggerFactory;
    -import org.xml.sax.SAXException;
    -
    -import com.gargoylesoftware.htmlunit.html.HtmlElement;
    -import com.gargoylesoftware.htmlunit.html.HtmlForm;
    -import com.gargoylesoftware.htmlunit.html.HtmlInput;
    -import com.gargoylesoftware.htmlunit.html.HtmlPage;
    -
    -import static org.hamcrest.CoreMatchers.is;
    -import static org.hamcrest.CoreMatchers.not;
    -import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
    -import static org.hamcrest.collection.IsEmptyCollection.empty;
    -import static org.jenkinsci.plugins.liquibase.matchers.InputCheckedMatcher.isChecked;
    -import static org.jenkinsci.plugins.liquibase.matchers.InputCheckedMatcher.isNotChecked;
    -import static org.junit.Assert.assertThat;
    -
    -public class DriverSelectionFormTest {
    -
    -    private static final Logger LOG = LoggerFactory.getLogger(DriverSelectionFormTest.class);
    -
    -    @ClassRule
    -    public static JenkinsRule jenkinsRule = new JenkinsRule();
    -
    -
    -    @Rule
    -    public TemporaryFolder temporaryFolder = new TemporaryFolder();
    -    protected JenkinsRule.WebClient webClient;
    -    protected FreeStyleProject project;
    -    protected ChangesetEvaluator evaluator;
    -
    -    @Before
    -    public void setup() throws IOException, SAXException {
    -
    -        webClient = jenkinsRule.createWebClient();
    -        project = jenkinsRule.createFreeStyleProject(RandomStringUtils.randomAlphabetic(8));
    -        evaluator = new ChangesetEvaluator();
    -        evaluator.setUrl(LiquibaseTestUtil.IN_MEMORY_JDBC_URL);
    -        project.getBuildersList().add(evaluator);
    -        evaluator.setChangeLogFile(LiquibaseTestUtil
    -                .createFileFromResource(temporaryFolder.getRoot(), "/example-changesets/single-changeset.xml")
    -                .getAbsolutePath());
    -
    -    }
    -
    -    @Test
    -    public void should_hide_driverclassname() throws IOException, SAXException {
    -        evaluator.setDatabaseEngine(LiquibaseTestUtil.H2);
    -        project.save();
    -
    -        HtmlForm config = clickAdvanceConfig();
    -
    -        List<?> radios = config.getByXPath("//*[@type='radio' and contains(@name,'Included')]");
    -        assertThat(radios, hasSize(2));
    -        HtmlInput useIncludedRadio = (HtmlInput) radios.get(0);
    -        HtmlInput useSpecifiedDriver = (HtmlInput) radios.get(1);
    -
    -        List<?> inputs = config.getByXPath("//*[@name='_.driverClassname']");
    -        HtmlInput driverClassnameInput = (HtmlInput) inputs.get(0);
    -
    -        LOG.debug("classname input:{}", driverClassnameInput);
    -        LOG.debug("disabled? {}", driverClassnameInput.isDisabled());
    -
    -        LOG.debug("radios size:{}", radios.size());
    -
    -        assertThat(useIncludedRadio, isChecked());
    -        assertThat(useSpecifiedDriver, isNotChecked());
    -        assertThat(isDriverClassnameRowHidden(config), is(true));
    -
    -    }
    -
    -    @Test
    -    public void should_have_specified_driverclassname_enabled() throws IOException, SAXException {
    -        String driverClassname = RandomStringUtils.randomAlphabetic(10);
    -        evaluator.setDriverClassname(driverClassname);
    -        evaluator.clearDatabaseEngine();
    -        project.save();
    -
    -        HtmlForm config = clickAdvanceConfig();
    -
    -        List<?> radios = config.getByXPath("//*[@type='radio' and contains(@name,'Included')]");
    -
    -        assertThat(radios, hasSize(2));
    -        HtmlInput useIncludedRadio = (HtmlInput) radios.get(0);
    -        HtmlInput useSpecifiedDriver = (HtmlInput) radios.get(1);
    -
    -        assertThat(useIncludedRadio, isNotChecked());
    -        assertThat(useSpecifiedDriver, isChecked());
    -        assertThat(isDriverClassnameRowHidden(config), is(false));
    -
    -        String driverClassnameInputValue = getDriverClassnameInputValue(config);
    -        assertThat(driverClassnameInputValue, is(driverClassname));
    -
    -    }
    -
    -    private HtmlForm clickAdvanceConfig() throws IOException, SAXException {
    -        HtmlPage htmlPage = webClient.goTo(project.getUrl() + "/configure");
    -        HtmlForm config = htmlPage.getFormByName("config");
    -        ((HtmlElement) config.getByXPath("//div[@class='advancedLink']//button").get(0)).click();
    -        return config;
    -    }
    -
    -    private static String getDriverClassnameInputValue(HtmlForm config) {
    -        List<?> inputs = config.getByXPath("//*[@name='_.driverClassname']");
    -        HtmlInput driverClassnameInput = (HtmlInput) inputs.get(0);
    -        return driverClassnameInput.getValueAttribute();
    -    }
    -
    -    private static boolean isDriverClassnameRowHidden(HtmlForm config) {
    -        List<?> tableRows = config.getByXPath("//*[@name='_.driverClassname']/../..");
    -        assertThat(tableRows, not(empty()));
    -        HtmlElement row = (HtmlElement) tableRows.get(0);
    -        LOG.debug("row, maybe? {}" , row);
    -        return row.getAttribute("style").contains("display: none;");
    -    }
    -}
    
  • src/test/resources/dsl/liquibase-update-fullconfig.groovy+0 1 modified
    @@ -7,7 +7,6 @@ freeStyleJob('@JOB_NAME@') {
           changeLogFile('sunny-day-changeset.xml')
           testRollbacks(true)
           url('jdbc:postgresql://localhost:5432/sample-db')
    -      driverClassname('org.postgresql.Driver')
           contexts('staging')
           changeLogParameters(["sample.table.name": "blue",
                                "favorite.food"    : "spaghetti"])
    
  • src/test/resources/pipelinescripts/example-pipeline.groovy+0 4 modified
    @@ -9,9 +9,6 @@ node {
       liquibaseUpdate(changeLogFile: 'changeset.yml',
               testRollbacks: true,
               url: 'jdbc:postgresql://localhost:5432/sample-db',
    -          driverClassname: 'org.postgresql.Driver',
    -          // instead of driverClassname, you can set databaseEngine to MySQL, Derby, Postgres, Derby, or Hypersonic
    -          databaseEngine: 'MySQL',
               credentialsId: 'database_password_credentials_id',
               liquibasePropertiesPath: '/etc/liquibase.properties',
               contexts: 'staging',
    @@ -31,7 +28,6 @@ node {
       // rollbackCount, rollbackToTag, rollbackToDate, or rollbackLastHours.
       liquibaseRollback(changeLogFile: 'changeset.yml',
               url: 'jdbc:postgresql://localhost:5432/sample-db',
    -          driverClassname: 'org.postgresql.Driver',
               credentialsId: 'database_password_credentials_id',
               liquibasePropertiesPath: '/etc/liquibase.properties',
               rollbackToTag: 'deploy-2.5',
    
  • src/test/resources/pipelinescripts/self-contained-pipeline.groovy+1 2 modified
    @@ -4,7 +4,6 @@ node {
       writeFile file: 'changeset.yml', text: changelog()
     
       liquibaseUpdate(changeLogFile: 'changeset.yml', testRollbacks: true,
    -          driverClassname: 'org.h2.Driver',
               url: 'jdbc:h2:mem:builder-db')
     }
     
    @@ -36,4 +35,4 @@ databaseChangeLog:
     
     """
     
    -}
    \ No newline at end of file
    +}
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

6

News mentions

0

No linked articles in our index yet.