Main.setOptions();
CommandLine line = new PosixParser().parse( options, args );
listener = new OutputStreamListener(System.out);
CocoonBean cocoon = new CocoonBean();
cocoon.addListener(listener);
if (line.hasOption(HELP_OPT)) {
printUsage();
} else if (line.hasOption(VERSION_OPT)) {
printVersion();