Search in sources :

Example 1 with ResinConfTemplate

use of com.ibeiliao.deployment.transfer.conf.ResinConfTemplate in project Corgi by kevinYin.

the class JavaTransferService method generateResinConf.

private List<String> generateResinConf() {
    if (request.getModuleType() == ModuleType.WEB_PROJECT.getValue()) {
        ModuleConf moduleConf = new ModuleConf();
        moduleConf.setProjectNo(request.getProjectName());
        moduleConf.setJvmArg(request.getJvmArgs());
        moduleConf.setShortModuleName(shortModuleName);
        moduleConf.setModuleFinalName(request.getModuleFinalName());
        ResinConfTemplate template = new ResinConfTemplate(request.getResinConf(), moduleConf);
        try {
            return template.createConfFiles(FileUtils.getTempDirectoryPath());
        } catch (IOException e) {
            logger.info("生成resin配置文件失败, {}", e);
            result.setSuccessType(DeployResult.FAILURE);
            return Collections.emptyList();
        }
    }
    return Collections.emptyList();
}
Also used : ResinConfTemplate(com.ibeiliao.deployment.transfer.conf.ResinConfTemplate) IOException(java.io.IOException) ModuleConf(com.ibeiliao.deployment.transfer.vo.ModuleConf)

Aggregations

ResinConfTemplate (com.ibeiliao.deployment.transfer.conf.ResinConfTemplate)1 ModuleConf (com.ibeiliao.deployment.transfer.vo.ModuleConf)1 IOException (java.io.IOException)1