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

Andreas Schaefer commented on SLING-8875:
-----------------------------------------

I published a new branch in the Sling JCR Packageinit project which contains 
the usage of this goal:
{code:java}
<plugin>
    <groupId>org.apache.sling</groupId>
    <artifactId>slingfeature-maven-plugin</artifactId>
    <version>${slingfeature-maven-plugin.version}</version>
    <extensions>true</extensions>
    <executions>
        <execution>
            <id>create-fm-descriptor</id>
            <phase>package</phase>
            <goals>
                <goal>create-fm-descriptor</goal>
            </goals>
            <configuration>
                <classifier>jcr-packageinit</classifier>
            </configuration>
        </execution>
    </executions>
</plugin>
{code}
and then published a demo version of the Sling FM Starter project in the Sling 
Whiteboard (sling-org-apache-feature-model-starter) which then uses this FM 
Descriptor:

 
{code:java}
<plugin>
    <groupId>org.apache.sling</groupId>
    <artifactId>slingfeature-maven-plugin</artifactId>
    <version>${slingfeature-maven-plugin.version}</version>
    <extensions>true</extensions>
    <configuration>
        <features>src/main/fm</features>
    </configuration>
    <executions>
        <execution>
            <id>aggregate-base-feature</id>
            <phase>generate-test-sources</phase>
            <goals>
                <goal>aggregate-features</goal>
            </goals>
            <configuration>
                <aggregates>
                    <aggregate>
                        <classifier>sling12</classifier>
                        <filesInclude>**/*.json</filesInclude>
                        <includeArtifact>
                            <groupId>org.apache.sling</groupId>
                            
<artifactId>org.apache.sling.jcr.packageinit</artifactId>
                            <version>0.0.1-SNAPSHOT</version>
                            <classifier>jcr-packageinit</classifier>
                            <type>slingosgifeature</type>
                        </includeArtifact>
                    </aggregate>
                </aggregates>
            </configuration>
        </execution>
        <execution>
            <id>attach-base-feature</id>
            <phase>process-test-sources</phase>
            <goals>
                <goal>attach-features</goal>
            </goals>
        </execution>
    </executions>
</plugin>
{code}
 

 

> Create new Goal to create a FM Descriptor from a Maven Module
> -------------------------------------------------------------
>
>                 Key: SLING-8875
>                 URL: https://issues.apache.org/jira/browse/SLING-8875
>             Project: Sling
>          Issue Type: New Feature
>          Components: Feature Model
>    Affects Versions: slingfeature-maven-plugin 1.1.10
>            Reporter: Andreas Schaefer
>            Assignee: Andreas Schaefer
>            Priority: Major
>             Fix For: slingfeature-maven-plugin 1.1.12
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In order to use FM Descriptor in projects modules should be creating and 
> exposing their FM Descriptors in local / remote Maven repositories. This way 
> an assembler can take these FMs and build up its Sling instance.
> To avoid making each module to write their own FM Descriptor we should have a 
> Goal in the SlingFeature Maven Plugin that does that automatically.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to