How to reference PID properties in Karaf commands in fabric profiles ?
Issue
- In the Karaf console we can reference system properties from the
etc/system.propertiesfile 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
featureRepositoryproperty:
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, tools, and much more.