[rules-dev] [rules-users] Need Camel + drools (OSGI) integration help

Alexander Filipchik afilipchik at gmail.com
Tue Feb 14 19:44:05 EST 2012


Updated tests. Diff is attached.

>> Don't forget to update the docs too, so they remain up to date.
Where can I find the docs?

Alex

On Fri, Feb 10, 2012 at 11:44 AM, Mark Proctor <mproctor at codehaus.org>wrote:

>  On 10/02/2012 19:41, Alexander Filipchik wrote:
>
> Hello!
>
> Can you submit a pull request over at github? Don't forget to update the
> docs too, so they remain up to date.
>
> Mark
>
>
>  I finally managed to get it working, but it required some changes in the
> existent stuff...
> Here is a diff:
>
>  git://github.com/droolsjbpm/drools.git
>  diff --git a/drools-compiler/pom.xml b/drools-compiler/pom.xml
> index 708a5b2..4b1dc98 100644
> --- a/drools-compiler/pom.xml
> +++ b/drools-compiler/pom.xml
> @@ -244,7 +244,7 @@
>              <_removeheaders>Ignore-Package</_removeheaders>
>
>  <Bundle-SymbolicName>org.drools.compiler;singleton:=true</Bundle-SymbolicName>
>
>  <Require-Bundle>org.drools.core;visibility:=reexport;bundle-version="${drools.osgi.version}"</Require-Bundle>
> -            <Import-Package>!org.drools.*,
> +            <Import-Package>org.antlr.*;version="3.4",!org.drools.*,
>                <!-- java compilers are optional: only need one at most -->
>
>  org.codehaus.janino.*;resolution:=optional,org.eclipse.jdt.*;resolution:=optional,
>                *</Import-Package>
>
>  git://github.com/droolsjbpm/droolsjbpm-integration.git
>  diff --git a/drools-camel/pom.xml b/drools-camel/pom.xml
> index a5a6b3d..273bfaa 100644
> --- a/drools-camel/pom.xml
> +++ b/drools-camel/pom.xml
> @@ -23,7 +23,7 @@
>      <dependency>
>        <groupId>org.drools</groupId>
>        <artifactId>knowledge-internal-api</artifactId>
> -    </dependency>
> +    </dependency>
>      <dependency>
>        <groupId>org.drools</groupId>
>        <artifactId>drools-core</artifactId>
> @@ -186,5 +186,44 @@
>        <scope>provided</scope>
>      </dependency>
>    </dependencies>
> -
> +  <build>
> +    <plugins>
> +      <plugin>
> +        <artifactId>maven-jar-plugin</artifactId>
> +        <configuration>
> +          <archive>
> +            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
> +          </archive>
> +        </configuration>
> +      </plugin>
> +      <plugin>
> +        <groupId>org.apache.felix</groupId>
> +        <artifactId>maven-bundle-plugin</artifactId>
> +        <extensions>true</extensions>
> +        <executions>
> +          <execution>
> +            <id>manifest</id>
> +            <phase>process-classes</phase>
> +            <goals>
> +              <goal>manifest</goal>
> +            </goals>
> +          </execution>
> +        </executions>
> +        <configuration>
>  +          <manifestLocation>META-INF</manifestLocation>
> +          <instructions>
> +
>  <Bundle-SymbolicName>org.drools.camel;singleton:=true</Bundle-SymbolicName>
> +            <_removeheaders>Ignore-Package</_removeheaders>
> +            <Require-Bundle>
> +              org.drools.core;bundle-version="${drools.osgi.version}",
> +              org.drools.spring;bundle-version="${drools.osgi.version}"
> +            </Require-Bundle>
> +            <Import-Package>!org.drools.*, *</Import-Package>
> +            <Export-Package>!org.drools.grid, org.drools.camel.*,
> org.drools.camel.jax</Export-Package>
> +            <DynamicImport-Package>org.drools.*</DynamicImport-Package>
> +          </instructions>
> +        </configuration>
> +      </plugin>
> +    </plugins>
> +  </build>
>  </project>
> diff --git a/drools-container/drools-spring/pom.xml
> b/drools-container/drools-spring/pom.xml
> index b6be52c..f83a457 100644
> --- a/drools-container/drools-spring/pom.xml
> +++ b/drools-container/drools-spring/pom.xml
> @@ -126,7 +126,45 @@
>        <groupId>org.antlr</groupId>
>        <artifactId>antlr-runtime</artifactId>
>        <scope>test</scope>
> -    </dependency>
> +    </dependency>
>    </dependencies>
> -
> +  <build>
> +    <plugins>
> +      <plugin>
> +        <artifactId>maven-jar-plugin</artifactId>
> +        <configuration>
>  +          <archive>
> +            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
> +          </archive>
> +        </configuration>
> +      </plugin>
> +      <plugin>
> +        <groupId>org.apache.felix</groupId>
> +        <artifactId>maven-bundle-plugin</artifactId>
> +        <extensions>true</extensions>
> +        <executions>
> +          <execution>
> +            <id>manifest</id>
> +            <phase>process-classes</phase>
> +            <goals>
> +              <goal>manifest</goal>
> +            </goals>
> +          </execution>
> +        </executions>
> +        <configuration>
>  +          <manifestLocation>META-INF</manifestLocation>
> +          <instructions>
> +
>  <Bundle-SymbolicName>org.drools.spring;singleton:=true</Bundle-SymbolicName>
> +            <_removeheaders>Ignore-Package</_removeheaders>
> +
>  <Require-Bundle>org.drools.core;bundle-version="${drools.osgi.version}"</Require-Bundle>
>  +            <Import-Package>!org.drools.*, *</Import-Package>
> +            <Export-Package>
> +
>  org.drools.grid,org.drools.grid.impl,org.drools.container.spring
>  +            </Export-Package>
> +            <DynamicImport-Package>org.drools.*</DynamicImport-Package>
> +          </instructions>
> +        </configuration>
> +      </plugin>
> +    </plugins>
> +  </build>
>  </project>
>
>  Alex
>
> On Tue, Feb 7, 2012 at 6:01 PM, Alexander Filipchik <afilipchik at gmail.com>wrote:
>
>> Thank you! But didn't help.
>> Actually I see some weird behavior. I decided to try referring
>> drools-core using Require-Bundle from my bundle, so I added
>> <Bundle-SymbolicName>org.drools.core</Bundle-SymbolicName> to a
>> drools-core package, recompiled it and got
>> NullPointerException (still without stacktrace) when I tried to deploy
>> new core bundle to a karaf container.
>>
>>  I was able to deploy it after I removed Bundle-SymbolicName and
>> recompiled again.
>>
>>  Thanks,
>> Alex
>>
>> On Tue, Feb 7, 2012 at 4:42 PM, Mauricio Salatino <salaboy at gmail.com>wrote:
>>
>>> I've already answer a similar question here.. try including inside the
>>> application that is using the bundles the file called:
>>> drools.packagebuilder.conf
>>>
>>> which contains:
>>> drools.dialect.default = java
>>> drools.dialect.java =
>>> org.drools.rule.builder.dialect.java.JavaDialectConfiguration
>>> drools.dialect.java.compiler = ECLIPSE
>>>
>>> drools.dialect.mvel =
>>> org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration
>>> drools.dialect.mvel.strict = true
>>> drools.dialect.mvel.langLevel = 4
>>>
>>> drools.accumulate.function.average =
>>> org.drools.base.accumulators.AverageAccumulateFunction
>>> drools.accumulate.function.max =
>>> org.drools.base.accumulators.MaxAccumulateFunction
>>> drools.accumulate.function.min =
>>> org.drools.base.accumulators.MinAccumulateFunction
>>> drools.accumulate.function.count =
>>> org.drools.base.accumulators.CountAccumulateFunction
>>> drools.accumulate.function.sum =
>>> org.drools.base.accumulators.SumAccumulateFunction
>>> drools.accumulate.function.collectList =
>>> org.drools.base.accumulators.CollectListAccumulateFunction
>>> drools.accumulate.function.collectSet =
>>> org.drools.base.accumulators.CollectSetAccumulateFunction
>>>
>>> drools.evaluator.coincides =
>>> org.drools.base.evaluators.CoincidesEvaluatorDefinition
>>> drools.evaluator.before =
>>> org.drools.base.evaluators.BeforeEvaluatorDefinition
>>> drools.evaluator.after =
>>> org.drools.base.evaluators.AfterEvaluatorDefinition
>>> drools.evaluator.meets =
>>> org.drools.base.evaluators.MeetsEvaluatorDefinition
>>> drools.evaluator.metby =
>>> org.drools.base.evaluators.MetByEvaluatorDefinition
>>> drools.evaluator.overlaps =
>>> org.drools.base.evaluators.OverlapsEvaluatorDefinition
>>> drools.evaluator.overlappedby =
>>> org.drools.base.evaluators.OverlappedByEvaluatorDefinition
>>> drools.evaluator.during =
>>> org.drools.base.evaluators.DuringEvaluatorDefinition
>>> drools.evaluator.includes =
>>> org.drools.base.evaluators.IncludesEvaluatorDefinition
>>> drools.evaluator.starts =
>>> org.drools.base.evaluators.StartsEvaluatorDefinition
>>> drools.evaluator.startedby =
>>> org.drools.base.evaluators.StartedByEvaluatorDefinition
>>> drools.evaluator.finishes =
>>> org.drools.base.evaluators.FinishesEvaluatorDefinition
>>> drools.evaluator.finishedby =
>>> org.drools.base.evaluators.FinishedByEvaluatorDefinition
>>> drools.evaluator.equality =
>>> org.drools.base.evaluators.EqualityEvaluatorsDefinition
>>> drools.evaluator.comparable =
>>> org.drools.base.evaluators.ComparableEvaluatorsDefinition
>>> drools.evaluator.set = org.drools.base.evaluators.SetEvaluatorsDefinition
>>> drools.evaluator.matches =
>>> org.drools.base.evaluators.MatchesEvaluatorsDefinition
>>> drools.evaluator.soundslike =
>>> org.drools.base.evaluators.SoundslikeEvaluatorsDefinition
>>>
>>> Cheers
>>>
>>>
>>> On Tue, Feb 7, 2012 at 9:03 PM, Alexander Filipchik
>>> <afilipchik at gmail.com> wrote:
>>> > It's not an obvious how to OSGI-fy something :)
>>> >
>>> > I did some homework - now I have OSGi-ified versions of drools-spring
>>> and
>>> > drools-camel.
>>> > Also I created own bundle and tried to import
>>> KnowledgeBaseFactoryService,
>>> > ServiceRegistry and KnowledgeBaseFactoryService as described in
>>> > http://docs.jboss.org/jbpm/v5.2/userguide/ch18.html#d0e4308.
>>> > All what I got - NullPointerException from karaf core (haven't gotten
>>> full
>>> > staketrace yet. For some reason it is just:
>>> > 15:11:34,484 | INFO  | l Console Thread | Console
>>>      |
>>> > ?                                   ? | 34 -
>>> org.apache.karaf.shell.console
>>> > - 2.2.2.fuse-02-13 | Exception caught while executing command
>>> > java.lang.NullPointerException
>>> > )
>>> >
>>> > So, I spent some time randomly adding and removing configuration
>>> params and
>>> > I found - NPE occurs when I'm trying to import
>>> > org.drools.KnowledgeBaseFactoryService.
>>> > I guess (i'm not OSGI expert) it could be because org.drools package is
>>> > exported in 2! bundles. It is in drools-core and knowledge-api
>>> bundles. And
>>> > I guess, karaf container just can't link my bundle with both core and
>>> api,
>>> > only first bundle which contains requested package (org.drools) wins.
>>> >
>>> > Any ideas on how to make it work?
>>> > I actually have one - every bundle should export own package. For
>>> > knowledge-api it should be org.drools.api, and org.drools.core for
>>> > drools-core.
>>> >
>>> > Here is full log of similar packages:
>>> > WARNING: multiple bundles are exporting package org.drools.command
>>> > - org.drools.core [218]
>>> > - org.drools.api [216]
>>> > - org.drools.internalapi [217]
>>> >
>>> > WARNING: multiple bundles are exporting package
>>> org.drools.runtime.process
>>> > - org.drools.core [218]
>>> > - org.drools.api [216]
>>> >
>>> > WARNING: multiple bundles are exporting package org.drools.time
>>> > - org.drools.core [218]
>>> > - org.drools.api [216]
>>> >
>>> > WARNING: multiple bundles are exporting package
>>> > org.apache.geronimo.transaction
>>> > - org.apache.aries.transaction.manager [123]
>>> > - org.apache.aries.transaction.manager [51]
>>> >
>>> > WARNING: multiple bundles are exporting package org.drools
>>> > - org.drools.core [218]
>>> > - org.drools.api [216]
>>> >
>>> > WARNING: multiple bundles are exporting package
>>> > org.apache.geronimo.transaction.manager
>>> > - org.apache.aries.transaction.manager [123]
>>> > - org.apache.aries.transaction.manager [51]
>>> >
>>> > WARNING: multiple bundles are exporting package org.drools.grid
>>> > - org.drools.core [218]
>>> > - org.drools.spring [220]
>>> >
>>> > WARNING: multiple bundles are exporting package jline
>>> > - org.apache.servicemix.bundles.jruby [210]
>>> > - org.apache.karaf.shell.console [34]
>>> >
>>> > WARNING: multiple bundles are exporting package
>>> > org.apache.geronimo.transaction.log
>>> > - org.apache.aries.transaction.manager [123]
>>> > - org.apache.aries.transaction.manager [51]
>>> >
>>> > WARNING: multiple bundles are exporting package org.drools.management
>>> > - org.drools.core [218]
>>> > - org.drools.api [216]
>>> >
>>> > WARNING: multiple bundles are exporting package org.drools.agent
>>> > - org.drools.core [218]
>>> > - org.drools.api [216]
>>> >
>>> > WARNING: multiple bundles are exporting package org.drools.event
>>> > - org.drools.core [218]
>>> > - org.drools.api [216]
>>> >
>>> > 2012/2/3 Mark Proctor <mproctor at codehaus.org>
>>> >>
>>> >> neither spring or camel have been OSGi-ified. only api, core,
>>> compiler,
>>> >> templates, decision-tables and flow have.
>>> >>
>>> >> If someone wants to OSGi-ify those and contribute back they are very
>>> >> welcome:
>>> >> 1) update the pom.xml to use the osgi bundle plugin, see other
>>> existing
>>> >> poms.
>>> >>
>>> >>
>>> https://github.com/droolsjbpm/drools/blob/master/drools-decisiontables/pom.xml
>>> >> 2) create an Activator to register the module, again see Activator's
>>> for
>>> >> core, compiler etc.
>>> >>
>>> >>
>>> https://github.com/droolsjbpm/drools/blob/master/drools-decisiontables/src/main/java/org/drools/osgi/decisiontables/Activator.java
>>> >> 3) update the osgi bundle's pom with new dependencies, make sure to
>>> pull
>>> >> in the spring ones, unless the actual project provides osgi ready
>>> jars.
>>> >>
>>> >>
>>> https://github.com/droolsjbpm/droolsjbpm-build-distribution/tree/master/drools-osgi-bundles
>>> >> 4) Update the boot-bundles.properties so that Spring DM loads the OSGi
>>> >> dependencies
>>> >>
>>> >>
>>> https://github.com/droolsjbpm/droolsjbpm-build-distribution/blob/master/drools-osgi-bundles/org.drools.osgi.test/src/test/filtered-resources/boot-bundles.properties
>>> >> 5) write unit tests for spring and camel.
>>> >>
>>> >> Mark
>>> >> On 03/02/2012 03:47, Alexander Filipchik wrote:
>>> >>
>>> >> Hello all!
>>> >>
>>> >> Don't know if it is right list to ask, but I'm trying to make drools +
>>> >> camel running on Fuse (ServiceMix container).
>>> >> I couldn't even install OSGI drools artifacts for 5.3.1 version
>>> (because
>>> >> of weird dependency on drools.core Snapshot),
>>> >> but did it with v5.2.1. I used:
>>> >>
>>> >> mvel2/2.1.0,
>>> >>
>>> org.drools/drools-core/5.2.1.Final, org.drools/drools-compiler/5.2.1.Final,
>>> >> org.drools/knowledge-api/5.2.1.Final
>>> >> and org.drools/drools-camel/5.2.1.Final.
>>> >>
>>> >> All are installed and active. Part of log:
>>> >>
>>> >> [ 162] [Active     ] [            ] [       ] [   60] Drools ::
>>> Compiler
>>> >> (5.2.1.Final)
>>> >>
>>> >> [ 163] [Active     ] [            ] [       ] [   60] mvel2
>>> >> (2.1.0.drools4)
>>> >>
>>> >> [ 164] [Active     ] [            ] [       ] [   60] Drools :: Core
>>> >> (5.2.1.Final)
>>> >>
>>> >> [ 165] [Active     ] [            ] [       ] [   60] Knowledge API
>>> >> (5.2.1.Final)
>>> >>
>>> >> [ 172] [Active     ] [            ] [       ] [   60]
>>> >> mvn:org.drools/drools-camel/5.2.1.Final
>>> >>
>>> >> Then I tried to add my own camel-drools router (I created OSGI bundle
>>> for
>>> >> it). It depends on:
>>> >>
>>> >> Import-Package:
>>> >>
>>> org.apache.activemq,org.apache.activemq.camel.component,org.apache.activemq.pool,org.apache.camel;version="[2.8,3)",org.apache.camel.builder;version="[2.8,3)",org.apache.camel.component.jms;version="[2.8,3)",org.apache.camel.model;version="[2.8,3)",org.drools.camel.component,org.osgi.service.blueprint;version="[1.0.0,2.0.0)",org.springframework.transaction;version="[3,4)"
>>> >>
>>> >> It tried to install it to a container but all I got -
>>> >>
>>> >> Error executing command: Unresolved constraint in bundle
>>> >> com.betfair.drools [170]: Unable to resolve 170.0: missing requirement
>>> >> [170.0] package; (package=org.drools.camel.component)
>>> >>
>>> >> I even tried to put drools-camel.jar with org.drools.camel.component
>>> in a
>>> >> lib folder and add package to
>>> org.osgi.framework.system.packages.extra, but
>>> >> got same result.
>>> >>
>>> >> Do you have any idea, blog posts, samples which could help me?
>>> >> I'm completely stuck.
>>> >>
>>> >> Thanks,
>>> >> Alex
>>> >>
>>> >>
>>> >> _______________________________________________
>>> >> rules-users mailing list
>>> >> rules-users at lists.jboss.org
>>> >> https://lists.jboss.org/mailman/listinfo/rules-users
>>> >>
>>> >>
>>> >>
>>> >> _______________________________________________
>>> >> rules-users mailing list
>>> >> rules-users at lists.jboss.org
>>> >> https://lists.jboss.org/mailman/listinfo/rules-users
>>> >>
>>> >
>>> >
>>> > _______________________________________________
>>> > rules-dev mailing list
>>> > rules-dev at lists.jboss.org
>>> > https://lists.jboss.org/mailman/listinfo/rules-dev
>>> >
>>>
>>>
>>>
>>> --
>>>  - CTO @ http://www.plugtree.com
>>>  - MyJourney @ http://salaboy.wordpress.com
>>>  - Co-Founder @ http://www.jugargentina.org
>>>  - Co-Founder @ http://www.jbug.com.ar
>>>
>>>  - Salatino "Salaboy" Mauricio -
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>
>
> _______________________________________________
> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20120214/e1d96e05/attachment-0001.html 
-------------- next part --------------
	diff --git a/drools-osgi-bundles/drools-osgi-bundles-distribution/pom.xml b/drools-osgi-bundles/drools-osgi-bundles-distribution/pom.xml
