Package restx.build

Examples of restx.build.RestxJsonSupport


        if(Files.notExists(restxModuleDescriptor)){
            throw new FileNotFoundException("md.restx.json not found !");
        }

        try(FileInputStream fis = new FileInputStream(restxModuleDescriptor.toFile());) {
            return new RestxJsonSupport().parse(fis).getGav().getVersion();
        }
    }
View Full Code Here


                .run(shell);
        }

        private Optional<String> guessAppClassnameFromRestxModule(RestxShell shell) throws IOException {

            RestxJsonSupport restxJsonSupport = new RestxJsonSupport();

            Path restxJsonFile = shell.currentLocation().resolve(restxJsonSupport.getDefaultFileName());
            if(java.nio.file.Files.notExists(restxJsonFile)){
                return Optional.absent();
            }

            ModuleDescriptor moduleDescriptor = restxJsonSupport.parse(restxJsonFile);
            return Optional.fromNullable(moduleDescriptor.getProperties().get("manifest.main.classname"));
        }
View Full Code Here

    }

    private Optional<ModuleDescriptor> getModuleDescriptor(File currentDirectory) {
        File restXProjectDescriptor = new File(currentDirectory, "md.restx.json");
        if (restXProjectDescriptor.exists()) {
            RestxJsonSupport restxJsonSupport = new RestxJsonSupport();
            try {
                return Optional.of(restxJsonSupport.parse(restXProjectDescriptor.toPath()));
            } catch (IOException e) {
                printError("Failed to read md.restx.json", e);
            }
        }
        File mavenProjectDescriptor = new File(currentDirectory, "pom.xml");
View Full Code Here

TOP

Related Classes of restx.build.RestxJsonSupport

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.