Re: Installing Camel examples in Karaf

2013-05-20 Thread Babak Vahdat
core - 2.12.0.SNAPSHOT | Exchange[ExchangePattern:InOnly, BodyType:String, Body:SpringDSL set body: Mon May 20 12:17:10 CEST 2013] Babak -- View this message in context: http://camel.465427.n5.nabble.com/Installing-Camel-examples-in-Karaf-tp5725748p5732832.html Sent from the Camel Development mailing list archive at Nabble.com.

Re: Installing Camel examples in Karaf

2013-05-19 Thread Babak Vahdat
gt; >>> > >>> regards, Achim >>> > >>> >>> > >>> >>> > >>> 2013/1/18 Claus Ibsen < > >> claus.ibsen@ > >> > >>> > >>> >>> > >>> > Hi >>> > >>> > >>> > >>> > So when people get started with Apache Karaf and Camel (eg not >>> going >>> > >>> > down the full ESB with SMX) then I would like to make that much >>> > >>> > easier. >>> > >>> > For example to tell them how easy you can install some of the >>> > examples >>> > >>> > we provided with Apache Camel >>> > >>> > http://camel.apache.org/examples >>> > >>> > >>> > >>> > Many of these examples have been prepared for OSGi and have >>> embedded >>> > >>> > features.xml file, so in theory they are ready to install. >>> > >>> > >>> > >>> > Though I could not find a way to install the example in Karaf >>> without >>> > >>> pain. >>> > >>> > >>> > >>> > eg I want to do >>> > >>> > >>> > >>> > cd apache-karaf-2.3.0 >>> > >>> > bin/karaf >>> > >>> > >>> > >>> > features:choose camel 2.11.0 >>> > >>> > >>> > >>> > // and how to install my example, such as camel-example-sql >>> > >>> > ? >>> > >>> > >>> > >>> > >>> > >>> > The camel features does not contain examples. >>> > >>> > And frankly I would like Karaf to be able to install a bundle >>>but >>> use >>> > >>> > the features.xml file that is included in the JAR in the root >>> > >>> > classpath. (Or some other directory if Karaf has a standard for >>> > that). >>> > >>> > >>> > >>> > Maybe I can type, eg notice the :feature in the command >>> > >>> > >>> > >>> > osgi:install >>> mvn:feature:org.apache/camel/camel-example-sql/2.11.0 >>> > >>> > >>> > >>> > Or some other way to install it. >>> > >>> > >>> > >>> > Then people just need to download Karaf, and they can install >>> Camel >>> > >>> > and the examples from Maven. >>> > >>> > >>> > >>> > Now I want them to be able to do this for their custom >>> application >>> as >>> > >>> > well, so they can do >>> > >>> > >>> > >>> > osgi:install file:feature:/dev/myproject/target/myapp-1.0.jar >>> > >>> > >>> > >>> > Or something like that. >>> > >>> > >>> > >>> > >>> > >>> > So how can we make it easier for people to install and try >>>Camel >>> > >>> > examples in vanilla Apache Karaf containers? >>> > >>> > And how can we make it easier for people to install their own >>> > >>> > applications in vanilla Apache Karaf containers, >>> > >>> > which uses features.xml file to declare their dependencies. >>> > >>> > >>> > >>> > And NO they do NOT want to use KAR files or some Karaf >>>specific. >>> > Their >>> > >>> > applications should be plain JARs >>> > >>> > that can also run outside Karaf as well. >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > -- >>> > >>> > Claus Ibsen >>> > >>> > - >>> > >>> > Red Hat, Inc. >>> > >>> > FuseSource is now part of Red Hat >>> > >>> > Email: > >> cibsen@ > >>> > >>> > Web: http://fusesource.com >>> > >>> > Twitter: davsclaus >>> > >>> > Blog: http://davsclaus.com >>> > >>> > Author of Camel in Action: http://www.manning.com/ibsen >>> > >>> > >>> > >>> >>> > >>> >>> > >>> >>> > >>> -- >>> > >>> >>> > >>> Apache Karaf <http://karaf.apache.org/>; Committer & PMC >>> > >>> OPS4J Pax Web >>><http://wiki.ops4j.org/display/paxweb/Pax+Web/>; >>> > Committer & >>> > >>> Project Lead >>> > >>> OPS4J Pax for Vaadin < >>> > http://team.ops4j.org/wiki/display/PAXVAADIN/Home> >>> > >>> Commiter & Project Lead >>> > >>> blog <http://notizblog.nierbeck.de/>; >>> > >>> >>> > >> >>> > >> >>> > >> >>> > >> -- >>> > >> >>> > >> Guillaume Nodet >>> > >> >>> > >> Blog: http://gnodet.blogspot.com/ >>> > >> >>> > >> FuseSource, Integration everywhere >>> > >> http://fusesource.com >>> > > >>> > > >>> > > >>> > > -- >>> > > Claus Ibsen >>> > > - >>> > > Red Hat, Inc. >>> > > FuseSource is now part of Red Hat >>> > > Email: > >> cibsen@ > >>> > > Web: http://fusesource.com >>> > > Twitter: davsclaus >>> > > Blog: http://davsclaus.com >>> > > Author of Camel in Action: http://www.manning.com/ibsen >>> > >>> > >>> > >>> > -- >>> > Claus Ibsen >>> > - >>> > Red Hat, Inc. >>> > FuseSource is now part of Red Hat >>> > Email: > >> cibsen@ > >>> > Web: http://fusesource.com >>> > Twitter: davsclaus >>> > Blog: http://davsclaus.com >>> > Author of Camel in Action: http://www.manning.com/ibsen >>> > >>> >>> >>> >>> -- >>> Charles Moulliard >>> Apache Committer / Sr. Enterprise Architect (RedHat) >>> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com >>> >> >> >> >> -- >> >> Guillaume Nodet >> >> Blog: http://gnodet.blogspot.com/ >> >> FuseSource, Integration everywhere >> http://fusesource.com > > > > > >-- >View this message in context: >http://camel.465427.n5.nabble.com/Installing-Camel-examples-in-Karaf-tp572 >5748p5732802.html >Sent from the Camel Development mailing list archive at Nabble.com.

