Search in sources :

Example 21 with KieScanner

use of org.kie.api.builder.KieScanner in project drools by kiegroup.

the class KieRepositoryScannerTest method testKieScannerOnClasspathContainerMustFail.

@Test
public void testKieScannerOnClasspathContainerMustFail() {
    KieServices ks = KieServices.Factory.get();
    KieContainer kieContainer = ks.getKieClasspathContainer();
    try {
        KieScanner scanner = ks.newKieScanner(kieContainer);
        fail("Creating a KieScanner from a KieClasspathContainer must fail");
    } catch (RuntimeException e) {
    }
}
Also used : KieServices(org.kie.api.KieServices) InternalKieScanner(org.drools.compiler.kie.builder.impl.InternalKieScanner) KieScanner(org.kie.api.builder.KieScanner) KieContainer(org.kie.api.runtime.KieContainer) Test(org.junit.Test)

Aggregations

KieScanner (org.kie.api.builder.KieScanner)21 KieContainer (org.kie.api.runtime.KieContainer)21 InternalKieModule (org.drools.compiler.kie.builder.impl.InternalKieModule)20 KieServices (org.kie.api.KieServices)20 KieMavenRepository.getKieMavenRepository (org.kie.scanner.KieMavenRepository.getKieMavenRepository)19 ReleaseId (org.kie.api.builder.ReleaseId)18 Test (org.junit.Test)17 InternalKieScanner (org.drools.compiler.kie.builder.impl.InternalKieScanner)16 KieSession (org.kie.api.runtime.KieSession)16 KieMavenRepository (org.kie.scanner.KieMavenRepository)4 ArrayList (java.util.ArrayList)3 Path (java.nio.file.Path)2 AbstractKieCiTest (org.kie.scanner.AbstractKieCiTest)2 HashMap (java.util.HashMap)1 Dependency (org.apache.maven.model.Dependency)1 MavenRepository (org.appformer.maven.integration.MavenRepository)1 MavenRepository.getMavenRepository (org.appformer.maven.integration.MavenRepository.getMavenRepository)1 RemoteRepository (org.eclipse.aether.repository.RemoteRepository)1 Ignore (org.junit.Ignore)1 KieBuilder (org.kie.api.builder.KieBuilder)1