index 1c78bd0..36fd774 100644
--- a/drools-osgi-bundles/drools-osgi-bundles-distribution/pom.xml
+++ b/drools-osgi-bundles/drools-osgi-bundles-distribution/pom.xml
@@ -68,7 +68,7 @@
             </goals>
             <configuration>
               <artifactItems>
-                <artifactItem>  
+                <artifactItem>
                   <groupId>org.objectweb.asm</groupId>
                   <artifactId>com.springsource.org.objectweb.asm</artifactId>
                   <version>1.5.3</version>
@@ -158,7 +158,7 @@
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>org.springframework.expression</artifactId>
-      <version>3.0.0.RELEASE</version>
+      <version>${spring.maven.artifact.version}</version>
     </dependency>
 
 
diff --git a/drools-osgi-bundles/org.drools.osgi.test/pom.xml b/drools-osgi-bundles/org.drools.osgi.test/pom.xml
index a18e2d1..8951879 100644
--- a/drools-osgi-bundles/org.drools.osgi.test/pom.xml
+++ b/drools-osgi-bundles/org.drools.osgi.test/pom.xml
@@ -20,8 +20,97 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <!--childDelegation>false</childDelegation>
-          <forkMode>pertest</forkMode-->
+          <!--childDelegation>false</childDelegation>-->
+          <!--<forkMode>pertest</forkMode>-->
+          <systemProperties>
+            <property>
+              <name>org.osgi.framework.system.packages.extra</name>
+              <value>
+                org.apache.cxf;
+                org.apache.cxf.attachment;
+                org.apache.cxf.binding;
+                org.apache.cxf.binding.soap;
+                org.apache.cxf.binding.soap.interceptor;
+                org.apache.cxf.binding.soap.model;
+                org.apache.cxf.bus.spring;
+                org.apache.cxf.common.classloader;
+                org.apache.cxf.common.i18n;
+                org.apache.cxf.common.injection;
+                org.apache.cxf.common.logging;
+                org.apache.cxf.common.util;
+                org.apache.cxf.configuration;
+                org.apache.cxf.configuration.blueprint;
+                org.apache.cxf.configuration.spring;
+                org.apache.cxf.continuations;
+                org.apache.cxf.databinding;
+                org.apache.cxf.databinding.source;
+                org.apache.cxf.endpoint;
+                org.apache.cxf.feature;
+                org.apache.cxf.frontend;
+                org.apache.cxf.headers;
+                org.apache.cxf.helpers;
+                org.apache.cxf.interceptor;
+                org.apache.cxf.io;
+                org.apache.cxf.jaxb;
+                org.apache.cxf.jaxrs;
+                org.apache.cxf.jaxrs.client;
+                org.apache.cxf.jaxrs.impl;
+                org.apache.cxf.jaxrs.model;
+                org.apache.cxf.jaxrs.utils;
+                org.apache.cxf.jaxws;
+                org.apache.cxf.jaxws.context;
+                org.apache.cxf.jaxws.handler;
+                org.apache.cxf.jaxws.support;
+                org.apache.cxf.message;
+                org.apache.cxf.phase;
+                org.apache.cxf.resource;
+                org.apache.cxf.security;
+                org.apache.cxf.service;
+                org.apache.cxf.service.factory;
+                org.apache.cxf.service.invoker;
+                org.apache.cxf.service.model;
+                org.apache.cxf.staxutils;
+                org.apache.cxf.transport;
+                org.apache.cxf.version;
+                org.apache.cxf.ws.addressing;
+                org.apache.cxf.wsdl;
+                org.apache.cxf.wsdl11;version="2.4.4",
+                javax.wsdl,
+                javax.wsdl.extensions,
+                javax.wsdl.extensions.http,
+                javax.wsdl.extensions.mime,
+                javax.wsdl.extensions.schema,
+                javax.wsdl.extensions.soap,
+                javax.wsdl.extensions.soap12,
+                javax.wsdl.factory,
+                javax.wsdl.xml,
+                javax.xml.ws,
+                javax.xml.ws.handler,
+                javax.xml.ws.handler.soap,
+                javax.xml.ws.http,
+                javax.xml.ws.soap,
+                javax.xml.ws.spi,
+                javax.xml.ws.spi.http,
+                javax.xml.ws.wsaddressing,
+                org.apache.ws.commons.schema;version=2.0,
+                org.apache.ws.commons.schema.constants;version=2.0,
+                org.apache.ws.commons.schema.extensions;version=2.0,
+                org.apache.ws.commons.schema.resolver;version=2.0,
+                org.apache.ws.commons.schema.utils;version=2.0,
+                com.sun.mirror.apt,
+                com.sun.mirror.declaration,
+                com.sun.mirror.type,
+                com.sun.mirror.util,com.sun.tools.xjc,
+                com.sun.tools.xjc.outline,
+                com.sun.tools.xjc.model,
+                com.sun.tools.xjc.Options,
+                com.sun.codemodel,
+                javax.mail,javax.mail.internet,
+                org.jbpm.persistence,
+                org.springframework.orm.jpa;version="2.5.0",
+                org.antlr.runtime;org.antlr.runtime.tree;version="3.4.0"</value>
+            </property>
+          </systemProperties>
           <systemPropertyVariables>
             <propertyName>propertyValue</propertyName>
             <buildDirectory>${project.build.directory}</buildDirectory>