Re: Installing Camel examples in Karaf

2013-05-18 Thread Babak Vahdat
> > bin/karaf >> > >>> > >> > >>> > features:choose camel 2.11.0 >> > >>> > >> > >>> > // and how to install my example, such as camel-example-sql >> > >>> > ? >> > >>> > >> > >>> > >> > >>> > The camel features does not contain examples. >> > >>> > And frankly I would like Karaf to be able to install a bundle but >> use >> > >>> > the features.xml file that is included in the JAR in the root >> > >>> > classpath. (Or some other directory if Karaf has a standard for >> > that). >> > >>> > >> > >>> > Maybe I can type, eg notice the :feature in the command >> > >>> > >> > >>> > osgi:install >> mvn:feature:org.apache/camel/camel-example-sql/2.11.0 >> > >>> > >> > >>> > Or some other way to install it. >> > >>> > >> > >>> > Then people just need to download Karaf, and they can install >> Camel >> > >>> > and the examples from Maven. >> > >>> > >> > >>> > Now I want them to be able to do this for their custom >> application >> as >> > >>> > well, so they can do >> > >>> > >> > >>> > osgi:install file:feature:/dev/myproject/target/myapp-1.0.jar >> > >>> > >> > >>> > Or something like that. >> > >>> > >> > >>> > >> > >>> > So how can we make it easier for people to install and try Camel >> > >>> > examples in vanilla Apache Karaf containers? >> > >>> > And how can we make it easier for people to install their own >> > >>> > applications in vanilla Apache Karaf containers, >> > >>> > which uses features.xml file to declare their dependencies. >> > >>> > >> > >>> > And NO they do NOT want to use KAR files or some Karaf specific. >> > Their >> > >>> > applications should be plain JARs >> > >>> > that can also run outside Karaf as well. >> > >>> > >> > >>> > >> > >>> > >> > >>> > >> > >>> > >> > >>> > >> > >>> > >> > >>> > -- >> > >>> > Claus Ibsen >> > >>> > - >> > >>> > Red Hat, Inc. >> > >>> > FuseSource is now part of Red Hat >> > >>> > Email: > cibsen@ >> > >>> > Web: http://fusesource.com >> > >>> > Twitter: davsclaus >> > >>> > Blog: http://davsclaus.com >> > >>> > Author of Camel in Action: http://www.manning.com/ibsen >> > >>> > >> > >>> >> > >>> >> > >>> >> > >>> -- >> > >>> >> > >>> Apache Karaf <http://karaf.apache.org/>; Committer & PMC >> > >>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>; >> > Committer & >> > >>> Project Lead >> > >>> OPS4J Pax for Vaadin < >> > http://team.ops4j.org/wiki/display/PAXVAADIN/Home> >> > >>> Commiter & Project Lead >> > >>> blog <http://notizblog.nierbeck.de/>; >> > >>> >> > >> >> > >> >> > >> >> > >> -- >> > >> >> > >> Guillaume Nodet >> > >> >> > >> Blog: http://gnodet.blogspot.com/ >> > >> >> > >> FuseSource, Integration everywhere >> > >> http://fusesource.com >> > > >> > > >> > > >> > > -- >> > > Claus Ibsen >> > > - >> > > Red Hat, Inc. >> > > FuseSource is now part of Red Hat >> > > Email: > cibsen@ >> > > Web: http://fusesource.com >> > > Twitter: davsclaus >> > > Blog: http://davsclaus.com >> > > Author of Camel in Action: http://www.manning.com/ibsen >> > >> > >> > >> > -- >> > Claus Ibsen >> > - >> > Red Hat, Inc. >> > FuseSource is now part of Red Hat >> > Email: > cibsen@ >> > Web: http://fusesource.com >> > Twitter: davsclaus >> > Blog: http://davsclaus.com >> > Author of Camel in Action: http://www.manning.com/ibsen >> > >> >> >> >> -- >> Charles Moulliard >> Apache Committer / Sr. Enterprise Architect (RedHat) >> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com >> > > > > -- > > Guillaume Nodet > > Blog: http://gnodet.blogspot.com/ > > FuseSource, Integration everywhere > http://fusesource.com -- View this message in context: http://camel.465427.n5.nabble.com/Installing-Camel-examples-in-Karaf-tp5725748p5732802.html Sent from the Camel Development mailing list archive at Nabble.com.

