use of org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse 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) {
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)), executor);
}
use of org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse in project kie-wb-common by kiegroup.
the class DefaultLocalExecutorTest method buildAndInstallSkipDepsExistentProject.
@Test
@Ignore("https://issues.redhat.com/browse/AF-2892")
public void buildAndInstallSkipDepsExistentProject() throws Exception {
DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService);
CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath() + "/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.TRUE);
KieCompilationResponse res = futureRes.get();
assertThat(res.isSuccessful()).isTrue();
assertThat(res.getDependencies()).isEmpty();
}
use of org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse in project kie-wb-common by kiegroup.
the class DefaultLocalExecutorTest method buildSpecializedSkipDepsNonExistentProject.
@Test
public void buildSpecializedSkipDepsNonExistentProject() throws Exception {
DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService);
CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(tmpRoot, mavenRepoPath, new String[] { MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE }, Boolean.TRUE);
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 DefaultLocalExecutorTest method buildAndInstallExistentProject.
@Test
@Ignore("https://issues.redhat.com/browse/AF-2892")
public void buildAndInstallExistentProject() throws Exception {
DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService);
CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath() + "/dummy"), mavenRepoPath, TestUtilMaven.getSettingsFile());
KieCompilationResponse res = futureRes.get();
assertThat(res.isSuccessful()).isTrue();
assertThat(res.getDependencies()).isNotEmpty();
assertThat(res.getDependencies().size()).isGreaterThan(0);
}
use of org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse in project kie-wb-common by kiegroup.
the class DefaultLocalExecutorTest method buildSpecializedSkipDepsExistentProject.
@Test
@Ignore("https://issues.redhat.com/browse/AF-2892")
public void buildSpecializedSkipDepsExistentProject() throws Exception {
DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService);
CompletableFuture<KieCompilationResponse> futureRes = executor.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();
}
Aggregations