use of org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse in project kie-wb-common by kiegroup.
the class DefaultLocalExecutorTest method buildExistentProject.
@Test
@Ignore("https://issues.redhat.com/browse/AF-2892")
public void buildExistentProject() throws Exception {
DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService);
CompletableFuture<KieCompilationResponse> futureRes = executor.build(Paths.get(tmpRoot.toAbsolutePath() + "/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile());
KieCompilationResponse res = futureRes.get();
assertThat(res.isSuccessful()).isTrue();
}
use of org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse in project kie-wb-common by kiegroup.
the class ServerIPCImpl method build.
private static DefaultKieCompilationResponseOffProcess build(String prjPath, String mavenRepo, String alternateSettingsAbsPath, String uuid) {
final AFCompiler compiler = KieMavenCompilerFactory.getCompiler(EnumSet.of(KieDecorator.ENABLE_LOGGING, KieDecorator.STORE_KIE_OBJECTS));
WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(Paths.get("file://" + prjPath));
CompilationRequest req;
if (StringUtils.isNotEmpty(alternateSettingsAbsPath)) {
req = new DefaultCompilationRequest(mavenRepo, info, new String[] { MavenCLIArgs.DEPENDENCY_RESOLVE, MavenCLIArgs.COMPILE, MavenCLIArgs.ALTERNATE_USER_SETTINGS + alternateSettingsAbsPath }, Boolean.FALSE, uuid);
} else {
req = new DefaultCompilationRequest(mavenRepo, info, new String[] { MavenCLIArgs.DEPENDENCY_RESOLVE, MavenCLIArgs.COMPILE }, Boolean.FALSE, uuid);
}
KieCompilationResponse res = (KieCompilationResponse) compiler.compile(req);
return new DefaultKieCompilationResponseOffProcess(res);
}
use of org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse in project kie-wb-common by kiegroup.
the class DefaultKieCompilerServiceTest method buildSpecializedSkipDepsExistentProject.
@Test
@Ignore("https://issues.redhat.com/browse/AF-2892")
public void buildSpecializedSkipDepsExistentProject() throws Exception {
AFCompilerService service = new DefaultKieCompilerService();
CompletableFuture<KieCompilationResponse> futureRes = service.buildSpecialized(Paths.get(tmpRoot.toAbsolutePath() + "/dummy"), mavenRepoPath, new String[] { MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE }, Boolean.TRUE);
KieCompilationResponse res = futureRes.get();
assertThat(res.isSuccessful()).isTrue();
}
use of org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse in project kie-wb-common by kiegroup.
the class DefaultKieCompilerServiceTest method buildNonExistentProject.
/**
* Local
*/
@Test
public void buildNonExistentProject() throws Exception {
AFCompilerService service = new DefaultKieCompilerService();
CompletableFuture<KieCompilationResponse> futureRes = service.build(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile());
KieCompilationResponse res = futureRes.get();
assertThat(res.isSuccessful()).isFalse();
}
use of org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse in project kie-wb-common by kiegroup.
the class DefaultKieCompilerServiceTest method buildAndSkipDepsNonExistentProject.
@Test
public void buildAndSkipDepsNonExistentProject() throws Exception {
AFCompilerService service = new DefaultKieCompilerService();
CompletableFuture<KieCompilationResponse> futureRes = service.build(tmpRoot, mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.FALSE);
KieCompilationResponse res = futureRes.get();
assertThat(res.isSuccessful()).isFalse();
assertThat(res.getDependencies()).isEmpty();
}
Aggregations