Re: Gogo vs. Karaf Commands

2013-01-09 Thread Göktürk Gezer
Hi,

I did a quick look at the code. It seems karaf is wrapping gogo annotations
into its own ones and making them run as if they are karaf commands.
However the commands with only published service
properties(osgi.command.scope,osgi.command.function) are tracked for
execution into CommandProcessor, but left out in CommandListHelpProvider.
With a quick fix I've been able to make them appear on command list,
without description though!

To display usage for commands, more need to be done of course. The first
way that could come to my mind is: We could add description and argument
informations into CommandProxy(wrapper around plain osgi commands) by
analyzing command's object against @Description annotations, then use this
information in SingleCommandHelpProvider.

I would like to have some advice from karaf devs before working on a patch,
since I also need to make some of my command implementations to be appear
on help.


Best,
Gokturk

On Tue, Jan 8, 2013 at 9:26 AM, Guillaume Nodet  wrote:

> That's because completion and the help system is specific to karaf
> commands, as they are when you use the gogo commands (for help at least).
> This is kinda historical as the karaf commands did exist before gogo
> commands annotations.  I suppose the karaf help system could be able
> recognize plain gogo commands and display help correctly though.  You could
> raise a JIRA issue for that, I think it's doable, though I don't think we
> provide the annotations in the basic karaf distribution.
>
>
> On Tue, Jan 8, 2013 at 1:46 AM, Gareth  wrote:
>
>> Hello,
>>
>> I am curious - What is the difference between a Gogo command and a Karaf
>> command?
>>
>> I ask because I wrote for myself a couple of gogo commands. If I run
>> vanilla
>> OSGi (e.g. equinox) with gogo they run fine. The commands also show up if
>> I
>> run gogo "help".
>>
>> If I run these same gogo commands in karaf, they also appear to work.
>> However, the commands don't show up in Karaf help and I cannot take
>> advantage of other advanced karaf console features like autocomplete with
>> these commands.
>>
>> Any reason why this would not work? Is there perhaps just an additional
>> service property I can add which will allow me to take advantage of the
>> additional Karaf console support? Having looked at a few Karaf console
>> command examples, I see they all extend the Karaf class
>> OsgiCommandSupport,
>> which I prefer not to do as I would like to avoid having to explicitly
>> depend on Karaf classes.
>>
>> thanks in advance,
>> Gareth
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Gogo-vs-Karaf-Commands-tp4027219.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> 
> Guillaume Nodet
> 
> Blog: http://gnodet.blogspot.com/
> 
> FuseSource, Integration everywhere
> http://fusesource.com
>


Re: All Pax Exam Integration Tests do not work anymore

2013-01-09 Thread Christoph Gritschenberger

I think this happens mostly on clean local .m2-repos.

Here's a link to the original issue (which contains a patch)

kind regards,
christoph

On 2013-01-08 11:38, Michael Szalay wrote:

Yes, adding this


 
 
 org.ops4j.pax.exam
 pax-exam
 2.6.0
 
 
 

..and now everything works again.

Magic moments...

Thanks

- Ursprüngliche Mail -
Von: "Peter Gardfjäll" 
An: user@karaf.apache.org
CC: "Jean-Baptiste Onofré" 
Gesendet: Dienstag, 8. Januar 2013 11:12:05
Betreff: Re: All Pax Exam Integration Tests do not work anymore

I think this is caused by
https://issues.apache.org/jira/browse/KARAF-2096

Have a look at
http://karaf.922171.n3.nabble.com/My-Karaf-PaxExam-test-mysteriously-fails-after-new-year-td4027175.html

best regards, Peter


On 01/08/2013 11:08 AM, Jean-Baptiste Onofré wrote:

Hi Michael,

I gonna to take a look but it may be a change on the OPS4J repo.

Thanks for the report.

Regards
JB

On 01/08/2013 10:40 AM, Michael Szalay wrote:

Hi all

since a few days, all our pax exam karaf integration tests do not work
anymore.

The error message is:

java.lang.Exception: Could not start bundle
mvn:org.ops4j.pax.swissbox/pax-swissbox-core/ in feature(s)
exam-2.4.0: Unresolved constraint in bundle
org.ops4j.pax.swissbox.core [79]: Unable to resolve 79.0: missing
requirement [79.0] package; (&(package=org.ops4j.lang)(version>=1.4.0))
  at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:356)[21:org.apache.karaf.features.core:2.2.9]

  at
org.apache.karaf.features.internal.FeaturesServiceImpl$1.run(FeaturesServiceImpl.java:988)[21:org.apache.karaf.features.core:2.2.9]

Caused by: org.osgi.framework.BundleException: Unresolved constraint
in bundle org.ops4j.pax.swissbox.core [79]: Unable to resolve 79.0:
missing requirement [79.0] package;
(&(package=org.ops4j.lang)(version>=1.4.0))
  at
org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564)[org.apache.felix.framework-3.2.2.jar:]

  at
org.apache.felix.framework.Felix.startBundle(Felix.java:1797)[org.apache.felix.framework-3.2.2.jar:]

  at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)[org.apache.felix.framework-3.2.2.jar:]

  at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:914)[org.apache.felix.framework-3.2.2.jar:]

  at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)[21:org.apache.karaf.features.core:2.2.9]



We use the following versions pax and karaf exam:

  
  
  org.apache.karaf.tooling.exam

org.apache.karaf.tooling.exam.container
  2.3.0
  
  
  org.ops4j.pax.exam
  pax-exam-junit4
  2.6.0
  

any hints what has changed here?

Regards Michael










smime.p7s
Description: S/MIME Cryptographic Signature