[
https://issues.apache.org/jira/browse/SLING-13233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roy Teeuwen updated SLING-13233:
--------------------------------
Description:
The slingfeature-maven-plugin discovers feature files through a Maven lifecycle
participant (Preprocessor) that scans for features at session start. This scan
runs before any plugins in the build have executed, so feature JSON files that
are *generated* earlier in the same build — for example cpconverter output
written under target/ — do not yet exist and cannot be picked up by the
<aggregate> configuration.
There is currently no way to merge such build-time-generated feature files
into
an aggregate.
Proposal:
Add an `additionalFeatureFiles` parameter to the <aggregate> configuration of
the `aggregate-features` goal. Unlike the standard feature selection, the
files
listed here are read at goal execution time rather than during the
session-start
Preprocessor scan. This allows referencing feature JSONs produced by another
plugin earlier in the same build.
Behaviour:
- Each entry is read at goal time and merged into the aggregate alongside the
normally selected features.
- A configured file that does not exist causes the build to fail with a clear
MojoExecutionException naming the missing path.
was:
The <launch> element currently accepts exactly one of <feature> (Maven
coordinates) or <featureFile> (local path), validated as mutually exclusive.
This forces users who want to aggregate (e.g. Sling Starter + a downstream
feature, or a base feature + tweaks) to either:
* Pre-merge externally with a script that calls FeatureBuilder.assemble
themselves, then point <featureFile> at the result, or
* Skip the plugin entirely and shell out to the launcher tar.gz with their own
arg construction.
Both lose the plugin's start/stop lifecycle, attached-artifacts dir, port/repo
plumbing, and JAVA_HOME fallback.
This feature is meant to add the capabilities that the CLI already supports
(add <featureFiles>, <features>)
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.
> Allow aggregate goal to include additional feature files resolved at goal
> time
> -------------------------------------------------------------------------------
>
> Key: SLING-13233
> URL: https://issues.apache.org/jira/browse/SLING-13233
> Project: Sling
> Issue Type: New Feature
> Affects Versions: OSGi Feature Maven Plugin 1.9.4
> Reporter: Roy Teeuwen
> Assignee: Roy Teeuwen
> Priority: Major
> Fix For: OSGi Feature Maven Plugin 1.9.6
>
>
> The slingfeature-maven-plugin discovers feature files through a Maven
> lifecycle
> participant (Preprocessor) that scans for features at session start. This
> scan
> runs before any plugins in the build have executed, so feature JSON files
> that
> are *generated* earlier in the same build — for example cpconverter output
> written under target/ — do not yet exist and cannot be picked up by the
> <aggregate> configuration.
>
> There is currently no way to merge such build-time-generated feature files
> into
> an aggregate.
>
> Proposal:
> Add an `additionalFeatureFiles` parameter to the <aggregate> configuration
> of
> the `aggregate-features` goal. Unlike the standard feature selection, the
> files
> listed here are read at goal execution time rather than during the
> session-start
> Preprocessor scan. This allows referencing feature JSONs produced by another
> plugin earlier in the same build.
>
> Behaviour:
> - Each entry is read at goal time and merged into the aggregate alongside
> the
> normally selected features.
> - A configured file that does not exist causes the build to fail with a
> clear
> MojoExecutionException naming the missing path.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)