[ 
https://issues.apache.org/jira/browse/KARAF-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018218#comment-13018218
 ] 

Jean-Baptiste Onofré commented on KARAF-554:
--------------------------------------------

I was more thinking about adding karaf.version in Main 
(main/src/main/java/org/apache/karaf/main/Main).

I propose the use the following code snippet:

Package p = Package.getPackage("org.apache.karaf");
if (p != null) {
  System.getProperties().put("karaf.version", p.getImplementationVersion());
}

As you said, the shell:info will only display the karaf.version property.

> Add karaf version in system properties and display in shell:info command 
> output
> -------------------------------------------------------------------------------
>
>                 Key: KARAF-554
>                 URL: https://issues.apache.org/jira/browse/KARAF-554
>             Project: Karaf
>          Issue Type: Improvement
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 2.2.1, 3.0.0
>
>
> shell:info command doesn't display the current running version of Karaf.
> It could be helpful in some user scripts to define an action depending of the 
> Karaf instance (as we have uname -a under Unix :)).
> To be used programmatically, Karaf version should also be stored in system 
> properties (as we have karaf.home, karaf.base, karaf.data and karaf.instances 
> properties).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to