[
https://issues.apache.org/jira/browse/SLING-8929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16999481#comment-16999481
]
Andreas Schaefer commented on SLING-8929:
-----------------------------------------
I understand but for me having a list of includeArtifact without a parent like
includeArtifacts seems to be un-maven but it works so its fine.
I am still struggling to see how to setup Sling Starter as Feature Model based
so I keep it for now and see where it takes us.
For the technical debt I don't see this as a big issue as these are just a way
to propagate settings and not adding additional logic. At the end the
includeArtifact will have its values. But let's discuss this later.
> Simplify Include Artifact for Sling Feature Maven Plugin
> --------------------------------------------------------
>
> Key: SLING-8929
> URL: https://issues.apache.org/jira/browse/SLING-8929
> Project: Sling
> Issue Type: New Feature
> Components: Feature Model
> Affects Versions: slingfeature-maven-plugin 1.1.2
> Reporter: Andreas Schaefer
> Assignee: Andreas Schaefer
> Priority: Major
> Fix For: OSGi Feature Maven Plugin 1.1.14
>
>
> The includeArtifact configuration would be used a lot if modules are imported
> using their own FM files which are installed / deployed in Maven repos. Much
> of the settings would be repetitive for a project like Sling. For example the
> group, type and sometimes version and classifier might be the same for a many
> artifacts.
> I suggest that we create an enclosing parent 'includeArtifacts' that can
> provide defaults which are then filled into the includeArtifact if not
> overwritten and that parent can appear multiple times to provide defaults for
> multiple groups.
> So instead of:
>
> {code:java}
> <includeArtifact>
> <groupId>org.apache.sling</groupId>
> <artifactId>org.apache.sling.feature.test1</artifactId>
> <version>12-SNAPSHOT</version>
> <classifier>sling12</classifier>
> <type>slingosgifeature</type>
> </includeArtifact>
> <includeArtifact>
> <groupId>org.apache.sling</groupId>
> <artifactId>org.apache.sling.feature.test2</artifactId>
> <version>12-SNAPSHOT</version>
> <classifier>sling12</classifier>
> <type>slingosgifeature</type>
> </includeArtifact>
> <includeArtifact>
> <groupId>org.apache.sling</groupId>
> <artifactId>org.apache.sling.feature.test3</artifactId>
> <version>12-SNAPSHOT</version>
> <classifier>my-classifier</classifier>
> <type>slingosgifeature</type>
> </includeArtifact>
> {code}
> we could write it like this:
>
>
> {code:java}
> <includeArtifacts>
> <groupId>org.apache.sling</groupId>
> <version>12-SNAPSHOT</version>
> <classifier>sling12</classifier>
> <type>slingosgifeature</type>
> <includeArtifact>
> <artifactId>org.apache.sling.feature.test1</artifactId>
> </includeArtifact>
> <includeArtifact>
> <artifactId>org.apache.sling.feature.test2</artifactId>
> </includeArtifact>
> <includeArtifact>
> <artifactId>org.apache.sling.feature.test3</artifactId>
> <classifier>my-classifier</classifier>
> <includeArtifact>
> </includeArtifacts>{code}
> Of course, the longer the list and the most common attributes there are the
> shorter the list is but for a project like Sling that would make the list
> shorter and easier to read.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)