karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: table printer for Karaf commands
Date Thu, 05 Apr 2012 19:30:43 GMT
I think it would make sense to user the karaf.util project for that. 
Currently we just inline it into projects but we could also make it a 
bundle.
We could move the table functionality and other general tools there.

Christian

Am 05.04.2012 19:32, schrieb Claus Ibsen:
> Well I am talking about an end user library which has utility methods
> so people can use that in their Karaf commands / plugins.
>
> The irony is that Karaf is all about modularity. So would it not be
> possible to offer a neutral Karaf library that people can use on both
> 2.x and 3.0.
>
> I assume the table and other util methods is mostly about string
> manipulation and to make commands output nicely in Karaf. And thus its
> not deeply tied to te Karaf container runtime version. So it ought to
> run on both 2.x and 3.x.
>
>
> On Thu, Apr 5, 2012 at 7:17 PM, Jean-Baptiste Onofré<jb@nanthrax.net>  wrote:
>> Hi Claus,
>>
>>  From a feature perspective, of course it's cool ;)
>>
>> But more we merge new feature on Karaf 2.2.x, more we postpone Karaf 3.0.0,
>> as users won't update to Karaf 3.0.0.
>>
>>  From a technical perspective, I'm fully agree with you, table rendering is
>> interesting (whatever the Karaf version is).
>>  From a "promotional" perspective, I think it's not a good idea.
>>
>> Regards
>> JB
>>
>>
>> On 04/05/2012 07:14 PM, Claus Ibsen wrote:
>>> On Thu, Apr 5, 2012 at 5:27 PM, Jean-Baptiste Onofré<jb@nanthrax.net>
>>>   wrote:
>>>> Hi Reuben,
>>>>
>>>> We have an implementation of the console table available.
>>>>
>>>> You can take a look:
>>>>
>>>> ./shell/console/src/main/java/org/apache/karaf/shell/console/table
>>>>
>>>> but it's only available on trunk for now (so in the next Karaf 3.0.0).
>>>>
>>>> I don't think it's a good idea to merge on Karaf 2.2.x, as we decided to
>>>> focus on 3.0.0.
>>>>
>>> Why is that not a good idea?
>>> People will use Karaf 2.x for a long time, and the commands is a very
>>> cool part of Karaf.
>>> And having a nice layout of the outputs of the command is great.
>>>
>>> And it also encourages end users to contribute custom commands and
>>> whatnot, if its easy to do that with Karaf. Java is not really good at
>>> String manipulation out of the box. So many people have to create
>>> their own libraries and whatnot.
>>>
>>> Maybe provide the table as part of end user plugin API for developing
>>> Karaf commands.
>>> As well with other util methods people may need for writing Karaf
>>> commands.
>>>
>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> On 04/05/2012 05:14 PM, Reuben Garrett wrote:
>>>>>
>>>>> i'm working on patching Camel's Karaf commands to print more nicely
>>>>> (columns aligned regardless of a field's length) [1].  unfortunately,
my
>>>>> first attempt's implementation was a little too heavy, and would benefit
>>>>> from code reuse.
>>>>>
>>>>> i recently observed a JIRA [2] which suggests that Karaf may have
>>>>> builtin
>>>>> support for printing tables to the console.  i'm searching the source
>>>>> for
>>>>> examples, but haven't found anything yet.  does karaf have a builtin
>>>>> table
>>>>> printer, or if not, can you recommend a 3rd-party library for this
>>>>> purpose?  i'm not sure if this is relevant or feasible, but to me this
>>>>> would seem like a nice OSGi service for the container to provide.
>>>>>
>>>>>
>>>>> [1]: https://issues.apache.org/jira/browse/CAMEL-4931
>>>>> [2]: https://issues.apache.org/jira/browse/KARAF-1281
>>>>>
>>>>> ~ Reuben
>>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
>


-- 

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Mime
View raw message