@@ -72,18 +161,30 @@
     </dependency>
     <dependency>
       <groupId>org.drools</groupId>
+      <artifactId>drools-spring</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.drools</groupId>
+      <artifactId>drools-camel</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.drools</groupId>
       <artifactId>drools-decisiontables</artifactId>
     </dependency>
-    <!--dependency>
-         <groupId>org.drools</groupId>
-         <artifactId>drools-persistence-jpa</artifactId>
-      </dependency-->
+    <dependency>
+      <groupId>org.drools</groupId>
+      <artifactId>drools-persistence-jpa</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.jbpm</groupId>
       <artifactId>jbpm-flow</artifactId>
     </dependency>
     <dependency>
       <groupId>org.jbpm</groupId>
+      <artifactId>jbpm-persistence-jpa</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jbpm</groupId>
       <artifactId>jbpm-bpmn2</artifactId>
     </dependency>
 
@@ -106,6 +207,24 @@
     </dependency>
 
     <dependency>
+      <groupId>javax.xml.bind</groupId>
+      <artifactId>jaxb-api</artifactId>
+      <version>2.2.2</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.neethi</groupId>
+      <artifactId>neethi</artifactId>
+      <version>3.0.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.ws.commons.schema</groupId>
+      <artifactId>XmlSchema</artifactId>
+      <version>1.4.7</version>
+    </dependency>
+
+    <dependency>
       <groupId>org.junit</groupId>
       <artifactId>com.springsource.org.junit</artifactId>
       <version>4.8.1</version>
