Search in sources :

Example 1 with ModuleConf

use of com.ibeiliao.deployment.transfer.vo.ModuleConf 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)

Example 2 with ModuleConf

use of com.ibeiliao.deployment.transfer.vo.ModuleConf in project Corgi by kevinYin.

the class ResinConfTemplateTest method testCreateConf.

@Test
public void testCreateConf() throws Exception {
    ResinConf resinConf = new ResinConf();
    resinConf.setDomain("pf.dev.ibeiliao.net");
    resinConf.setSocketTimeout(30);
    resinConf.setKeepaliveTimeout(15);
    resinConf.setHttpPort(8080);
    resinConf.setServerPort(6800);
    resinConf.setWatchdogPort(6600);
    ModuleConf moduleConf = new ModuleConf();
    moduleConf.setProjectNo("platform-parent");
    moduleConf.setShortModuleName("platform-admin");
    moduleConf.setModuleFinalName("platform-admin.war");
    moduleConf.setJvmArg("-Xms128m -Xmx160m -d64 -server");
    ResinConfTemplate template = new ResinConfTemplate(resinConf, moduleConf);
    template.createConfFiles("d://temp//resin");
}
Also used : ResinConf(com.ibeiliao.deployment.transfer.vo.ResinConf) ModuleConf(com.ibeiliao.deployment.transfer.vo.ModuleConf) Test(org.junit.Test)

Aggregations

ModuleConf (com.ibeiliao.deployment.transfer.vo.ModuleConf)2 ResinConfTemplate (com.ibeiliao.deployment.transfer.conf.ResinConfTemplate)1 ResinConf (com.ibeiliao.deployment.transfer.vo.ResinConf)1 IOException (java.io.IOException)1 Test (org.junit.Test)1