You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by "royteeuwen (via GitHub)" <gi...@apache.org> on 2026/06/02 21:27:03 UTC
[PR] SLING-13233: multi-feature aggregation + OSGi BSN collision detection [sling-feature-launcher-maven-plugin]
royteeuwen opened a new pull request, #32:
URL: https://github.com/apache/sling-feature-launcher-maven-plugin/pull/32
## Summary
The `<launch>` element currently accepts exactly one of `<feature>` (Maven coordinates) or `<featureFile>` (local path), validated as mutually exclusive. The underlying `org.apache.sling.feature.launcher` CLI has supported multiple `-f` flags for years — the plugin just never exposed it.
This PR adds four additive `<launch>` configuration fields and relaxes the existing exclusivity check:
```xml
<launch>
<id>...</id>
<feature>...</feature> <!-- existing, optional -->
<featureFile>...</featureFile> <!-- existing, optional -->
<!-- NEW: additional Maven-coord features to aggregate -->
<features>
<feature>...</feature>
</features>
<!-- NEW: additional local feature files to aggregate -->
<featureFiles>
<featureFile>...</featureFile>
</featureFiles>
<!-- NEW: maps to launcher --osgi-bsn-collision-detection (1.3.6) -->
<osgiBsnCollisionDetection>true</osgiBsnCollisionDetection>
<!-- NEW: maps to launcher -C, e.g. *:*:HIGHEST -->
<artifactClashOverrides>
<artifactClashOverride>*:*:HIGHEST</artifactClashOverride>
</artifactClashOverrides>
</launch>
```
`StartMojo` collects all four feature sources into one ordered list and emits one `-f` flag per entry, in the order shown. Order matters for the launcher's `LATEST` / `FIRST` overrides.
`Launch.validate()` is updated:
- Old rule: exactly one of `feature` or `featureFile` is set. **Removed** (they're additive now).
- New rule: at least one of `feature` / `featureFile` / `features` / `featureFiles` must be non-empty.
- New rule: each `features[*]` entry must have type `slingosgifeature`.
- New rule: each `featureFiles[*]` path must exist.
Default `featureLauncherVersion` bumped `1.3.4` → `1.3.6` so consumers pick up `--osgi-bsn-collision-detection` (SLING-13217) out of the box.
## Backward compatibility
The only meaningful semantic change: combining `<feature>` and `<featureFile>` was previously rejected at validation; now it's accepted as a two-feature aggregation. Existing single-feature configurations continue to work unchanged. The new fields are all optional with empty-list / false defaults.
The previously-failing `LaunchTest.invalidLaunch_bothFeatureAndFeatureFile` test was renamed and inverted to assert success with this combination. Three new tests added covering multi-feature, missing-entry-in-`featureFiles`, and `osgiBsnCollisionDetection=true`.
## Related
- SLING-13197 — `org.apache.sling.feature:2.0.6`: `BuilderContext.setOsgiBsnCollisionDetection(boolean)`
- SLING-13217 — `org.apache.sling.feature.launcher:1.3.6`: `--osgi-bsn-collision-detection` CLI flag
## Test plan
- [x] 12 unit tests in `LaunchTest` (was 8), all pass on master
- [x] `mvn install` clean (spotless + tests + invoker ITs)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] SLING-13233: multi-feature aggregation + OSGi BSN collision detection [sling-feature-launcher-maven-plugin]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #32:
URL: https://github.com/apache/sling-feature-launcher-maven-plugin/pull/32#issuecomment-4618426069
## [](https://sonarcloud.io/dashboard?id=apache_sling-feature-launcher-maven-plugin&pullRequest=32) **Quality Gate passed**
Issues
 [1 New issue](https://sonarcloud.io/project/issues?id=apache_sling-feature-launcher-maven-plugin&pullRequest=32&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_sling-feature-launcher-maven-plugin&pullRequest=32&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-feature-launcher-maven-plugin&pullRequest=32&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [80.6% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_sling-feature-launcher-maven-plugin&pullRequest=32&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_sling-feature-launcher-maven-plugin&pullRequest=32&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_sling-feature-launcher-maven-plugin&pullRequest=32)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] SLING-13233: multi-feature aggregation + OSGi BSN collision detection [sling-feature-launcher-maven-plugin]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #32:
URL: https://github.com/apache/sling-feature-launcher-maven-plugin/pull/32#issuecomment-4608577169
## [](https://sonarcloud.io/dashboard?id=apache_sling-feature-launcher-maven-plugin&pullRequest=32) **Quality Gate failed**
Failed conditions
 [72.4% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_sling-feature-launcher-maven-plugin&pullRequest=32&metric=new_coverage&view=list) (required ≥ 80%)
<!-- sqra:qg_revision=d98ae453ee00f87a255ea8f02b7d58e6583a9c2e3f5a5cadaf8ca768350cb498 -->
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_sling-feature-launcher-maven-plugin&pullRequest=32)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org