@@ -120,6 +239,27 @@
     </dependency>
 
     <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-orm</artifactId>
+      <version>${spring.maven.artifact.version}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-jdbc</artifactId>
+      <version>${spring.maven.artifact.version}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-tx</artifactId>
+      <version>${spring.maven.artifact.version}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
       <groupId>org.springframework.osgi</groupId>
       <artifactId>org.springframework.osgi.test</artifactId>
       <version>${spring.osgi.version}</version>
@@ -152,6 +292,63 @@
       <version>2.2.3</version>
       <scope>test</scope>
     </dependency>
+
+    <dependency>
+      <groupId>asm</groupId>
+      <artifactId>asm</artifactId>
+      <version>2.2.3</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.ws.rs</groupId>
+      <artifactId>jsr311-api</artifactId>
+      <version>1.1</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.fusesource.commonman</groupId>
+      <artifactId>commons-management</artifactId>
+      <version>1.0</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+      <version>${camel.ver}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-cxf</artifactId>
+      <version>${camel.ver}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-spring</artifactId>
+      <version>${camel.ver}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-bundle</artifactId>
+      <version>2.4.4</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>wsdl4j</groupId>
+      <artifactId>wsdl4j</artifactId>
+      <version>1.6.2</version>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
-  
+
 </project>
