You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2020/09/10 12:16:00 UTC

[jira] [Updated] (SLING-9725) Better support for text extensions

     [ https://issues.apache.org/jira/browse/SLING-9725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated SLING-9725:
------------------------------------
    Description: 
The feature model allows extensions in text format, the most used right now is the repoinit extension which is a script in DSL. Writing this in the feature model json format is not user friendly as json properties do not support newlines. We made this a little bit easier with allowing an array of strings instead, but still not user friendly.

We can provide better support for maven based projects by enhancing the maven plugin. 
If an extension of type text is specified in the feature model with the value "@file", the plugin looks for a file in the same directory as the feature model. The file must have the same name as the feature file followed by a dash and the name of the extension.
For example:
Feature file: src/main/features/myfeature.json
Repoinit : src/main/features/myfeature-repoinit.txt

(Regarding SLING-9721 it might make sense to support different extensions for the file than txt, so we could enhance this and allow that the "classifier and extension is specified by the @file like @file:xssapi.xml which then would look for a file name src/main/features/myfeature-xssapi.xml - but @file should work as well)

The JSON format of a feature is not changed / enhanced - we just make authoring in maven projects easier.

  was:
The feature model allows extensions in text format, the most used right now is the repoinit extension which is a script in DSL. Writing this in the feature model json format is not user friendly as json properties do not support newlines. We made this a little bit easier with allowing an array of strings instead, but still not user friendly.

We can provide better support for maven based projects by enhancing the maven plugin. 
If an extension of type text is specified in the feature model with the value "@file", the plugin looks for a file in the same directory as the feature model. The file must have the same name as the feature file followed by a dash and the name of the extension.
For example:
Feature file: src/main/features/myfeature.json
Repoinit : src/main/features/myfeature-repoinit.txt


The JSON format of a feature is not changed / enhanced - we just make authoring in maven projects easier.


> Better support for text extensions
> ----------------------------------
>
>                 Key: SLING-9725
>                 URL: https://issues.apache.org/jira/browse/SLING-9725
>             Project: Sling
>          Issue Type: Improvement
>          Components: Feature Model, Maven Plugins and Archetypes
>            Reporter: Carsten Ziegeler
>            Priority: Major
>
> The feature model allows extensions in text format, the most used right now is the repoinit extension which is a script in DSL. Writing this in the feature model json format is not user friendly as json properties do not support newlines. We made this a little bit easier with allowing an array of strings instead, but still not user friendly.
> We can provide better support for maven based projects by enhancing the maven plugin. 
> If an extension of type text is specified in the feature model with the value "@file", the plugin looks for a file in the same directory as the feature model. The file must have the same name as the feature file followed by a dash and the name of the extension.
> For example:
> Feature file: src/main/features/myfeature.json
> Repoinit : src/main/features/myfeature-repoinit.txt
> (Regarding SLING-9721 it might make sense to support different extensions for the file than txt, so we could enhance this and allow that the "classifier and extension is specified by the @file like @file:xssapi.xml which then would look for a file name src/main/features/myfeature-xssapi.xml - but @file should work as well)
> The JSON format of a feature is not changed / enhanced - we just make authoring in maven projects easier.



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