How to add a version number when creating a bundle via installing a spring configuration file?

Solution Verified - Updated -

Environment

  • Fuse ESB Enterprise 7.x
  • Fuse ESB 4.x

Issue

I'm using the following command to deploy a broker in Fuse ESB

install spring:file:etc/activemq-broker.xml

This works fine but it shows no version number

[ 228] [Active     ] [            ] [Started] [   60] activemq-broker.xml (0.0.0)

Is there is a way to add the version number so I can easily see what version of the broker I have deployed?

Resolution

When deploying a Spring configuration file using the spring: url handler you can specify the version number in the file name as follows:

Filename:

activemq-5.7.0.fuse.047.xml

Install:

osgi:install spring:file:etc/activemq-5.7.0.fuse.047.xml

Result:

[ 255] [Installed  ] [            ] [       ] [   60] activemq (5.7.0.fuse047)

However if you have multiple hyphens as follows, only the portion of the version following the last hyphen is set as the version number:

Filename

activemq-5.7.0-fuse-047.xml

Install:

osgi:install spring:file:etc/activemq-5.7.0-fuse-047.xml

Result:

[ 256] [Installed  ] [            ] [       ] [   60] activemq-5.7.0-fuse (047)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments