// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/config/AbstractConfigurationParser.java
// public abstract class AbstractConfigurationParser {
// 
//     public static Collection<ConfigurationEntry> discoverConfiguration(File confFile) throws ParseException, IOException {
//         final Log log = LogFactory.getInstance();
//         InputStream input = null;
//         File baseDir = null;
//         try {
//             if (confFile == null) {
//                 log.debug("Looking for dbpach.properties in classpath.");
//                 input = Thread.currentThread().getContextClassLoader().getResourceAsStream("/dbpatch.properties");
//                 log.debug("Resource dbpatch.properties " + (input == null ? "not" : "") + " found in classpath.");
//                 if (input == null) {
//                     log.debug("Looking for dbpach.properties in current directory.");
//                     File f = new File("dbpatch.properties");
//                     log.debug("Resource dbpatch.properties " + (!f.exists() ? "not" : "") + " found in current directory.");
//                     input = new FileInputStream(f);
//                     baseDir = new File(".");
//                 }
//             } else {
//                 if (!confFile.exists()) {
//                     throw new FileNotFoundException(confFile.getAbsolutePath());
//                 }
//                 log.debug("Configuration found - " + confFile.getPath());
//                 input = new FileInputStream(confFile);
//                 baseDir = confFile.getParentFile();
//             }
//             AbstractConfigurationParser parser = new PropertiesConfigurationParser();
//             Collection<ConfigurationEntry> conf = parser.parse(baseDir, input);
//             for (ConfigurationEntry ce : conf) {
//                 ce.validate();
//             }
//             return conf;
//         } finally {
//             CloseUtil.close(input);
//         }
//     }
// 
//     protected abstract Collection<ConfigurationEntry> parse(File baseDir, InputStream input) throws ParseException, IOException;
// }
// 
// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/config/EnvSettings.java
// public class EnvSettings {
//     private final String prefix;
// 
//     private EnvSettings(String prefix) {
//         this.prefix = prefix;
//     }
// 
//     public String getDbPatchFile() {
//         return prefix + "dbpatch.file";
//     }
// 
//     public String getDbPatchConfiguration() {
//         return prefix + "dbpatch.configuration";
//     }
// 
//     public String getDbPatchStop() {
//         return prefix + "dbpatch.stop";
//     }
// 
//     public String getDbPatchSingle() {
//         return prefix + "dbpatch.single";
//     }
// 
//     public String getLogLevel() {
//         return prefix + "dbpatch.logLevel";
//     }
// 
//     public static EnvSettings standalone() {
//         return new EnvSettings("");
//     }
// 
//     public static EnvSettings maven() {
//         return new EnvSettings("maven.");
//     }
// 
//     public static EnvSettings gradle() {
//         return new EnvSettings("gradle.");
//     }
// 
// }


import org.jsoftware.dbpatch.config.AbstractConfigurationParser;
import org.jsoftware.dbpatch.config.ConfigurationEntry;
import org.jsoftware.dbpatch.config.EnvSettings;
import org.jsoftware.dbpatch.impl.gui.InteractivePanel;
import java.util.Collection;
package org.jsoftware.dbpatch.command;




/**
 * Command: Runs interactive client from maven
 *
 * @author szalik
 */
public class InteractiveCommand extends AbstractCommand {

    public InteractiveCommand(EnvSettings envSettings) {
        super(envSettings);
    }

    public void execute() throws CommandExecutionException, CommandFailureException {
        try {
// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/config/AbstractConfigurationParser.java
// public abstract class AbstractConfigurationParser {
// 
//     public static Collection<ConfigurationEntry> discoverConfiguration(File confFile) throws ParseException, IOException {
//         final Log log = LogFactory.getInstance();
//         InputStream input = null;
//         File baseDir = null;
//         try {
//             if (confFile == null) {
//                 log.debug("Looking for dbpach.properties in classpath.");
//                 input = Thread.currentThread().getContextClassLoader().getResourceAsStream("/dbpatch.properties");
//                 log.debug("Resource dbpatch.properties " + (input == null ? "not" : "") + " found in classpath.");
//                 if (input == null) {
//                     log.debug("Looking for dbpach.properties in current directory.");
//                     File f = new File("dbpatch.properties");
//                     log.debug("Resource dbpatch.properties " + (!f.exists() ? "not" : "") + " found in current directory.");
//                     input = new FileInputStream(f);
//                     baseDir = new File(".");
//                 }
//             } else {
//                 if (!confFile.exists()) {
//                     throw new FileNotFoundException(confFile.getAbsolutePath());
//                 }
//                 log.debug("Configuration found - " + confFile.getPath());
//                 input = new FileInputStream(confFile);
//                 baseDir = confFile.getParentFile();
//             }
//             AbstractConfigurationParser parser = new PropertiesConfigurationParser();
//             Collection<ConfigurationEntry> conf = parser.parse(baseDir, input);
//             for (ConfigurationEntry ce : conf) {
//                 ce.validate();
//             }
//             return conf;
//         } finally {
//             CloseUtil.close(input);
//         }
//     }
// 
//     protected abstract Collection<ConfigurationEntry> parse(File baseDir, InputStream input) throws ParseException, IOException;
// }
// 
// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/config/EnvSettings.java
// public class EnvSettings {
//     private final String prefix;
// 
//     private EnvSettings(String prefix) {
//         this.prefix = prefix;
//     }
// 
//     public String getDbPatchFile() {
//         return prefix + "dbpatch.file";
//     }
// 
//     public String getDbPatchConfiguration() {
//         return prefix + "dbpatch.configuration";
//     }
// 
//     public String getDbPatchStop() {
//         return prefix + "dbpatch.stop";
//     }
// 
//     public String getDbPatchSingle() {
//         return prefix + "dbpatch.single";
//     }
// 
//     public String getLogLevel() {
//         return prefix + "dbpatch.logLevel";
//     }
// 
//     public static EnvSettings standalone() {
//         return new EnvSettings("");
//     }
// 
//     public static EnvSettings maven() {
//         return new EnvSettings("maven.");
//     }
// 
//     public static EnvSettings gradle() {
//         return new EnvSettings("gradle.");
//     }
// 
// }


// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/command/InteractiveCommand.java
import org.jsoftware.dbpatch.config.AbstractConfigurationParser;
import org.jsoftware.dbpatch.config.ConfigurationEntry;
import org.jsoftware.dbpatch.config.EnvSettings;
import org.jsoftware.dbpatch.impl.gui.InteractivePanel;
import java.util.Collection;

package org.jsoftware.dbpatch.command;




/**
 * Command: Runs interactive client from maven
 *
 * @author szalik
 */
public class InteractiveCommand extends AbstractCommand {

    public InteractiveCommand(EnvSettings envSettings) {
        super(envSettings);
    }

    public void execute() throws CommandExecutionException, CommandFailureException {
        try {
            Collection<ConfigurationEntry> conf = AbstractConfigurationParser.discoverConfiguration(getConfigFile());