Hi,
for your first question from the first mail, there is a test for that as
part of the plugin. Have a look at
https://github.com/apache/sling-slingfeature-maven-plugin/blob/master/src/it/attach-metadata-from-pom/pom.xml#L54
how this works.
What do you mean with "slingfeature artifacts" - the feature model
itself or a feature archive? Both can be created with the slingfeature
maven plugin. The model files can be the source of that project, or they
can be aggregated, or even generated with any other plugin. And then
they can be attached as artifacts of the project.
Similar, you can configure the attach-featurearchives mojo to produce
and attach feature archives based on any feature model.
If you want to remove things (bundles, content packages, configurations)
from a feature then the only way to do this is creating a prototype.
Features should form a reusable unit, so there should only be rare cases
where you want or need to remove something from that unit. Of course
that requires that the units are cut in a good way and are not just a
collection of random things.
Regards
Carsten
Am 23.07.2020 um 05:26 schrieb Daniel Klco:
Sorry, I found two more questions related to the feature model:
1. How does one produce slingfeature artifacts? I'm not clear how this
would work and the Starter reference doesn't do this
2. How would one remove artifacts from an aggregate feature? For example, I
want to
remove com.composum.sling.core:composum-sling-user-management:1.12.0
from org.apache.sling:org.apache.sling.starter:slingfeature:sling:12-SNAPSHOT
(which I sideloaded into my local maven), but when I try to do this, it
complains:
org.apache.maven.InternalErrorException: Internal error:
java.lang.IllegalStateException: Bundle
com.composum.sling.core:composum-sling-user-management:1.12.0 can't be
removed from feature
org.apache.sling:org.apache.sling.starter:slingfeature:sling:12-SNAPSHOT as
it is not part of that feature.
Is this not supported? Or will I need to prototype every aggregated module
of sling starter?
On Wed, Jul 22, 2020 at 10:45 PM Daniel Klco <[email protected]> wrote:
Hi,
I've been looking into the feature model for the CMS App and investigating
Robert's Feature Model implementation[1] of the Sling Starter.
One thing I can't get to work is variable interpolation inside the models.
I was expecting that I could do the same thing currently in the
Provisioning model for version variables, such as oak.version or
slf4j.version, but when I attempted to set these variables the feature
model, maven fails when resolving dependencies.
I tried setting the replacePropertyVariables property in the execution as
documented[2] but no change.
Is this not possible or is there something I missed?
[1]
https://github.com/apache/sling-org-apache-sling-starter/tree/feature/SLING-9595
[2] https://github.com/apache/sling-slingfeature-maven-plugin
--
--
Carsten Ziegeler
Adobe Research Switzerland
[email protected]