karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KARAF-1641) Avoid embedding jline in the console
Date Fri, 13 Jul 2012 13:33:35 GMT

     [ https://issues.apache.org/jira/browse/KARAF-1641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Christian Schneider updated KARAF-1641:
---------------------------------------

    Description: 
We currently embed jline, jansi and gogo into the console.

This has some disadvantages:
- For jline and jansi we have to care about all the native libs in our build of console
- By embedding we are breaking the encapsulation of the bundles we embed. So there is the
risk we are using internal stuff that is likely to change
- There are some problems with Eclipse and m2eclipse in the ide. So when the console project
is open all projects that depend on it fail

So I have digged into this recently.

We were using our own interceptor to start gogo to install the Ansiconsole and to implement
system property replacement. The Ansiconsole installation seems to be not necessary since
we intorduced the rewrapping of streams. So I was able to remove this. Instead of the system
property replacement I simply now copy the system properties as session variables at start
of a shell.

So after these changes I was able to remove the embedding of jline and jansi.

When using jline as a bundle I found two issues with it:
- The Manifest of jline 2.7 is wrong it imports an internal package from jansi that is not
exported. Additionally jansi is embedded in jline so this was not necessary
- Jline 2.7 embeds jansi 1.8 while we use 1.9 in karaf
Fortunately Guillaume fixed these issues so 2.8-SNAPSHOT works nicely as a bundle.

One thing about gogo remains. We use some classes from gogo.runtime which are not exported.
So we still need to embed gogo.



  was:
We currently embed jline, jansi and gogo into the console.

This has some disadvantages:
- For jline and jansi we have to care about all the native libs in our build of console
- By embedding we are breaking the encapsulation of the bundles we embed. So there is the
risk we are using internal stuff that is likely to change
- There are some problems with Eclipse and m2eclipse in the ide. So when the console project
is open all projects that depend on it fail

So I have digged into this recently.

We were using our own interceptor to start gogo to install the Ansiconsole and to implement
system property replacement. The Ansiconsole installation seems to be not necessary since
we intorduced the rewrapping of streams. So I was able to remove this. Instead of the system
property replacement I simply now copy the system properties as session variables at start
of a shell.

So after these changes I was able to remove the embedding.

When using jline as a bundle I found two issues with it:
- The Manifest of jline 2.7 is wrong it imports an internal package from jansi that is not
exported. Additionally jansi is embedded in jline so this was not necessary
- Jline 2.7 embeds jansi 1.8 while we use 1.9 in karaf
Fortunately Guillaume fixed these issues so 2.8-SNAPSHOT works nicely as a bundle.

One thing about gogo remains. We use some classes from gogo.runtime which are not exported.
So we still need to embed this package. This works nicely though so it is ok for now. Still
it would be better if either the runtime packages were exported or we found a way to avoid
using these internal packages.


       Assignee: Christian Schneider
        Summary: Avoid embedding jline in the console  (was: Avoid embedding jline and gogo
in the console)
    
> Avoid embedding jline in the console
> ------------------------------------
>
>                 Key: KARAF-1641
>                 URL: https://issues.apache.org/jira/browse/KARAF-1641
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-shell
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 3.0.0
>
>
> We currently embed jline, jansi and gogo into the console.
> This has some disadvantages:
> - For jline and jansi we have to care about all the native libs in our build of console
> - By embedding we are breaking the encapsulation of the bundles we embed. So there is
the risk we are using internal stuff that is likely to change
> - There are some problems with Eclipse and m2eclipse in the ide. So when the console
project is open all projects that depend on it fail
> So I have digged into this recently.
> We were using our own interceptor to start gogo to install the Ansiconsole and to implement
system property replacement. The Ansiconsole installation seems to be not necessary since
we intorduced the rewrapping of streams. So I was able to remove this. Instead of the system
property replacement I simply now copy the system properties as session variables at start
of a shell.
> So after these changes I was able to remove the embedding of jline and jansi.
> When using jline as a bundle I found two issues with it:
> - The Manifest of jline 2.7 is wrong it imports an internal package from jansi that is
not exported. Additionally jansi is embedded in jline so this was not necessary
> - Jline 2.7 embeds jansi 1.8 while we use 1.9 in karaf
> Fortunately Guillaume fixed these issues so 2.8-SNAPSHOT works nicely as a bundle.
> One thing about gogo remains. We use some classes from gogo.runtime which are not exported.
So we still need to embed gogo.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message