Package org.twdata.maven.yamlpom

Examples of org.twdata.maven.yamlpom.SyncManager


        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:
View Full Code Here

TOP

Related Classes of org.twdata.maven.yamlpom.SyncManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.