[
https://issues.apache.org/jira/browse/SLING-8929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16998835#comment-16998835
]
Carsten Ziegeler commented on SLING-8929:
-----------------------------------------
While this makes the configuration shorter for some cases we introduce an
additional way of configuring the same thing which adds technical depths.
In addition, I don't know any other maven plugin which does it like this.
Therefore I think we should not add this extra complexity just to make it
easier for a few use cases.
There are different ways to solve this, a parent pom holding the common
configuration, a feature aggregate etc.
> 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: slingfeature-maven-plugin 1.1.4
>
>
> 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)