Search in sources :

Example 31 with ClassPathResource

use of org.flywaydb.core.internal.util.scanner.classpath.ClassPathResource in project killbill by killbill.

the class Migrator method printVersion.

/**
     * Prints the version number on the console.
     *
     * @throws IOException when the version could not be read.
     */
private static void printVersion() throws IOException {
    final String version = new ClassPathResource("org/flywaydb/core/internal/version.txt", VersionPrinter.class.getClassLoader()).loadAsString("UTF-8");
    LOG.info("Flyway " + version + " for Kill Bill");
    LOG.debug("Java " + System.getProperty("java.version") + " (" + System.getProperty("java.vendor") + ")");
    LOG.debug(System.getProperty("os.name") + " " + System.getProperty("os.version") + " " + System.getProperty("os.arch") + "\n");
}
Also used : ClassPathResource(org.flywaydb.core.internal.util.scanner.classpath.ClassPathResource)

Aggregations

ClassPathResource (org.flywaydb.core.internal.util.scanner.classpath.ClassPathResource)31 Test (org.junit.Test)21 SqlScript (org.flywaydb.core.internal.dbsupport.SqlScript)17 SqlStatement (org.flywaydb.core.internal.dbsupport.SqlStatement)11 File (java.io.File)4 SQLException (java.sql.SQLException)4 HashMap (java.util.HashMap)4 PlaceholderReplacer (org.flywaydb.core.internal.util.PlaceholderReplacer)4 Resource (org.flywaydb.core.internal.util.scanner.Resource)4 ClassPathScanner (org.flywaydb.core.internal.util.scanner.classpath.ClassPathScanner)4 BeforeClass (org.junit.BeforeClass)4 FlywayException (org.flywaydb.core.api.FlywayException)3 ArrayList (java.util.ArrayList)2 Properties (java.util.Properties)2 FlywaySqlException (org.flywaydb.core.internal.dbsupport.FlywaySqlException)2 FlywaySqlScriptException (org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException)2 Schema (org.flywaydb.core.internal.dbsupport.Schema)2 Location (org.flywaydb.core.internal.util.Location)2 AfterClass (org.junit.AfterClass)2 InputStreamReader (java.io.InputStreamReader)1