Return-Path: X-Original-To: apmail-karaf-user-archive@minotaur.apache.org Delivered-To: apmail-karaf-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2C69CD71F for ; Mon, 22 Oct 2012 19:23:32 +0000 (UTC) Received: (qmail 11550 invoked by uid 500); 22 Oct 2012 19:23:31 -0000 Delivered-To: apmail-karaf-user-archive@karaf.apache.org Received: (qmail 11503 invoked by uid 500); 22 Oct 2012 19:23:31 -0000 Mailing-List: contact user-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@karaf.apache.org Delivered-To: mailing list user@karaf.apache.org Received: (qmail 11450 invoked by uid 99); 22 Oct 2012 19:23:31 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2012 19:23:31 +0000 Received: from localhost (HELO mail-la0-f48.google.com) (127.0.0.1) (smtp-auth username ddumont, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2012 19:23:31 +0000 Received: by mail-la0-f48.google.com with SMTP id u2so2446613lag.21 for ; Mon, 22 Oct 2012 12:23:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.30.230 with SMTP id v6mr4175872lbh.18.1350933809162; Mon, 22 Oct 2012 12:23:29 -0700 (PDT) Received: by 10.112.92.161 with HTTP; Mon, 22 Oct 2012 12:23:29 -0700 (PDT) In-Reply-To: References: <1350912738771-4026525.post@n3.nabble.com> <508551CA.50505@nanthrax.net> Date: Mon, 22 Oct 2012 15:23:29 -0400 Message-ID: Subject: Re: osgi CommandProvider From: Dan Dumont To: Dan Dumont Cc: user@karaf.apache.org Content-Type: multipart/alternative; boundary=f46d04016d4bcf6c6a04ccaac9a4 --f46d04016d4bcf6c6a04ccaac9a4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I added org.eclipse.osgi.framework.console to jre.properties... and now I see it exported... but the commands still aren't being recognized. On Mon, Oct 22, 2012 at 11:54 AM, Dan Dumont wrote: > Thanks. It is not listed by packages:exports > > However, the classes are included in the osgix.x.x.jar file provided by > exquinox. > What should I add to the files you mentioned in order to force the export= ? > > > On Mon, Oct 22, 2012 at 10:01 AM, Jean-Baptiste Onofr=C3=A9 wrote: > >> Hi, >> >> take a look in package:exports. >> >> If the package is not exported, and Equinox provide it, you have to >> update the jre.properties and system.properties to "expose" it. >> >> Regards >> JB >> >> On 10/22/2012 03:56 PM, Dan Dumont wrote: >> >>> No, I think you misunderstood me. >>> I already have a bundle that implements >>> org.eclipse.osgi.framework.**console.CommandProvider >>> In eclipse, I'm able to access the equinox console and issue commands, >>> this already works. >>> >>> I'm trying the bundle out in karaf running with equinox and the command >>> does not seem to be bridged into karaf's console. Is there a way to >>> access the equinox console impl? >>> >>> On Mon, Oct 22, 2012 at 9:32 AM, dealbitte >> > wrote: >>> >>> Hi, >>> >>> did you try this. >>> http://karaf.apache.org/**manual/latest-2.3.x/** >>> developers-guide/archetypes.**html >>> >>> this worked for me without any problem. >>> >>> I have a command called 'createmsg' that I can execute from the >>> console. The >>> following class is an example implementation >>> >>> ******* >>> @Command(scope =3D "osgi", name =3D "createmsg", description =3D "p= rint a >>> message") >>> public class createmsg extends OsgiCommandSupport { >>> >>> protected Object doExecute() throws Exception { >>> System.out.println("Executing command createmsg"); >>> return null; >>> } >>> >>> ******* >>> regards >>> >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://karaf.922171.n3.nabble.**com/osgi-CommandProvider-** >>> tp4026523p4026525.html >>> Sent from the Karaf - User mailing list archive at Nabble.com. >>> >>> >>> >> -- >> Jean-Baptiste Onofr=C3=A9 >> jbonofre@apache.org >> http://blog.nanthrax.net >> Talend - http://www.talend.com >> > > --f46d04016d4bcf6c6a04ccaac9a4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I added=C2=A0org.eclipse.osgi.framework.console to jre.properties... =C2=A0= and now I see it exported... but the commands still aren't being recogn= ized.

On Mon, Oct 22, 2012 at 11:54 AM, D= an Dumont <ddumont@apache.org> wrote:
Thanks. =C2=A0 It is not listed by packages:= exports

However, the classes are included in the osgix.x= .x.jar file provided by exquinox.
What should I add to the files you mentioned in order to force the exp= ort?


On Mon, Oct 22, 2012 at 10:01 AM, Jean-Bapti= ste Onofr=C3=A9 <jb@nanthrax.net> wrote:
Hi,

take a look in package:exports.

If the package is not exported, and Equinox provide it, you have to update = the jre.properties and system.properties to "expose" it.

Regards
JB

On 10/22/2012 03:56 PM, Dan Dumont wrote:
No, I think you misunderstood me.
I already have a bundle that implements
org.eclipse.osgi.framework.console.CommandProvider
In eclipse, I'm able to access the equinox console and issue commands,<= br> this already works.

I'm trying the bundle out in karaf running with equinox and the command=
does not seem to be bridged into karaf's console. =C2=A0Is there a way = to
access the equinox console impl?

On Mon, Oct 22, 2012 at 9:32 AM, dealbitte <anand.bochum@gmail.com
<mailto:anan= d.bochum@gmail.com>> wrote:

=C2=A0 =C2=A0 Hi,

=C2=A0 =C2=A0 did you try this.
=C2=A0 =C2=A0 http://karaf.apache.org/manual/latest-2.3.x/developers-guide/archetypes.html
=C2=A0 =C2=A0 this worked for me without any problem.

=C2=A0 =C2=A0 I have a command called 'createmsg' that I can execut= e from the
=C2=A0 =C2=A0 console. The
=C2=A0 =C2=A0 following class is an example implementation

=C2=A0 =C2=A0 *******
=C2=A0 =C2=A0 @Command(scope =3D "osgi", name =3D "createmsg= ", description =3D "print a
=C2=A0 =C2=A0 message")
=C2=A0 =C2=A0 public class createmsg extends OsgiCommandSupport {

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0protected Object doExecute() throws Excep= tion {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 System.out.println("E= xecuting command createmsg");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return null;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}

=C2=A0 =C2=A0 *******
=C2=A0 =C2=A0 regards





=C2=A0 =C2=A0 --
=C2=A0 =C2=A0 View this message in context:
=C2=A0 =C2=A0 http://karaf.922171.n3.nabbl= e.com/osgi-CommandProvider-tp4026523p4026525.html
=C2=A0 =C2=A0 Sent from the Karaf - User mailing list archive at Nabble.com= .



--
Jean-Baptiste Onofr=C3=A9
jbonofre@apache.or= g
http://blog.nanthrax= .net
Talend - http://www.tal= end.com


--f46d04016d4bcf6c6a04ccaac9a4--