Что касается кода, он работает нормально, но когда я пытаюсь запустить другие тесты компонентов, они терпят неудачу с проблемой:
Код: Выделить всё
Cannot find KieModule: org.yaml:snakeyaml:LATEST
Код: Выделить всё
Application.java
..
public static void main(String args[]) {
System.setProperty("kie.maven.settings.custom", "/settings.xml")
..}
Код: Выделить всё
//Configuration class
@Configuration
public class SomeConfig {
@Bean
public KieContainer kieContainer() {
ReleaseId releaseId = kieServices.newReleaseId("org.yaml", "snakeyaml", "LATEST");
return kieServices.newKieContainer(releaseId);
}
}
Код: Выделить всё
Component Interface
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@ExtendWith({ SpringExtension.class })
@SpringBootTest(classes = Application.class)
@ActiveProfiles("Test")
public @interface ComponentTest {
}
Here are the annotations on every component test classes.
Код: Выделить всё
As per my understanding, what happens is, during the Application startup, the Configuration classes executes first which loads the KieContainer and I could see that latest version of Snakeyaml jar is present in my .m2. But I am not sure why the same is not happening when I am executing the Component Test. I have only provided the segments which I though is required here for the issue.Подробнее здесь: https://stackoverflow.com/questions/785 ... econtainer