The behavior of adding bundles in both startup.properties and boot features is a side effect of the way the assembly plugin works : it computes profiles, the boot profiles being laid on top of the startup profile, thus including all the bundles / features from the startup stage.
Is that causing a problem ? 2017-05-18 18:35 GMT+02:00 James Carman <[email protected]>: > Renaming subject. By the way, I tried adding disruptor as a compile-scoped > dependency (after looking at the AssemblyMojo code) and it appears to do > the same thing. > > On Thu, May 18, 2017 at 12:24 PM James Carman <[email protected]> > wrote: > > > I'm trying to automatically enable asynchronous logging by default and > the > > config file says: > > > > # uncomment to use asynchronous loggers, which require > > mvn:com.lmax/disruptor/3.3.2 library > > log4j2.rootLogger.type = asyncRoot > > > > > > So, I uncommented it (as you can see), but "disruptor" isn't visible at > > boot time, because it's not in the startup.properties. So, I figured I'd > > try to add it: > > > > <startupBundles> > > <startupBundle>mvn:com.lmax/disruptor/3.3.2</startupBundle> > > </startupBundles> > > > > Now, I get a funky features.cfg file: > > > > # > > # Comma separated list of features repositories to register by default > > # > > featuresRepositories = > > file:${karaf.home}/etc/8dbd154a-fce6-435a-a7cd-67dc546b2ddf.xml > > > > # > > # Comma separated list of features to install at startup > > # > > featuresBoot = 9088a7fb-b327-44eb-ba3f-24382526981b > > > > With a new feature repository file in etc: > > > > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > > <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" > > name="8dbd154a-fce6-435a-a7cd-67dc546b2ddf"> > > > > <repository>mvn:org.apache.karaf.features/framework/4.1. > 1/xml/features</repository> > > > > <repository>mvn:org.apache.karaf.features/spring/4.1.1/ > xml/features</repository> > > > > <repository>mvn:org.apache.karaf.features/standard/4.1.1/ > xml/features</repository> > > > > <repository>mvn:org.apache.karaf.features/enterprise/4.1. > 1/xml/features</repository> > > > > <repository>mvn:org.apache.cxf.karaf/apache-cxf/3.1.11/ > xml/features</repository> > > > > <repository>mvn:org.apache.camel.karaf/apache-camel/2.19. > 0/xml/features</repository> > > > > <repository>mvn:org.apache.activemq/activemq-karaf/5.14. > 5/xml/features</repository> > > > > <repository>mvn:com.savoirtech.aetos/features/4.1. > 1.0-SNAPSHOT/xml/features</repository> > > <feature name="9088a7fb-b327-44eb-ba3f-24382526981b" > version="0.0.0"> > > <feature prerequisite="false" > > dependency="false">framework</feature> > > <feature prerequisite="false" > > dependency="false">aries-blueprint</feature> > > <feature prerequisite="false" dependency="false">bundle</ > feature> > > <feature prerequisite="false" dependency="false">config</ > feature> > > <feature prerequisite="false" dependency="false">deployer</ > feature> > > <feature prerequisite="false" > > dependency="false">diagnostic</feature> > > <feature prerequisite="false" dependency="false">feature</ > feature> > > <feature prerequisite="false" dependency="false">instance</ > feature> > > <feature prerequisite="false" dependency="false">jaas</feature> > > <feature prerequisite="false" dependency="false">kar</feature> > > <feature prerequisite="false" dependency="false">log</feature> > > <feature prerequisite="false" > > dependency="false">management</feature> > > <feature prerequisite="false" dependency="false">package</ > feature> > > <feature prerequisite="false" dependency="false">service</ > feature> > > <feature prerequisite="false" dependency="false">shell</feature> > > <feature prerequisite="false" > > dependency="false">shell-compat</feature> > > <feature prerequisite="false" dependency="false">ssh</feature> > > <feature prerequisite="false" dependency="false">system</ > feature> > > <feature prerequisite="false" dependency="false">wrap</feature> > > <feature prerequisite="false" > > dependency="false">aetos-core</feature> > > <bundle>mvn:com.lmax/disruptor/3.3.2</bundle> > > </feature> > > </features> > > > > Notice it added "disruptor" to the bottom of that feature. However, I > > didn't want it in a boot feature. I wanted it in the startup.properties, > > so let's take a look there: > > > > # Bundles to be started on startup, with startlevel > > mvn\:org.apache.karaf.features/org.apache.karaf.features.extension/4.1.1 > = > > 1 > > mvn\:org.ops4j.pax.url/pax-url-aether/2.5.2 = 5 > > mvn\:org.ops4j.pax.logging/pax-logging-api/1.9.1 = 8 > > mvn\:org.ops4j.pax.logging/pax-logging-log4j2/1.9.1 = 8 > > mvn\:org.apache.felix/org.apache.felix.configadmin/1.8.14 = 10 > > mvn\:org.apache.felix/org.apache.felix.fileinstall/3.5.8 = 11 > > mvn\:org.apache.karaf.features/org.apache.karaf.features.core/4.1.1 = 15 > > mvn\:com.lmax/disruptor/3.3.2 = 50 > > > > It added it! So, why is it adding it in both places? Everything seems > to > > start up just fine in this case, but I really don't like this crazy > > auto-generated features file. Is there a way to avoid it and just add > that > > bundle to startup.properties? > > > > Thanks, > > > > James > > > -- ------------------------ Guillaume Nodet
