class DbDeployCommandLineParser {

	public void parse(String[] args, DbDeploy dbDeploy) throws UsageException {
		try {
			dbDeploy.setScriptdirectory(new File("."));
            final CommandLine commandLine = new GnuParser().parse(getOptions(), args);
			copyValuesFromCommandLineToDbDeployBean(dbDeploy, commandLine);

            if (commandLine.hasOption("password") && commandLine.getOptionValue("password") == null) {
                dbDeploy.setPassword(userInputReader.read("Password"));
            }
		} catch (ParseException e) {
			throw new UsageException(e.getMessage(), e);
		}
	}

	public  DbDeployCommandLineParser();
	public  DbDeployCommandLineParser(UserInputReader userInputReader);

}