Re: Installing Camel examples in Karaf

2013-01-26 Thread Charles Moulliard
Indeed. This is not until now possible if the features file is embedded in a jar/bundle. The features file should be deployed separately from the bundle On Sat, Jan 26, 2013 at 9:54 AM, Claus Ibsen wrote: > On Tue, Jan 22, 2013 at 2:03 PM, Charles Moulliard > wrote: > > You are right. The ques

Re: Installing Camel examples in Karaf

2013-01-26 Thread Claus Ibsen
On Tue, Jan 22, 2013 at 2:03 PM, Charles Moulliard wrote: > You are right. The question is perhaps much more conceptual than technical > but Do we really need to create a archive with a KAR extension instead of > allowing to deploy a JAR file (= bundle) containing a features xml file > which is in

Re: Installing Camel examples in Karaf

2013-01-22 Thread Charles Moulliard
You are right. The question is perhaps much more conceptual than technical but Do we really need to create a archive with a KAR extension instead of allowing to deploy a JAR file (= bundle) containing a features xml file which is in fact the proposition of Claus Ibsen and certainly others ? On Tu

Re: Installing Camel examples in Karaf

2013-01-22 Thread Achim Nierbeck
Well a KAR archive was created for this exact scenario. So if we do this for std. jars, why would we need kars then? 2013/1/22 Charles Moulliard > On 22/01/13 11:42, Achim Nierbeck wrote: > >> hmm, afairc the deployment of a feature.xml embedded in a jar was meant to >> work this way. It was su