diff --git a/drools-osgi-bundles/org.drools.osgi.test/src/test/filtered-resources/boot-bundles.properties b/drools-osgi-bundles/org.drools.osgi.test/src/test/filtered-resources/boot-bundles.properties
index e59cc71..c792ee1 100644
--- a/drools-osgi-bundles/org.drools.osgi.test/src/test/filtered-resources/boot-bundles.properties
+++ b/drools-osgi-bundles/org.drools.osgi.test/src/test/filtered-resources/boot-bundles.properties
@@ -11,7 +11,7 @@
 # elements that have to be ignored should star with
 # ignore
 
-# Note: inner placeholders are not supported. 
+# Note: inner placeholders are not supported.
 
 #
 # common properties
@@ -27,6 +27,7 @@ ignore.junit.version=4.8.1
 ignore.spring.version=3.0.0.RELEASE
 ignore.spring.osgi.version=1.2.1
 ignore.asm.version=2.2.3
+ignore.camel.version=2.4.0
 
 # groupIds
 ignore.spring.groupId=org.springframework
@@ -117,7 +118,7 @@ com.sun.xml,com.springsource.com.sun.xml.bind.jaxb1,2.1.7
 com.sun.msv,com.springsource.com.sun.msv.datatype,0.0.0.20060615
 org.relaxng,com.springsource.org.relaxng.datatype,1.0.0
 net.sourceforge.iso-relax,com.springsource.org.iso_relax.verifier,0.0.0.20041111
