Hello Steinar.
I suggest checking out the featuresProcessing capability
in karaf-maven-plugin. Not sure if it can achieve your objective...
For example I have this in karaf-maven-plugin:
...
<featuresProcessing>${project.basedir}/features-processing.xml</featuresProcessing>
...
and use the following features-processing.xml to replace a bundle
<?xml version="1.0" encoding="UTF-8"?>
> <featuresProcessing xmlns="
> http://karaf.apache.org/xmlns/features-processing/v1.0.0" xmlns:f="
> http://karaf.apache.org/xmlns/features/v1.6.0">
>
> <bundleReplacements>
> <bundle
> originalUri="mvn:org.apache.felix/org.apache.felix.fileinstall/3.6.6"
> replacement="mvn:org.apache.felix/org.apache.felix.fileinstall/3.6.4"
> mode="maven" />
> </bundleReplacements>
>
> </featuresProcessing>
>
Check the following xsd for more options:
https://github.com/apache/karaf/blob/main/features/core/src/main/resources/org/apache/karaf/features/karaf-features-processing-1.0.0.xsd
Regards,
João Assunção
Email: [email protected]
Web: www.exploitsys.com
On Tue, Jun 25, 2024 at 8:10 PM Steinar Bang <[email protected]> wrote:
> >>>>> Steinar Bang <[email protected]>:
>
> >> One other workaround could have been running everything at run-level 80
> >> and have a component depending on the SPI services of liquibase. The
> >> problem with that, however, is that the services have cardinality
> >> multiple, so there is no way for a component to know when they are
> >> finished starting.
>
> >> I'm still thinking, but I take all ideas, and suggestions.
>
> > Another workaround turned out to be to downgrade liquibase's SPI Fly to
> 1.3.6.
>
> > Then shiro-core pulls in SPI Fly 1.3.7 on run-level 80 and liquibase
> > start the SPI Fly 1.3.6 bundle on run-level 40.
>
> > Then I get this:
> > karaf@root()> bundle:list -t 35 | grep -i spi
> > 88 │ Active │ 40 │ 1.3.6 │ Apache Aries SPI Fly
> Dynamic Weaving Bundle
> > 196 │ Active │ 80 │ 1.3.7 │ Apache Aries SPI Fly
> Dynamic Weaving Bundle
> > karaf@root()>
>
> > But other than that things seems to be working perfectly.
>
> > I have removed <Require-Capability> from my liquibase-using bundles,
> > because the liquibase-core bundle itself has <Require-Capability>
> >
> https://github.com/liquibase/liquibase/blob/master/liquibase-standard/pom.xml#L252
> > matching its <Provide-Capability>
> >
> https://github.com/liquibase/liquibase/blob/master/liquibase-standard/pom.xml#L217
>
> > It just needs an SPI Fly at the run level it is started on to make them
> > all available...
>
> > But I would be happier if I could make it just be SPI Fly 1.3.7...
>
> > So, @JB...? Is there a way to "force" the run level for a particular
> bundle?
>
> Alternatively: is there a way to set the run level of a feature you
> depend on?
>
> If so, then my liquibase feature could just depend on the karaf spifly
> feature and set its run-level to be 40.
>
> And I could simplify the liquibase-karaf-feature even more.
>
>
>