Andreas Schaefer created SLING-8929:
---------------------------------------

             Summary: 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
             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)

Reply via email to