We have a few aggregation jobs that produce distributables suitable for our delivery organizaton based on Apache Karaf feature files
<features name="${project.groupId}/${project.artifactId}/${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0 http://karaf.apache.org/xmlns/features/v1.4.0">
<feature name="aggregated-bundles" version="${project.version}" start-level="80" install="auto">
<bundle>mvn:local.example.project/service-bundle/1.0.0-SNAPSHOT</bundle>
</feature>
</features>
These, combined with karafs maven plugin tooling produce a tar.gz bundle for to be passed down the line for a test or production delpoyments.
However, the dependency on the maven artifact expressed in karafs feature file is naturally not detected by jenkins in a regular maven or pipeline job. The end result is that when the included bundles are updated and the feature version isn't, as is typically the case with snapshots, the aggregation job will not trigger, and if manually triggered without the workspace having been cleared, will not contain updated builds of the SNAPSHOT dependencies.
How would I go about teaching jenkins about my externally specified maven dependencies?
I've tried generating a feature file based on metadata, but got held up on the supported usecase of using OSGi to deploy multiple versions of the same artefact, something which maven isn't fond of.