// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/command/AbstractCommand.java
// public abstract class AbstractCommand {
//     protected final org.jsoftware.dbpatch.log.Log log = LogFactory.getInstance();
//     protected final EnvSettings envSettings;
//     private File configFile;
//     protected ConfigurationEntry configurationEntry;
//     protected File directory;
// 
//     protected AbstractCommand(EnvSettings envSettings) {
//         this.envSettings = envSettings;
//     }
// 
//     public void setConfigFile(File configFile) {
//         this.configFile = configFile;
//     }
// 
//     public void setConf(ConfigurationEntry conf) {
//         this.configurationEntry = conf;
//     }
// 
//     public void setDirectory(File directory) {
//         this.directory = directory;
//     }
// 
//     public File getConfigFile() {
//         if (configFile != null) {
//             return configFile;
//         }
//         String cFile = System.getProperty(envSettings.getDbPatchFile());
//         if (cFile != null) {
//             return new File(cFile);
//         } else {
//             return null;
//         }
//     }
// 
//     public ConfigurationEntry getConf() {
//         return configurationEntry;	/* findBugs ok - unwritten field (maven writes it) */
//     }
// 
// 
//     public abstract void execute() throws CommandExecutionException, CommandFailureException;
// 
// }
// 
// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/command/CommandExecutionException.java
// public class CommandExecutionException extends Exception {
//     public CommandExecutionException(String message) {
//         super(message);
//     }
// 
//     public CommandExecutionException(String message, Throwable init) {
//         super(message);
//         initCause(init);
//     }
// }
// 
// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/command/CommandFailureException.java
// public class CommandFailureException extends Exception {
//     private final Object source;
//     private final String messageString, descriptionString;
// 
//     public CommandFailureException(Object source, String message, String description) {
//         super(message + " - " + description);
//         this.source = source;
//         this.messageString = message;
//         this.descriptionString = description;
//     }
// 
//     public CommandFailureException(String message) {
//         super(message);
//         this.messageString = message;
//         this.source = null;
//         this.descriptionString = null;
//     }
// 
//     public Object getSource() {
//         return source;
//     }
// 
//     public String getMessageString() {
//         return messageString;
//     }
// 
//     public String getDescriptionString() {
//         return descriptionString;
//     }
// }


import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.Log;
import org.jsoftware.dbpatch.command.AbstractCommand;
import org.jsoftware.dbpatch.command.CommandExecutionException;
import org.jsoftware.dbpatch.command.CommandFailureException;
import org.jsoftware.dbpatch.log.LogFactory;
import java.io.File;
            mojoFailureException.initCause(e);
            throw mojoFailureException;
        }
    }

    protected void setup(C command) {
        // nothing extra to do here
    }
}

class MavenLog implements org.jsoftware.dbpatch.log.Log {
    private final Log mLog;

    MavenLog(Log mLog) {
        this.mLog = mLog;
    }

    public void trace(String msg, Throwable e) {
        if (e == null) {
            mLog.debug(msg);
        } else {
            mLog.debug(msg, e);
        }
    }

    public void warn(String msg) {
        mLog.warn(msg);
    }

    public void info(String msg) {
// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/command/AbstractCommand.java
// public abstract class AbstractCommand {
//     protected final org.jsoftware.dbpatch.log.Log log = LogFactory.getInstance();
//     protected final EnvSettings envSettings;
//     private File configFile;
//     protected ConfigurationEntry configurationEntry;
//     protected File directory;
// 
//     protected AbstractCommand(EnvSettings envSettings) {
//         this.envSettings = envSettings;
//     }
// 
//     public void setConfigFile(File configFile) {
//         this.configFile = configFile;
//     }
// 
//     public void setConf(ConfigurationEntry conf) {
//         this.configurationEntry = conf;
//     }
// 
//     public void setDirectory(File directory) {
//         this.directory = directory;
//     }
// 
//     public File getConfigFile() {
//         if (configFile != null) {
//             return configFile;
//         }
//         String cFile = System.getProperty(envSettings.getDbPatchFile());
//         if (cFile != null) {
//             return new File(cFile);
//         } else {
//             return null;
//         }
//     }
// 
//     public ConfigurationEntry getConf() {
//         return configurationEntry;	/* findBugs ok - unwritten field (maven writes it) */
//     }
// 
// 
//     public abstract void execute() throws CommandExecutionException, CommandFailureException;
// 
// }
// 
// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/command/CommandExecutionException.java
// public class CommandExecutionException extends Exception {
//     public CommandExecutionException(String message) {
//         super(message);
//     }
// 
//     public CommandExecutionException(String message, Throwable init) {
//         super(message);
//         initCause(init);
//     }
// }
// 
// Path: dbpatch-core/src/main/java/org/jsoftware/dbpatch/command/CommandFailureException.java
// public class CommandFailureException extends Exception {
//     private final Object source;
//     private final String messageString, descriptionString;
// 
//     public CommandFailureException(Object source, String message, String description) {
//         super(message + " - " + description);
//         this.source = source;
//         this.messageString = message;
//         this.descriptionString = description;
//     }
// 
//     public CommandFailureException(String message) {
//         super(message);
//         this.messageString = message;
//         this.source = null;
//         this.descriptionString = null;
//     }
// 
//     public Object getSource() {
//         return source;
//     }
// 
//     public String getMessageString() {
//         return messageString;
//     }
// 
//     public String getDescriptionString() {
//         return descriptionString;
//     }
// }


// Path: dbpatch-maven-plugin/src/main/java/org/jsoftware/dbpatch/maven/CommandMojoAdapter.java
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.Log;
import org.jsoftware.dbpatch.command.AbstractCommand;
import org.jsoftware.dbpatch.command.CommandExecutionException;
import org.jsoftware.dbpatch.command.CommandFailureException;
import org.jsoftware.dbpatch.log.LogFactory;
import java.io.File;

            mojoFailureException.initCause(e);
            throw mojoFailureException;
        }
    }

    protected void setup(C command) {
        // nothing extra to do here
    }
}

class MavenLog implements org.jsoftware.dbpatch.log.Log {
    private final Log mLog;

    MavenLog(Log mLog) {
        this.mLog = mLog;
    }

    public void trace(String msg, Throwable e) {
        if (e == null) {
            mLog.debug(msg);
        } else {
            mLog.debug(msg, e);
        }
    }

    public void warn(String msg) {
        mLog.warn(msg);
    }

    public void info(String msg) {
        mLog.info(msg);