I have done some more testing and realized the install attribute allowable values are "auto" and "manual".
The following behavior does not meet my expectations - Behavior of install-mixed-1.0.0.xml does not match documentation in section "4.10.13 - Provisioning Deployer", https://karaf.apache.org/manual/latest/#_deployer. Specifically the documentation states the only features with install="auto" will be installed. In the case of install-mixed-1.0.0, the auto feature was not installed. - None of the features in install-manual-1.0.0.xml appear in feature:list - The configuration element for all features with install="auto" or no install attribute created entries even though the feature is listed as uninstalled. This replay is to primarily to document the results of my testing, which was prompted by my attempt to build a features.xml to install the server or client implementation. *** * tail:log output *** 10:50:13.609 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy] Installing bundle install-manual / 1.0.0 10:50:13.615 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy] Installing bundle install-none / 1.0.0 10:50:13.619 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy] Installing bundle install-auto / 1.0.0 10:50:13.624 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy] Installing bundle install-mixed / 1.0.0 10:50:13.651 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy] Started bundle: feature:file:/Users/paul/Documents/apache-karaf-4.4.6/deploy/install-mixed-1.0.0.xml 10:50:13.657 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy] Started bundle: feature:file:/Users/paul/Documents/apache-karaf-4.4.6/deploy/install-none-1.0.0.xml 10:50:13.660 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/deploy] Started bundle: feature:file:/Users/paul/Documents/apache-karaf-4.4.6/deploy/install-auto-1.0.0.xml 10:50:13.692 INFO [activator-1-thread-1] Registering commands for bundle org.apache.karaf.shell.ssh/4.4.6 10:50:13.704 INFO [activator-1-thread-1] No detected/configured IoServiceFactoryFactory; using Nio2ServiceFactoryFactory 10:50:13.835 INFO [features-3-thread-1] No deployment change. 10:50:13.843 INFO [features-3-thread-1] Done. 10:50:13.947 INFO [features-3-thread-1] No deployment change. 10:50:13.953 INFO [features-3-thread-1] Done. 10:50:14.058 INFO [features-3-thread-1] No deployment change. 10:50:14.064 INFO [features-3-thread-1] Done. 10:50:22.650 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/etc] Updating configuration {case~install-none} from /Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-none.cfg 10:50:22.652 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/etc] Updating configuration {case~install-mixed} from /Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-mixed.cfg 10:50:22.654 INFO [fileinstall-/Users/paul/Documents/apache-karaf-4.4.6/etc] Updating configuration {case~install-auto} from /Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-auto.cfg 10:51:21.253 INFO [CM Configuration Updater (Update: pid=org.ops4j.pax.logging)] Sending Event Admin notification (configuration successful) to org/ops4j/pax/logging/Configuration ^C~ karaf@root()> feature:list | grep case | sort case-install-auto-bar │ 1.0.0 │ x │ Started │ install-auto-1.0.0 │ case-install-auto-foo │ 1.0.0 │ x │ Started │ install-auto-1.0.0 │ case-install-mixed-auto │ 1.0.0 │ │ Uninstalled │ install-mixed-1.0.0 │ case-install-mixed-manual │ 1.0.0 │ │ Uninstalled │ install-mixed-1.0.0 │ case-install-mixed-none │ 1.0.0 │ │ Uninstalled │ install-mixed-1.0.0 │ case-install-none-bar │ 1.0.0 │ │ Uninstalled │ install-none-1.0.0 │ case-install-none-foo │ 1.0.0 │ │ Uninstalled │ install-none-1.0.0 │ karaf@root()> list START LEVEL 100 , List Threshold: 50 ID │ State │ Lvl │ Version │ Name ───┼────────┼─────┼─────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 33 │ Active │ 80 │ 4.4.6 │ Apache Karaf :: OSGi Services :: Event 53 │ Active │ 80 │ 1.0.0 │ install-manual 54 │ Active │ 80 │ 1.0.0 │ install-none 55 │ Active │ 80 │ 1.0.0 │ install-auto 56 │ Active │ 80 │ 1.0.0 │ install-mixed karaf@root()> *** * install-auto-1.0.0.xml *** <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="install-auto-1.0.0"> <feature name="case-install-auto-foo" version="1.0.0" install="auto"> <config name="case-install-auto" append="true"> fooAutoInstalled = 1.0.0 </config> </feature> <feature name="case-install-auto-bar" version="1.0.0" install="auto"> <config name="case-install-auto" append="true"> barAutoInstalled = 1.0.0 </config> </feature> </features> *** * install-manual-1.0.0.xml *** <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="install-manual-1.0.0"> <feature name="case-install-manual-foo" version="1.0.0" install="manual"> <config name="case-install-manual" append="true"> fooManualInstalled = 1.0.0 </config> </feature> <feature name="case-install-manual-bar" version="1.0.0" install="manual"> <config name="case-install-manual" append="true"> barManualInstalled = 1.0.0 </config> </feature> </features> *** * install-mixed-1.0.0.xml *** <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="install-mixed-1.0.0"> <feature name="case-install-mixed-auto" version="1.0.0" install="auto"> <config name="case-install-mixed" append="true"> fooAutoInstalled = 1.0.0 </config> </feature> <feature name="case-install-mixed-manual" version="1.0.0" install="manual"> <config name="case-install-mixed" append="true"> barManualInstalled = 1.0.0 </config> </feature> <feature name="case-install-mixed-none" version="1.0.0"> <config name="case-install-mixed" append="true"> foobarNoneInstalled = 1.0.0 </config> </feature> </features> *** * install-none-1.0.0.xml *** <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="install-none-1.0.0"> <feature name="case-install-none-foo" version="1.0.0"> <config name="case-install-none" append="true"> fooNoneInstalled = 1.0.0 </config> </feature> <feature name="case-install-none-bar" version="1.0.0"> <config name="case-install-none" append="true"> barNoneInstalled = 1.0.0 </config> </feature> </features> *** * case-install-auto.cfg *** barAutoInstalled = 1.0.0 org.apache.karaf.features.configKey = case-install-auto felix.fileinstall.filename = file:/Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-auto.cfg fooAutoInstalled = 1.0.0 *** * case-install-mixed.cfg *** fooAutoInstalled = 1.0.0 org.apache.karaf.features.configKey = case-install-mixed felix.fileinstall.filename = file:/Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-mixed.cfg foobarNoneInstalled = 1.0.0 *** * case-install-none.cfg *** barNoneInstalled = 1.0.0 org.apache.karaf.features.configKey = case-install-none felix.fileinstall.filename = file:/Users/paul/Documents/apache-karaf-4.4.6/etc/case-install-none.cfg fooNoneInstalled = 1.0.0 > On Jul 11, 2024, at 2:31 PM, Paul Spencer <[email protected]> wrote: > > Karaf 4.4.3 and Karaf 4.4.6 > > Placing a feature.xml file in the deploy directory will not add features to > Karaf if all features contain the attribute 'install', i.e. <feature > name="..." install="...">. As long as one feature does not contain the > attribute "install", all features in the the file will be listed in > "feature:list" > > karaf@root()> feature:list | grep case > > > > case-install-true-foo │ 1.0.0 │ x │ Started > │ install-true-1.0.0 │ > case-install-true-bar │ 1.0.0 │ │ Uninstalled > │ install-true-1.0.0 │ > karaf@root()> > > > > > *** > * deploy/install-false-1.0.0.xml > *** > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" > name="install-false-1.0.0"> > <feature name="case-install-false-foo" install="false" version="1.0.0"> > <bundle > start="false">mvn:org.apache.commons/commons-lang3/3.14.0</bundle> > </feature> > <feature name="case-install-false-bar" install="false" version="1.0.0"> > <bundle > start="false">mvn:commons-beanutils/commons-beanutils/1.9.4</bundle> > </feature> > </features> > > *** > * deploy/install-true-1.0.0.xml > *** > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" > name="install-true-1.0.0"> > <feature name="case-install-true-foo" version="1.0.0"> > <bundle > start="false">mvn:org.apache.commons/commons-lang3/3.14.0</bundle> > </feature> > <feature name="case-install-true-bar" install="false" version="1.0.0"> > <bundle > start="false">mvn:commons-beanutils/commons-beanutils/1.9.4</bundle> > </feature> > </features> > > > Is this a bug? > > Paul Spencer