-com.sun.xml,com.springsource.com.sun.tools.xjc,2.1.7
+#com.sun.xml,com.springsource.com.sun.tools.xjc,2.1.7
 com.sun.xml,com.springsource.com.sun.xml.fastinfoset,1.2.2
 org.jvnet.staxex,com.springsource.org.jvnet.staxex,1.0.0
 
@@ -126,8 +127,10 @@ edu.oswego.cs.concurrent,com.springsource.edu.oswego.cs.dl.util.concurrent,1.3.4
 # aop alliance
 org.aopalliance,com.springsource.org.aopalliance,1.0.0
 # asm
+#org.objectweb.asm,com.springsource.org.objectweb.asm,3.1.0
 org.objectweb.asm,com.springsource.org.objectweb.asm,2.2.3
-org.objectweb.asm,com.springsource.org.objectweb.asm,1.5.3
+#org.springframework,spring-asm,${ignore.spring.version}
+#org.objectweb.asm,com.springsource.org.objectweb.asm,1.5.3
 org.springframework,org.springframework.asm,${ignore.spring.version}
 
 org.apache.ant,com.springsource.org.apache.tools.ant,1.8.1
@@ -171,10 +174,10 @@ ${ignore.spring.groupId},org.springframework.context,${ignore.spring.version}
 ${ignore.spring.groupId},org.springframework.context.support,${ignore.spring.version}
 ${ignore.spring.groupId},org.springframework.core,${ignore.spring.version}
 ${ignore.spring.groupId},org.springframework.expression,${ignore.spring.version}
