I think you can create a feature bundle that servicemix will install at boot
time. Instructions are documented here:
http://servicemix.apache.org/kernel/46-provisioning.html

Basically, create a features repository, which is just an xml file with the
format below:

<features>
  <feature name="camel" version="${camel-version}">
    <feature version="${camel-version}">camel-core</feature>
    <feature version="${camel-version}">camel-spring-osgi</feature>
  </feature>
  <feature name="camel-core" version="${camel-version}">
    <feature version="${spring-version}">spring</feature>

<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/1.4.0</bundle>

<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.1/1.4.0</bundle>

<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/1.4.0</bundle>

<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.1.12_1</bundle>
    <bundle>mvn:org.fusesource.commonman/commons-management/1.0</bundle>
    <bundle>mvn:org.apache.camel/camel-core/${camel-version}</bundle>
  </feature>
  <feature name="camel-spring-osgi" version="${camel-version}">

<bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
    <feature version="${spring-version}">spring</feature>
    <feature version="${spring-dm-version}">spring-dm</feature>
    <bundle>mvn:org.springframework/spring-tx/${spring-version}</bundle>
    <feature version="${camel-version}">camel-core</feature>
    <bundle>mvn:org.apache.camel/camel-spring-osgi/${camel-version}</bundle>
  </feature>

   <feature name="ftp-example">

<bundle>mvn:org.apache.ftpserver.examples/ftpserver-osgi-spring-service/${ftp-version}</bundle>

<bundle>mvn:org.apache.ftpserver.examples/ftpserver-osgi-ftplet-service/${ftp-version}</bundle>
   </feature>

   <feature name="ibatis-support">

<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ibatis-sqlmap/${ibatis-version}</bundle>

<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oscache/${oscache-version}</bundle>
   </feature>
</features>

and then edit the file ${SMX_ROOT}/etc/org.apache.felix.karaf.features.cfg

add to the featuresRepositories property something like:
jar:mvn:com.stonewatercontrols.sensor/sensor-features/0.1-SNAPSHOT!/sensor-features-0.1-SNAPSHOT-features.xml

(assuming your repository file is in a jar in your mvn repo)

and then add the featuresBoot property the name of the features you want to
boot. example for ftp-example:

featuresBoot=activemq,activemq-broker,camel,jbi-cluster,web,servicemix-cxf-bc,servicemix-file,servicemix-ftp,servicemix-http,servicemix-jms,servicemix-mail,servicemix-smpp,servicemix-snmp,servicemix-vfs
,servicemix-bean,servicemix-camel,servicemix-cxf-se,servicemix-drools,servicemix-eip,servicemix-osworkflow,servicemix-quartz,servicemix-scripting,servicemix-validation,servicemix-saxon,servicemix-wsn200
5,servicemix-exec,ftp-example

hth,
jim

On Tue, Jul 27, 2010 at 3:36 PM, gnanda1 <[email protected]>wrote:

>
> Hi All,
>  I have few osgi bundles created for our application. We have successfully
> completed our first step towards our application build. We are planning to
> move these bundles to UAT and setup servicemix in UAT.
> Until now we(developers)  access karaf console to install any additional
> features that need to be installed by using features:install command or
> install bundles and uninstall bundles using osgi command.
>
> In UAT we would not have the luxury of accessing karaf console. We would
> have to  provide a script(shell,perl or java class?) to access karaf and
> execute command in karaf console.
> How would I achieve doing this? Any suggestion will be greatly appriciated.
>
> Regards
> Gnanda
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/deployment-strategy-accessing-karaf-console-tp2256349p2256349.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

Reply via email to