For my little project (just using the files include) it works. This is the reference for configuring:

https://issues.apache.org/jira/browse/SLING-8058?focusedCommentId=16677823&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16677823

Everything is optional, specifying a classifier must be enough; if that's not working anymore that's clearly a bug.

Now, the aggregated feature is not written to disk by the aggregation itself. If you have a project of type slingosgifeature it will be written to disk as part of attach feature mojo. If your project is of a different type, you need to configure the attach mojo

HTH

Regards

Carsten


Andreas Schaefer wrote
Hi

I am running into an issue with 'sling-slingfeature-maven-plugin’ where the 
‘aggregate-features’ is not writing a file.
Unfortunately I cannot find an up to date example on how to use it (the site is 
not having any configuration example) and so I tried to figure out from the 
code but could not find or pin point the location where the file is written to 
the file system.

I have my FM files inside src/main/features and have this plugin configuration:

             <plugin>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>slingfeature-maven-plugin</artifactId>
                 <version>1.0.3-SNAPSHOT</version>
                 <extensions>true</extensions>
                 <executions>
                     <execution>
                         <id>aggregate-base-feature</id>
                         <phase>generate-resources</phase>
                         <goals>
                             <goal>aggregate-features</goal>
                         </goals>
                         <configuration>
                             <aggregates>
                                 <aggregate>
                                     <classifier>example-runtime</classifier>
                                     <filesInclude>**/*.json</filesInclude>
<!--                                    <markAsComplete>true</markAsComplete>-->
<!--                                    <frameworkPropertiesOverrides>-->
                                         <!-- Framework property overrides go here 
-->
<!--                                        
<org.osgi.framework.bootdelegation>javax.*</org.osgi.framework.bootdelegation>-->
<!--                                    </frameworkPropertiesOverrides>-->
                                 </aggregate>
                             </aggregates>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>

This is my target after running ‘mvn clean generate-sources’:

/target
        /maven-shared-archive-resources
        /sling-slingfeature-maven-plugin-fmtmp

The folder 'sling-slingfeature-maven-plugin-fmtmp’ is empty.

There are a few things that are odd. Because I specify a classifier the 
‘filesInclude’ is not optional (anymore?), also the features property is not a 
file but rather a relative path to the baseDir (src/main/my-feature works but 
not ${project.basedir}/src/main/my-feature).

The configuration from the site generation is missing in my opinion a good 
example for the configuration and aggregates config element is not documented.

If anyone can point to the location where the aggravated file should be written 
to the file system I can further investigate it or is that not working this way 
anymore.

Cheers - Andy Schaefer

--
Carsten Ziegeler
Adobe Research Switzerland
[email protected]

Reply via email to