-#${ignore.spring.groupId},org.springframework.jdbc,${ignore.spring.version}
-#${ignore.spring.groupId},org.springframework.orm,${ignore.spring.version}
+${ignore.spring.groupId},spring-jdbc,${ignore.spring.version}
+${ignore.spring.groupId},spring-orm,${ignore.spring.version}
 ${ignore.spring.groupId},org.springframework.test,${ignore.spring.version}
-#${ignore.spring.groupId},org.springframework.transaction,${ignore.spring.version}
+${ignore.spring.groupId},spring-tx,${ignore.spring.version}
 #${ignore.spring.groupId},org.springframework.web,${ignore.spring.version}
 
 #Security
@@ -193,6 +196,15 @@ ${ignore.spring.osgi.groupId},org.springframework.osgi.test,${ignore.spring.osgi
 
 com.h2database,com.springsource.org.h2,1.0.71
 
+org.apache.neethi,neethi,3.0.1
+javax.ws.rs,jsr311-api,1.1
+javax.xml.bind,jaxb-api,2.2.2
+org.fusesource.commonman,commons-management,1.0
+org.apache.camel,camel-core,${ignore.camel.version}
+org.apache.camel,camel-cxf,${ignore.camel.version}
+org.apache.camel,camel-spring,${ignore.camel.version}
+
+org.jbpm,jbpm-persistence-jpa,${ignore.jbpm.version}
 org.drools,knowledge-api,${ignore.drools.version}
 org.drools,knowledge-internal-api,${ignore.drools.version}
 org.drools,drools-core,${ignore.drools.version}
@@ -201,7 +213,7 @@ org.drools,drools-compiler,${ignore.drools.version}
 org.jbpm,jbpm-flow-builder,${ignore.jbpm.version}
 org.drools,drools-templates,${ignore.drools.version}
 org.drools,drools-decisiontables,${ignore.drools.version}
+org.drools,drools-spring,${ignore.drools.version}
+org.drools,drools-camel,${ignore.drools.version}
 org.jbpm,jbpm-bpmn2,${ignore.jbpm.version}
-#org.drools,drools-persistence-jpa,${ignore.drools.version}
-
-
+org.drools,drools-persistence-jpa,${ignore.drools.version}
diff --git a/drools-osgi-bundles/org.drools.osgi.test/src/test/java/org/drools/osgi/integrationtests/SimpleOsgiTest.java b/drools-osgi-bundles/org.drools.osgi.test/src/test/java/org/drools/osgi/integrationtests/SimpleOsgiTest.java
index 18176ea..01c5138 100644
--- a/drools-osgi-bundles/org.drools.osgi.test/src/test/java/org/drools/osgi/integrationtests/SimpleOsgiTest.java
+++ b/drools-osgi-bundles/org.drools.osgi.test/src/test/java/org/drools/osgi/integrationtests/SimpleOsgiTest.java
@@ -17,7 +17,9 @@
 package org.drools.osgi.integrationtests;
 
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import org.drools.KnowledgeBase;
 import org.drools.KnowledgeBaseConfiguration;
@@ -52,7 +54,7 @@ public class SimpleOsgiTest extends AbstractDroolsSpringDMTest {
     }
 
     protected void onTearDown() throws Exception {
-        
+
     }
 
     @Test
@@ -66,11 +68,15 @@ public class SimpleOsgiTest extends AbstractDroolsSpringDMTest {
     public void testOsgiEnvironment() throws Exception {
         Bundle[] bundles = bundleContext.getBundles();
         System.out.println( "bundles: " );
+        Set<String> bundleNames = new HashSet<String>();
         for ( int i = 0; i < bundles.length; i++ ) {
             System.out.print( bundles[i].getSymbolicName() + ":" + bundles[i].getState() );
             System.out.print( ", " );
+            bundleNames.add(bundles[i].getSymbolicName());
         }
         System.out.println();
+        assertTrue(bundleNames.contains("org.drools.spring"));
+        assertTrue(bundleNames.contains("org.drools.camel"));
     }
 
     @Test
@@ -79,7 +85,7 @@ public class SimpleOsgiTest extends AbstractDroolsSpringDMTest {
         ServiceRegistry registry = (ServiceRegistry) bundleContext.getService( serviceRef );
 
         KnowledgeBuilderFactoryService knowledgeBuilderFactoryService = registry.get( KnowledgeBuilderFactoryService.class );
-        
+
         KnowledgeBaseFactoryService knowledgeBaseFactoryService = registry.get( KnowledgeBaseFactoryService.class );
         ResourceFactoryService resourceFactoryService = registry.get( ResourceFactoryService.class );
 
@@ -107,7 +113,7 @@ public class SimpleOsgiTest extends AbstractDroolsSpringDMTest {
             throw new RuntimeException( kbuilder.getErrors().toString() );
         }
 
-        KnowledgeBaseConfiguration kbaseConf = knowledgeBaseFactoryService.newKnowledgeBaseConfiguration( null,                                                                                                          
+        KnowledgeBaseConfiguration kbaseConf = knowledgeBaseFactoryService.newKnowledgeBaseConfiguration( null,
                                                                                                           getClass().getClassLoader() );
 
         KnowledgeBase kbase = knowledgeBaseFactoryService.newKnowledgeBase( kbaseConf );
@@ -119,7 +125,7 @@ public class SimpleOsgiTest extends AbstractDroolsSpringDMTest {
 
         ksession.insert( new Person( "name",
                                      34 ) );
-        
+
         ksession.fireAllRules();
         ksession.dispose();
 
diff --git a/drools-osgi-bundles/pom.xml b/drools-osgi-bundles/pom.xml
index e45163f..0c0b26c 100644
--- a/drools-osgi-bundles/pom.xml
+++ b/drools-osgi-bundles/pom.xml
@@ -14,11 +14,11 @@
 
   <name>Drools OSGi bundles multiproject</name>
   <description>Produces OSGi enabled Drools Expert and Fusions jars.</description>
-  
+
   <repositories>
-    <repository>  
-      <id>com.springsource.repository.bundles.release</id>  
-      <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name> 
+    <repository>
+      <id>com.springsource.repository.bundles.release</id>
+      <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
       <url>http://repository.springsource.com/maven/bundles/release</url>
       <releases>
         <enabled>true</enabled>
@@ -30,7 +30,7 @@
     </repository>
     <repository>
       <id>com.springsource.repository.bundles.external</id>
-      <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>  
+      <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
       <url>http://repository.springsource.com/maven/bundles/external</url>
       <releases>
         <enabled>true</enabled>
@@ -39,13 +39,14 @@
       <snapshots>
         <enabled>false</enabled>
       </snapshots>
-    </repository>   
+    </repository>
   </repositories>
-  
+
   <properties>
     <spring.maven.artifact.version>3.0.0.RELEASE</spring.maven.artifact.version>
     <spring.osgi.version>1.2.1</spring.osgi.version>
     <equinox.ver>3.5.1</equinox.ver>
+    <camel.ver>2.4.0</camel.ver>
   </properties>
 
   <modules>


More information about the rules-dev mailing list