public void afterKmoduleSet() { log.debug(" :: Starting Blueprint KieObjectsInjector for kmodule ("+contextId+") :: "); if ( resources == null || resources.isEmpty()) { configFileURL = getClass().getResource("/"); if (configFileURL == null) { createOsgiKieModule(); return; } configFilePath = configFileURL.getPath(); } else { configFileURL = resources.get(0); configFilePath = configFileURL.getPath(); log.debug(" :: Trying to intialize the KieModule from " + configFileURL + " :: "); } if ( configFilePath == null) { throw new RuntimeException("Failure creating a KieModule. Unable to determine the Configuration File Path."); } String pomProperties = ClasspathKieProject.getPomProperties(configFilePath); releaseId = ReleaseIdImpl.fromPropertiesString(pomProperties); KieModuleModel kieModuleModel = getKieModuleModel(); injectKieModule(kieModuleModel); addKieModuleToRepo(kieModuleModel); log.debug(" :: Completed Injecting KieObjects from the Blueprint Bean Processor ("+contextId+") :: "); }
public void afterKmoduleSet() { log.debug(" :: Starting Blueprint KieObjectsInjector for kmodule ("+contextId+") :: "); if ( resources == null || resources.isEmpty()) { configFileURL = getClass().getResource("/"); if (configFileURL == null) { createOsgiKieModule(); return; } configFilePath = configFileURL.getPath(); } else { configFileURL = resources.get(0); configFilePath = configFileURL.getPath(); log.debug(" :: Trying to intialize the KieModule from " + configFileURL + " :: "); } if ( configFilePath == null) { throw new RuntimeException("Failure creating a KieModule. Unable to determine the Configuration File Path."); } String pomProperties = ClasspathKieProject.getPomProperties(configFilePath); releaseId = ReleaseIdImpl.fromPropertiesString(pomProperties); KieModuleModel kieModuleModel = getKieModuleModel(); injectKieModule(kieModuleModel); addKieModuleToRepo(kieModuleModel); log.debug(" :: Completed Injecting KieObjects from the Blueprint Bean Processor ("+contextId+") :: "); }
if (kModuleRootPath.endsWith(WEB_INF_CLASSES_PATH_SUFFIX)) { String configFilePathForWebApps = kModuleRootPath.substring(0, kModuleRootPath.indexOf(WEB_INF_CLASSES_PATH_SUFFIX)); pomProperties = ClasspathKieProject.getPomProperties(configFilePathForWebApps); pomProperties = ClasspathKieProject.getPomProperties(kModuleRootPath);
if (kModuleRootPath.endsWith(WEB_INF_CLASSES_PATH_SUFFIX)) { String configFilePathForWebApps = kModuleRootPath.substring(0, kModuleRootPath.indexOf(WEB_INF_CLASSES_PATH_SUFFIX)); pomProperties = ClasspathKieProject.getPomProperties(configFilePathForWebApps); pomProperties = ClasspathKieProject.getPomProperties(kModuleRootPath);
@Test public void testParsePomPropertiesFromJarDir() throws Exception { createKieModule(MODULE_JARDIR_NAME, false, MODULE_JARDIR_VERSION); final File kModuleDir = getFileManager().newFile(MODULE_JARDIR_NAME + "-" + MODULE_JARDIR_VERSION); Assertions.assertThat(kModuleDir).isNotNull(); Assertions.assertThat(kModuleDir).isDirectory(); kModuleDir.renameTo(new File(kModuleDir.getAbsolutePath() + ".jar")); final File kModuleFile = getFileManager().newFile(MODULE_JARDIR_NAME + "-" + MODULE_JARDIR_VERSION + ".jar"); final String pomProperties = ClasspathKieProject.getPomProperties(kModuleFile.getAbsolutePath()); checkPomProperties(pomProperties, MODULE_JARDIR_NAME, MODULE_JARDIR_VERSION); }
@Test public void testParsePomPropertiesFromJarFile() throws Exception { createKieModule(MODULE_JARFILE_NAME, true, MODULE_JARFILE_VERSION); final File kModuleFile = getFileManager().newFile(MODULE_JARFILE_NAME + "-" + MODULE_JARFILE_VERSION + ".jar"); final String pomProperties = ClasspathKieProject.getPomProperties( kModuleFile.getAbsolutePath() ); checkPomProperties(pomProperties, MODULE_JARFILE_NAME, MODULE_JARFILE_VERSION); }