File xmlFile = new File("pom.xml");
File yamlFile = new File("pom.yml");
File syncFile = new File(".pom.yml");
SyncManager syncManager = new SyncManager(xmlFile, yamlFile, syncFile);
switch (syncManager.determineFormatToTarget())
{
case YAML:
System.out.println("Converting "+xmlFile.getName() + " into " + yamlFile.getName());
sync(xmlFile, yamlFile, false);
syncManager.save();
break;
case XML:
System.out.println("Converting "+yamlFile.getName() + " into " + xmlFile.getName());
sync(xmlFile, yamlFile, true);
syncManager.save();
break;
case SYNC_FILE_ONLY:
System.out.println("Files in sync, creating a sync file");
syncManager.save();
break;
case NONE:
System.out.println("No sync required");
break;
case UNKNOWN: