[ODLPARENT-227] Add SCR to default karaf profile Created: 27/Feb/20 Updated: 03/Mar/20 Resolved: 03/Mar/20 |
|
| Status: | Resolved |
| Project: | odlparent |
| Component/s: | Karaf, SFT |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Downstream projects are using OSGi DS (a.k.a. Service Component Runtime), which they depend on easily be depending on Karaf's "scr" feature. Unfortunately this results in rewiring of pax-logging, hence SFTs end up missing a chunk of their logs. Promote OSGi DS to being equal to Blueprint and always load it. It is much better for OSGi than Blueprint anyway. |
| Comments |
| Comment by Robert Varga [ 27/Feb/20 ] |
|
skitt so I tried manipulating bootFeatures/startupFeatures, which are supposed to automate this, but no dice, neither file is affected when built with karaf4-parent. The thing is, the fact this does not work seems to be leading to all that configuration around exclusions and maintaining startup.properties – note how our snippet from karaf-resources:
# The following are added by opendaylight-karaf-resources
mvn\:org.osgi/org.osgi.service.event/1.3.1 = 7
mvn\:org.apache.felix/org.apache.felix.metatype/1.2.2 = 8
mvn\:org.opendaylight.odlparent/bcprov-framework-ext/${project.version} = 14
mvn\:org.opendaylight.odlparent/bcpkix-framework-ext/${project.version} = 14
mvn\:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 = 14
pretty much matches what we want to express in:
<dependency>
<groupId>org.apache.aries.quiesce</groupId>
<artifactId>org.apache.aries.quiesce.api</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<!-- for https://bugs.opendaylight.org/show_bug.cgi?id=4290 -->
<artifactId>org.osgi.service.event</artifactId>
</dependency>
[...]
<dependency>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bcpkix-framework-ext</artifactId>
<scope>runtime</scope>
</dependency>
which plus the guidelines to various exclusions such as: <excludedArtifactId>org.apache.aries.quiesce.api</excludedArtifactId> seem to point all over the place I think the startup.properties thing needs to definitely be generated by karaf4-parent – blueprint.core.compatibility matches aries-blueprint in standard-*-features.xml. My question is: any idea on how to do this correctly? |
| Comment by Robert Varga [ 27/Feb/20 ] |
|
Also, https://svn.apache.org/repos/asf/karaf/site/production/manual/latest/custom-distribution.html would lead me to believe if this worked correctly, populate-local-repo would just be a before-step to generate a well-known feature, which has dependencies on all the right features-{project}/individual features and then declaring:
<installedFeature>${project.groupId}-${project.artifactId}-everything</installedFeature>
and then karaf-maven-plugin would do the rest of the copying based on: <installedFeature>baz</installedFeature> - This will result in all the bundles in the feature being installed in the "system" internal repository. Therefore at runtime the feature may be installed without access to external repositories. You can use feature_name or feature_name/feature_version formats. or are we missing recursiveness? |