Hide Forgot
Description of problem: If we try to create container using REST API it fails if kjar is uploaded into server maven repository through maven command. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. clone porject from business-central to IDE, and add <distributionManagement> tag in pom.xml, like as: ============ <distributionManagement> <repository> <id>guvnor-m2-repo</id> <url>http://localhost:8080/business-central/maven2/</url> <layout>default</layout> </repository> </distributionManagement> ============ 2. Use 'mvn deploy' command to push kjar into server maven repository. 3. Now try to create container using RESt API http://127.0.0.1:8080/kie-server/services/rest/server/containers/Test [PUT] ~~~~ <kie-container container-id="Test"> <release-id> <group-id>com.sample</group-id> <artifact-id>DemoProject</artifact-id> <version>1.0.01</version> </release-id> </kie-container> ~~~~ Container creation failed with exception: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><response type="FAILURE" msg="Failed to create container Test with module com.sample:DemoProject:1.0.01: java.lang.RuntimeException: Cannot find KieModule: com.sample:DemoProject:1.0.01"/> Actual results: Container creation fails if kajr is uploaded into maven repository through maven command. Expected results: We should be able to create container if kjar is present in server maven repository. Additional info:
Did you configure the settings.xml in the kie-server environment for the kie-server to fetch kjars from the maven repository?
Yes, business-central repository is configured correctly in setting.xml file which is located under User_HOME/.m2 directory.
Abhijit, as I mentioned to Alessandro, the kie-server delegates this to maven. So my suggestion is check what is the result of deploying the kjar with "mvn deploy". I.e., which path it is deployed under? If the kie-server can't find the jar, it is because of something not properly named in the deploy path.