You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "David Bosschaert (JIRA)" <ji...@apache.org> on 2018/08/28 14:05:00 UTC

[jira] [Commented] (SLING-7860) Enhance slingfeature-maven-plugin to aggregate multiple features into a single feature

    [ https://issues.apache.org/jira/browse/SLING-7860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16595009#comment-16595009 ] 

David Bosschaert commented on SLING-7860:
-----------------------------------------

I have started prototyping the aggregation functionality in the slingfeature-maven-plugin, and currently it looks like this:
{code:xml}
     <plugin>
        <groupId>org.apache.sling</groupId>
        <artifactId>slingfeature-maven-plugin</artifactId>
        <version>0.2.0-SNAPSHOT</version>
        <executions>
          <execution>
            <id>some-id</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>aggregate-features</goal>
            </goals>
            <configuration>
              <classifier>my-aggregated-feature</classifier>
              <features>
                <directory>
                  <location>${basedir}/src/main/my-features</directory>
                  <includes>*.blah</includes>
                  <excludes>foobar.blah</excludes>
                  <excludes>test.blah</excludes>
                </directory>
                <artifact>
                  <groupId>gid</groupId>
                  <artifactId>aid</artifactId>
                  <version>1.2.3</version>
                </artifact>
              </features>
            </configuration>
          </execution>
        </executions>
     </plugin>  
{code}
So the set of features to be aggregated can be collected from local feature file resources as well as from maven artifacts. The above example will create a feature with the same groupID, artifactID and version as is in the pom that contains this, it will have the type {{slingfeature}} and the classifier as specified in the plugin section.

> Enhance slingfeature-maven-plugin to aggregate multiple features into a single feature
> --------------------------------------------------------------------------------------
>
>                 Key: SLING-7860
>                 URL: https://issues.apache.org/jira/browse/SLING-7860
>             Project: Sling
>          Issue Type: New Feature
>          Components: Feature Model, Maven Plugins and Archetypes
>            Reporter: David Bosschaert
>            Assignee: David Bosschaert
>            Priority: Major
>
> The following page describes a way to define applications for feature models: https://github.com/apache/sling-org-apache-sling-feature/blob/master/appconf.md
> An alternative approach is to enhance the slingfeature-maven-plugin to enable it to aggregate multiple features into a new feature. 
> The slingfeature-maven-plugin should be enhanced to support this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)