public static void main(String[] args) throws ParseException {
		
		Options options = new Options();
		
		OptionBuilder.isRequired();
		OptionBuilder.hasArg();
		OptionBuilder.withArgName("file");
		OptionBuilder.withDescription("Input file");
		options.addOption(OptionBuilder.create("inputFile"));
		
		OptionBuilder.isRequired();
		OptionBuilder.hasArg();
		OptionBuilder.withArgName("file");
		OptionBuilder.withDescription("Output file");
		options.addOption(OptionBuilder.create("outputFile"));
		
//		OptionBuilder.isRequired();
//		OptionBuilder.hasArg();
//		OptionBuilder.withArgName("format");
//		OptionBuilder.withDescription("Transformation (propToXls, xlsToProp");
//		options.addOption(OptionBuilder.create("format"));
		
		CommandLineParser parser = new BasicParser();
		CommandLine cmd = parser.parse(options, args);
		
		
		// Input:
		String input = cmd.getOptionValue("inputFile");
		String inputFilename = FilenameUtils.getName(input);
		String inputDirname = FilenameUtils.getFullPath(input);
		File inputDir = new File(inputDirname);
		if (!inputDir.exists()) {
			inputDirname = System.getProperty("user.dir");
			inputDir = new File(inputDirname);
		}
		input = FilenameUtils.concat(inputDirname, inputFilename);
		
		
		String output = cmd.getOptionValue("outputFile");
		String outputFilename = FilenameUtils.getName(output);
		String outputDirname = FilenameUtils.getFullPath(output);
		File outputDir = new File(outputDirname);
		if (!outputDir.exists()) {
			outputDirname = System.getProperty("user.dir");
			outputDir = new File(outputDirname);
		}
		output = FilenameUtils.concat(outputDirname, outputFilename);
		
		String inputExt = FilenameUtils.getExtension(input);
		String outputExt = FilenameUtils.getExtension(output);
		
		List<Transformer> transformers = new ArrayList<Transformer>();
		transformers.add(new PropertiesToXls());
		transformers.add(new XlsToProperties());
		
		for (Transformer t : transformers) {
			if (t.matches(inputExt, outputExt)) {
				System.out.println("Use " + t.getClass().getName());
				try {
					t.execute(input, output);
					System.out.println("Done!");
					System.exit(0);
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}

		System.out.println("Format not supported.");
		System.exit(1);

	}