Bug 1072601
| Summary: | Deploy the artifact and then have it retrieve by another application. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | David Tse <dtse> | ||||
| Component: | Business Central | Assignee: | Mario Fusco <mfusco> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Marek Baluch <mbaluch> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 6.0.0 | CC: | kverlaen, mbaluch, rrajasek | ||||
| Target Milestone: | ER2 | ||||||
| Target Release: | 6.0.1 | ||||||
| Hardware: | i586 | ||||||
| OS: | Windows | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-08-06 19:57:57 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
David Tse
2014-03-04 21:17:06 UTC
I think there's a problem in the provided ReloadTest class: it looks for a version "1.0.1-Final" while KieModuleMavenTest creates a "1.0-SNAPSHOT". Using the right version number in the ReloadTest fixes the problem. The code that I attached use 1.0.1-Final.
If you comment out the deploy part and try to load jar already in the repository, junit test fail.
@Test
public void testKieModuleFromMavenNoDependencies() throws Exception {
/*
final KieServices ks = new KieServicesImpl() {
@Override
public KieRepository getRepository() {
return new KieRepositoryImpl(); // override repository to not store the artifact on deploy to trigger load from maven repo
}
};
*/
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId("org.kie", "maven-test", "1.0.1-Final");
/*
InternalKieModule kJar1 = createKieJar(ks, releaseId, true, "rule1", "rule2");
String pomText = getPom(releaseId, null);
File pomFile = new File(System.getProperty("java.io.tmpdir"), MavenRepository.toFileName(releaseId, null) + ".pom");
try {
FileOutputStream fos = new FileOutputStream(pomFile);
fos.write(pomText.getBytes());
fos.flush();
fos.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
MavenRepository.getMavenRepository().deployArtifact(releaseId, kJar1, pomFile);
*/
KieContainer kieContainer = ks.newKieContainer(releaseId);
KieBaseModel kbaseModel = ((KieContainerImpl) kieContainer).getKieProject().getDefaultKieBaseModel();
assertNotNull("Default kbase was not found", kbaseModel);
String kbaseName = kbaseModel.getName();
System.out.println(kbaseName);
assertEquals("KBase1", kbaseName);
}
It works for me both on master and 6.0.x branch. I believe this problem has been already fixed. Verified on 6.0.1.ER2. All of the test cases passed OK after I updated them based on the instructions in this BZ. |