Re: Installing Camel examples in Karaf

2013-01-22 Thread Charles Moulliard
On 22/01/13 11:42, Achim Nierbeck wrote: hmm, afairc the deployment of a feature.xml embedded in a jar was meant to work this way. It was supposed to install just the feature itself without starting it right away. This was planned to work this way since it might result in "Downloading the complet

Re: Installing Camel examples in Karaf

2013-01-22 Thread Achim Nierbeck
hmm, afairc the deployment of a feature.xml embedded in a jar was meant to work this way. It was supposed to install just the feature itself without starting it right away. This was planned to work this way since it might result in "Downloading the complete internet" if someone isn't careful with t

Re: Installing Camel examples in Karaf

2013-01-22 Thread Charles Moulliard
Hi Claus, Procedure to deploy camel example with this instruction install -s feature:mvn:org.apache.camel/camel-example-sql/2.11-SNAPSHOT works fine now with that modification (https://issues.apache.org/jira/browse/KARAF-2134) EXCEPTED that the feature content (= bundles) are not installed. Guilla

Re: Installing Camel examples in Karaf

2013-01-22 Thread Claus Ibsen
On Mon, Jan 21, 2013 at 3:50 PM, Charles Moulliard wrote: > Works better. Nevertheless the features defined in the features file > deployed as a bundle are not deployed. Here is an example > > [ 127] [Installed ] [] [ 80] camel-example-sql > (2.11.0.SNAPSHOT) // CONTAINS FEATURES.XM

Re: Installing Camel examples in Karaf

2013-01-21 Thread Charles Moulliard
Works better. Nevertheless the features defined in the features file deployed as a bundle are not deployed. Here is an example [ 127] [Installed ] [] [ 80] camel-example-sql (2.11.0.SNAPSHOT) // CONTAINS FEATURES.XML FILE karaf@root> listurl Loaded URI true bundle://118.0:0/ME

Re: Installing Camel examples in Karaf

2013-01-21 Thread Guillaume Nodet
Raised and fixed https://issues.apache.org/jira/browse/KARAF-2134 The workaround is to use the plain http url instead of the mvn url. On Mon, Jan 21, 2013 at 10:42 AM, Charles Moulliard wrote: > Convention is : META-INF + "/" + one directory where directory = > "org.apache.karaf.shell.features"

Re: Installing Camel examples in Karaf

2013-01-21 Thread Charles Moulliard
Convention is : META-INF + "/" + one directory where directory = "org.apache.karaf.shell.features" + "/" + "*.xml" where * corresponds to a features.xml file On Mon, Jan 21, 2013 at 9:28 AM, Claus Ibsen wrote: > Hi > > Charles may have pointed out about the naming of the features file. > > Shou

Re: Installing Camel examples in Karaf

2013-01-21 Thread Claus Ibsen
Hi Charles may have pointed out about the naming of the features file. Should it be a file in META-INF which has this long name with all the dots? Or should it be a features.xml file in META-INF/org/apache/... eg deep down in a sub dir On Fri, Jan 18, 2013 at 3:41 PM, Claus Ibsen wrote: > Hi

Re: Installing Camel examples in Karaf

2013-01-21 Thread Charles Moulliard
I just had a quick look and discovered that existing code of Karaf 2.3 when a bundle is deployed using the command "feature:mvn:org.apache.camel/camel-example-sql/2.11-SNAPSHOT" does not install the features file included under META-INF directory. The existing code will only do that if the status o

Re: Installing Camel examples in Karaf

2013-01-21 Thread Claus Ibsen
On Sun, Jan 20, 2013 at 6:55 PM, Achim Nierbeck wrote: > Did you also start the bundle? To my understanding a bundle-tracker is only > able to kick in when a bundle is fully resolved. Therefore a start is > needed. You might also do this right when installing with osgi:instll -s > mvn: > Good

Re: Installing Camel examples in Karaf

2013-01-20 Thread Achim Nierbeck
Did you also start the bundle? To my understanding a bundle-tracker is only able to kick in when a bundle is fully resolved. Therefore a start is needed. You might also do this right when installing with osgi:instll -s mvn: regards, Achim 2013/1/18 Claus Ibsen > Hi > > > > On Fri, Jan 18,

Re: Installing Camel examples in Karaf

2013-01-20 Thread Christian Müller
Yes, that will work. But as I understood from Guillaume, Karaf already provides the "feature deployer". The question is: Why it doesn't work? ;-) It would be great if you (or another Karaf committer) could have a look why it doesn't work for Claus example. Best, Christian On Sat, Jan 19, 2013 at

Re: Installing Camel examples in Karaf

2013-01-19 Thread Christian Schneider
For my own examples I normally offer a README.txt with the commands to install the example. Like this one: https://github.com/cschneider/Karaf-Tutorial/blob/master/camel/jms2rest/ReadMe.txt Of course it is more than one command for a complex example but you can simply copy/paste the whole comm

Re: Installing Camel examples in Karaf

2013-01-19 Thread Claus Ibsen
On Fri, Jan 18, 2013 at 3:17 PM, Guillaume Nodet wrote: > Fwiw, when you use the url handler or drop the file in the deploy folder, > both methods just generate a bundle which has the feature file inside > META-INF/org.apache.karaf.shell.features > I cannot find any details about this in the docs

Re: Installing Camel examples in Karaf

2013-01-18 Thread Claus Ibsen
On Fri, Jan 18, 2013 at 12:46 PM, Achim Nierbeck wrote: > Hi Clause, > > thanks for summing up what we talked of on IRC :) > Yeah I guess it was a brief summary. I am just trying to push the envelope, to make developing / using / deploying integration applications with the Apache stack easier. T

