Hi Freeman, Thanks for this - I did search the PDF for "wrap:" but it must have been operator error that I didn't spot it in the creating bundles section.
cheers, Caspar On 3 December 2012 06:06, Freeman Fang <[email protected]> wrote: > Hi, > > We actually document how to use wrap in both shell and features here[1], > and we have KARAF-1585[2] to discuss and track it. > > Anyway, your patch has details and elaborate what's going on under the > hood, it's a good supplement, I will take care of it. > > Thanks > > [1] > http://karaf.apache.org/manual/latest-2.3.x/developers-guide/creating-bundles.html > [2]https://issues.apache.org/jira/browse/KARAF-1585 > ------------- > Freeman(Yue) Fang > > Red Hat, Inc. > FuseSource is now part of Red Hat > Web: http://fusesource.com | http://www.redhat.com/ > Twitter: freemanfang > Blog: http://freemanfang.blogspot.com > http://blog.sina.com.cn/u/1473905042 > weibo: http://weibo.com/u/1473905042 > > On 2012-11-30, at 下午8:58, Caspar MacRae wrote: > > Hi Andreas/JB, > > Created https://issues.apache.org/jira/browse/KARAF-2043 > > thanks, > Caspar > > > On 30 November 2012 07:08, Jean-Baptiste Onofré <[email protected]> wrote: > >> +1 for that, it makes sense. >> >> Regards >> JB >> >> >> On 11/30/2012 05:18 AM, Andreas Pieber wrote: >> >>> Hey Caspar, >>> >>> thank you very much for pointing this out. I'm with you that adding >>> this into the documentation would be a great enhancement. Since the >>> entire documentation is within the source repository would you mind >>> creating a jira and a patch for this problem? >>> >>> Thank you very much and kind regards, >>> Andreas >>> >>> On Thu, Nov 29, 2012 at 1:26 PM, Caspar MacRae <[email protected]> wrote: >>> >>>> >>>> Ooops, sorry I forgot to escape XML entities (ampersands and quotes) in >>>> previous example, it should have read: >>>> >>>> <bundle>wrap:mvn:jboss/**jbossall-client/${version.** >>>> jboss}/$Bundle-SymbolicName=**jbossall-client&Bundle-** >>>> Version=${version.jboss}&**Export-Package=org.jboss.** >>>> remoting;version="${**version.jboss}",!*</**bundle> >>>> >>>> or >>>> <bundle><![CDATA[ >>>> >>>> wrap:mvn:jboss/jbossall-**client/4.2.3.GA/$Bundle-** >>>> SymbolicName=jbossall-client&**Bundle-Version=4.2.3.GA&** >>>> Export-Package=org.jboss.**remoting;version=<http://4.2.3.GA/$Bundle-SymbolicName=jbossall-client&Bundle-Version=4.2.3.GA&Export-Package=org.jboss.remoting;version=> >>>> "4.2.3.GA",!* >>>> ]]></bundle> >>>> >>>> >>>> cheers, >>>> Caspar >>>> >>>> >>>> >>>> >>>> On 29 November 2012 12:02, Caspar MacRae <[email protected]> wrote: >>>> >>>>> >>>>> >>>>> Hello, >>>>> >>>>> Although this is a trivial issue to raise, the ability to dynamically >>>>> wrap >>>>> urls both on the commandline and in features.xml is incredibly >>>>> valuable (not >>>>> to mention very, very cool) - it's just a pain I do this so >>>>> infrequently I >>>>> have to re-discover it each time. >>>>> >>>>> There are a couple of caveats to using the wrap protocol on the command >>>>> line: >>>>> >>>>> You must use single quotes around the URL, as the dollar will be >>>>> interpreted by the Karaf shell. >>>>> You must use backslash to escape the exclamation mark (for example >>>>> export-package exclude patterns) >>>>> >>>>> >>>>> Neither of these is required when defined in a features file. >>>>> >>>>> The documentation (checked for 2.3.0) for the Wrap URL handler doesn't >>>>> give any usage examples. I think it'd be great to have one example >>>>> (command >>>>> line and equivalent features.xml definition) with a note of the caveats >>>>> above. >>>>> >>>>> I'm still unclear as to why the exclamation mark needs to be escaped, I >>>>> don't think this is POSIX compliant, AFAIK the single quotes should >>>>> prevent >>>>> any interpretation (inconsistent as the dollar certainly doesn't need >>>>> escaping). >>>>> >>>>> (I'd gladly file a jira and/or doc patch if required) >>>>> >>>>> thanks, >>>>> Caspar >>>>> >>>>> >>>>> For example: >>>>> >>>>> Commandline: >>>>> install -s >>>>> 'wrap:mvn:jboss/jbossall-**client/4.2.3.GA/$Bundle-** >>>>> SymbolicName=jbossall-client&**Bundle-Version=4.2.3.GA&** >>>>> Export-Package=org.jboss.**remoting;version=<http://4.2.3.GA/$Bundle-SymbolicName=jbossall-client&Bundle-Version=4.2.3.GA&Export-Package=org.jboss.remoting;version=> >>>>> "4.2.3.GA",\!***' >>>>> >>>>> Features XML: >>>>> >>>>> <bundle>wrap:mvn:jboss/**jbossall-client/${version.** >>>>> jboss}/$Bundle-SymbolicName=**jbossall-client&Bundle-** >>>>> Version=${version.jboss}&**Export-Package=org.jboss.** >>>>> remoting;version="${version.**jboss}",!*</bundle> >>>>> >>>> >>>> >>>> >> -- >> Jean-Baptiste Onofré >> [email protected] >> http://blog.nanthrax.net >> Talend - http://www.talend.com >> > > >
