How to reference PID properties in Karaf commands in fabric profiles ?

Solution Verified - Updated -

Issue

  • In the Karaf console we can reference system properties from the etc/system.properties file with ${property}, e.g. ${karaf.name}
    If we create a new file under etc the properties in there are put into a new PID. How do we reference these properties?

Example:
- In etc/com.redhat.server.cfg is defined the property featureRepository. This shows up in Karaf like this:

JBossFuse:karaf@root> config:list "(service.pid=com.redhat*)"
----------------------------------------------------------------
Pid:            com.redhat.server
BundleLocation: null
Properties:
   featureRepository = file:/path/dir/features.xml
   felix.fileinstall.filename = file:/path/dir/jboss-fuse-6.2.1.redhat-084/etc/com.redhat.server.cfg
   service.pid = com.redhat.server
  • Now we would like to run a command where we use variable substitution with the featureRepository property:
JBossFuse:karaf@root> fabric:profile-edit --repository ${com.redhat.server/featureRepository} --feature stringutil myprofile
Error executing command: bad name: ${com.redhat.server/featureRepository}
  • Why are we getting the error ?

Environment

  • Red Hat JBoss Fuse
    • 6.x
  • Fuse Fabric

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.