Search in sources :

Example 41 with CompilationRequest

use of org.kie.workbench.common.services.backend.compiler.CompilationRequest in project kie-wb-common by kiegroup.

the class DefaultLocalExecutor method internalBuild.

private CompletableFuture<KieCompilationResponse> internalBuild(Path projectPath, String mavenRepoPath, boolean skipProjectDepCreation, String[] args) {
    WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(projectPath);
    AFCompiler compiler = getCompiler(projectPath);
    CompilationRequest req = getDefaultRequest(mavenRepoPath, info, skipProjectDepCreation, args);
    return CompletableFuture.supplyAsync(() -> ((KieCompilationResponse) compiler.compile(req)), executor);
}
Also used : WorkspaceCompilationInfo(org.kie.workbench.common.services.backend.compiler.impl.WorkspaceCompilationInfo) AFCompiler(org.kie.workbench.common.services.backend.compiler.AFCompiler) CompilationRequest(org.kie.workbench.common.services.backend.compiler.CompilationRequest) DefaultCompilationRequest(org.kie.workbench.common.services.backend.compiler.impl.DefaultCompilationRequest) KieCompilationResponse(org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse)

Example 42 with CompilationRequest

use of org.kie.workbench.common.services.backend.compiler.CompilationRequest in project kie-wb-common by kiegroup.

the class DefaultLocalExecutor method internalBuild.

private CompletableFuture<KieCompilationResponse> internalBuild(Path projectPath, String mavenRepoPath, String settingXML, boolean skipProjectDepCreation, String goal, Map<Path, InputStream> override) {
    WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(projectPath);
    AFCompiler compiler = getCompiler(projectPath);
    CompilationRequest req;
    if (settingXML != null) {
        req = getDefaultRequest(mavenRepoPath, info, skipProjectDepCreation, new String[] { MavenCLIArgs.ALTERNATE_USER_SETTINGS + settingXML, goal });
    } else {
        req = getDefaultRequest(mavenRepoPath, info, skipProjectDepCreation, new String[] { goal });
    }
    return CompletableFuture.supplyAsync(() -> ((KieCompilationResponse) compiler.compile(req, override)), executor);
}
Also used : WorkspaceCompilationInfo(org.kie.workbench.common.services.backend.compiler.impl.WorkspaceCompilationInfo) AFCompiler(org.kie.workbench.common.services.backend.compiler.AFCompiler) CompilationRequest(org.kie.workbench.common.services.backend.compiler.CompilationRequest) DefaultCompilationRequest(org.kie.workbench.common.services.backend.compiler.impl.DefaultCompilationRequest) KieCompilationResponse(org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse)

Example 43 with CompilationRequest

use of org.kie.workbench.common.services.backend.compiler.CompilationRequest in project kie-wb-common by kiegroup.

the class DefaultRemoteExecutor method internalBuild.

private CompletableFuture<KieCompilationResponse> internalBuild(String projectPath, String mavenRepoPath, boolean skipProjectDepCreation, String[] args) {
    WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(Paths.get(projectPath));
    AFCompiler compiler = getCompiler(projectPath);
    CompilationRequest req = new DefaultCompilationRequest(mavenRepoPath, info, args, skipProjectDepCreation);
    return runInItsOwnThread(compiler, req);
}
Also used : WorkspaceCompilationInfo(org.kie.workbench.common.services.backend.compiler.impl.WorkspaceCompilationInfo) DefaultCompilationRequest(org.kie.workbench.common.services.backend.compiler.impl.DefaultCompilationRequest) AFCompiler(org.kie.workbench.common.services.backend.compiler.AFCompiler) CompilationRequest(org.kie.workbench.common.services.backend.compiler.CompilationRequest) DefaultCompilationRequest(org.kie.workbench.common.services.backend.compiler.impl.DefaultCompilationRequest)

Aggregations

CompilationRequest (org.kie.workbench.common.services.backend.compiler.CompilationRequest)43 DefaultCompilationRequest (org.kie.workbench.common.services.backend.compiler.impl.DefaultCompilationRequest)43 Test (org.junit.Test)34 WorkspaceCompilationInfo (org.kie.workbench.common.services.backend.compiler.impl.WorkspaceCompilationInfo)30 AFCompiler (org.kie.workbench.common.services.backend.compiler.AFCompiler)24 CompilationResponse (org.kie.workbench.common.services.backend.compiler.CompilationResponse)23 Path (org.uberfire.java.nio.file.Path)19 BaseCompilerTest (org.kie.workbench.common.services.backend.compiler.BaseCompilerTest)16 BaseMavenCompiler (org.kie.workbench.common.services.backend.compiler.impl.BaseMavenCompiler)12 KieCompilationResponse (org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse)12 HashMap (java.util.HashMap)10 Ignore (org.junit.Ignore)10 File (java.io.File)9 JGitFileSystem (org.uberfire.java.nio.fs.jgit.JGitFileSystem)8 FileInputStream (java.io.FileInputStream)6 InputStream (java.io.InputStream)6 URI (java.net.URI)4 InternalKieModule (org.drools.compiler.kie.builder.impl.InternalKieModule)3 KieModuleMetaInfo (org.drools.core.rule.KieModuleMetaInfo)3 Git (org.eclipse.jgit.api.Git)3