Re: Installing Camel examples in Karaf

2013-01-18 Thread Claus Ibsen
Hi On Fri, Jan 18, 2013 at 2:30 PM, Guillaume Nodet wrote: > Are you talking about the features deployer ? > Karaf has it already. You can use osgi:install feature:mvn:xxx or drop the > features file in the deploy directory, or deploy any bundle which has a > META-INF/org.apache.karaf.shell.fe

Re: Installing Camel examples in Karaf

2013-01-18 Thread Guillaume Nodet
Fwiw, when you use the url handler or drop the file in the deploy folder, both methods just generate a bundle which has the feature file inside META-INF/org.apache.karaf.shell.features On Fri, Jan 18, 2013 at 2:53 PM, Achim Nierbeck wrote: > Oh well, > > didn't remember the last possibility of t

Re: Installing Camel examples in Karaf

2013-01-18 Thread Achim Nierbeck
Oh well, didn't remember the last possibility of the features-deployer :) thanks, Achim 2013/1/18 Guillaume Nodet > Are you talking about the features deployer ? > Karaf has it already. You can use osgi:install feature:mvn:xxx or drop the > features file in the deploy directory, or deploy an

Re: Installing Camel examples in Karaf

2013-01-18 Thread Guillaume Nodet
Are you talking about the features deployer ? Karaf has it already. You can use osgi:install feature:mvn:xxx or drop the features file in the deploy directory, or deploy any bundle which has a META-INF/org.apache.karaf.shell.features/*.xml file inside. On Fri, Jan 18, 2013 at 12:46 PM, Achim Nie

Re: Installing Camel examples in Karaf

2013-01-18 Thread Achim Nierbeck
Hi Clause, thanks for summing up what we talked of on IRC :) I think it could be even easier. We could add a bundle tracker for features.xml files that will install those with the features service. For this we don't even need a special syntax of the osgi:install url (and actually if you want a ur