Hi Martin,
You can use the property edits feature.
You have to create a file in src/main/karaf/assembly-property-edits.xml
of your assembly module and build your assembly.
Here an example :
http://karaf.apache.org/tools/property-edits/1.0.0;>
config.properties
put
karaf.framework
equinox
config.properties
extend
org.osgi.framework.system.capabilities
my-magic-capability
config.properties
extend
some-other-list
my-value-goes-first
regards,
François
Le 11/07/2018 à 13:15, Martin Nielsen a écrit :
> Hello everyone
>
> I am trying to override the service requrements enforcement for my
> custom distribution. I am using
> the karaf-assembly in my POM to create the
> assembly.
>
> Inside the org.apache.karaf.features.cfg i want to set the
> serviceRequirements config to disable.
> The config file contains these lines:
>
> #
> # Service requirements enforcement
> #
> # By default, the feature resolver checks the service
> requirements/capabilities of
> # bundles for new features (xml schema >= 1.3.0) in order to
> automatically installs
> # the required bundles.
> # The following flag can have those values:
> # - disable: service requirements are completely ignored
> # - default: service requirements are ignored for old features
> # - enforce: service requirements are always verified
> #
> #serviceRequirements=default
>
> How do i tell the karaf-assembly to change this line in a smooth
> manner? I can't just override the entire file, as the file is
> generated based on the feature dependencies in my POM. The file
> contains the featuresRepositories and featuresBoot options as well,
> and since those are managed by the plugin, overriding the entire file
> would lead to problems down the road when i start changing
> versions/scopes in my POM file.
>
> Is there a clever way to tell the karaf-assembly to change that
> specific line and leave the rest of the file intact?
>
> -Martin