private void execute()

in src/main/java/org/apache/camel/kameleon/generator/ProjectGeneratorService.java [175:187]


    private void execute(InvocationRequest request) throws MavenInvocationException, IOException {
        Path path = Paths.get(MAVEN_REPO);
        Path localRepo = Files.exists(path) ? path : Files.createDirectory(path);

        Invoker invoker = new DefaultInvoker();
        String mHome = System.getenv("MAVEN_HOME");
        if (mHome == null) {
            throw new IllegalStateException("OS Environment MAVEN_HOME is not set");
        }
        invoker.setMavenHome(new File(mHome));
        invoker.setLocalRepositoryDirectory(localRepo.toFile());
        invoker.execute(request);
    }