You should have a look at the servicemix 4.0 branch which does that and it
works.
See

http://svn.apache.org/repos/asf/incubator/servicemix/branches/servicemix-4.0/

Build the project from the root and you will find a binary distribution that
you can use to deploy your camel app.

On 11/5/07, William Tam <[EMAIL PROTECTED]> wrote:
>
> Does anybody have any success starting camel bundles (say the
> camel-core bundle) in an osgi container?  I have tried doing that
> (installing went fine) with the camel-core bundle in felix and there
> were unresolved packages (jaxb-api, common-logging, and
> springframework).   I was able to wrap jaxb-api and common-logging
> jars as bundles following the procedures in
> http://felix.apache.org/site/creating-bundles-using-bnd.html.
> However, wrapping springframework is rather daunting since it pulls in
> dependencies after dependencies.  The new spring jars (2.1) are
> already osgi bundles but I don't think I can use them since they are
> versioned (as 2.1.0.m4).  Camel-core would import the default version
> (0.0.0).
>
> One way to hack it (as follow) is to use the DynamicImport-Package
> attribute to allow the osgi container to resolve those packages from
> its classpath.  I wonder if anybody has any advice.
>
> Thanks,
> William
>
> <plugin>
>         <groupId>org.apache.felix</groupId>
>             <artifactId>maven-bundle-plugin</artifactId>
>             <version>${felix-version}</version>
>             <extensions>true</extensions>
>             <configuration>
>               <instructions>
>                 <Bundle-Name>${artifactId}</Bundle-Name>
>                 <Bundle-SymbolicName>${camel.osgi.symbolic.name
> }</Bundle-SymbolicName>
>                 <Export-Package>${camel.osgi.export}</Export-Package>
>                 <Import-Package>${camel.osgi.import}</Import-Package>
>                 <Private-Package>${camel.osgi.private.pkg
> }</Private-Package>
>                 <Implementation-Title>Apache Camel</Implementation-Title>
>                 <Implementation-Version>${project.version
> }</Implementation-Version>
>                 <Private-Package>${camel.osgi.private.pkg
> }</Private-Package>
>
> <DynamicImport-Package>javax.xml.bind.annotation.adapters,
> org.springframework.jmx.export.metadata,
> org.springframework.jmx.export.annotation, javax.xml.stream,
> org.apache.commons.logging, org.springframework.jmx.export.assembler,
> javax.xml.bind.annotation</DynamicImport-Package>
>               </instructions>
>             </configuration>
>       </plugin>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to