Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.github.stephanenicolas.ormgap;
 
 import java.io.File;
 import  org.gradle.api.logging.Logger;

Create the ORM Lite config file. Allows to fully test the task.

Author(s):
SNI.
public class CreateOrmLiteConfigAction {
    private final File configFile;
    private File searchDir;
    private String classpath;
    private Logger logger;
    public CreateOrmLiteConfigAction(File configFile,
                                     File searchDir,
                                     String classpath,
                                     Logger logger) {
        this. = configFile;
        this. = searchDir;
        this. = classpath;
        this. = logger;
    }
    public void execute() throws IOExceptionInterruptedException {
        ProcessBuilder builder
            = new ProcessBuilder("java",
                                 "-cp",
                                 ,
                                 "com.github.stephanenicolas.ormgap.OrmLiteConfigUtil",
                                 .getAbsolutePath(),
                                 .getAbsolutePath());
        .debug("Generating ORMLite Config file using command line: " + builder.command());
        builder
            .inheritIO()
            .directory();
        final int result = builder.start().waitFor();
        if (result != 0) {
            throw new RuntimeException("OrmLiteConfigUtil finished with code: " + result);
        }
    }
New to GrepCode? Check out our FAQ X