A.3. Editing Other Resources
Creating and editing an arbitrary resource
JBossFuse:karaf@root> profile-edit --resource Resource Profile [Version]
Resourceis the name of the profile resource you want to edit. If
Resourcedoes not already exist, it will be created.
mq-baseprofile has the
broker.xmlresource, which stores the contents of an Apache ActiveMQ broker configuration file. To edit the
broker.xmlresource, enter the following console command:
JBossFuse:karaf@root> profile-edit --resource broker.xml mq-base 1.0
Profile:mq-base 1.0 L:1 C:1 <!-- Copyright (C) FuseSource, Inc. http://fusesource.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> <!-- Allows us to use system properties and fabric as variables in this configuration file --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="properties"> <bean class="io.fabric8.mq.fabric.ConfigurationProperties"/> </property> ^X Quit ^S Save ^Z Undo ^R Redo ^G Go To ^F Find ^N Next ^P Previous
^Xto quit the text editor and get back to the console prompt.
Referencing a profile resource
profile:ResourceNameA key characteristic of the profile URL is that the location of a resource can change dynamically at run time, as follows:
- The profile URL handler first tries to find the named resource,
ResourceName, in the current version of the current profile (where the current version is a property of the container in which the profile is running).
- If the specified resource is not found under the current profile, the profile URL tries to find the resource in the current version of the parent profile.