[
https://issues.apache.org/jira/browse/SLING-5969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15422808#comment-15422808
]
Bertrand Delacretaz commented on SLING-5969:
--------------------------------------------
Implemented in http://svn.apache.org/r1756518, a config like this one causes
the {{RepositoryInitializer}} to read from both the provisioning model provided
by the Sling Launchpad and from the classpath:
{code}
PID = org.apache.sling.jcr.repoinit.impl.RepositoryInitializer
references = [model@repoinit:context:/resources/provisioning/model.txt,
raw:classpath://com.example.sling.repoinit/repoinit.txt]
{code}
The first reference is the default, and "repoinit" is the default model section
name.
{{bundles/extensions/repoinit/it/src/main/provisioning/repoinit.txt}} contains
a complete configuration example.
I'll update
https://sling.apache.org/documentation/bundles/repository-initialization.html
accordingly.
> Support multiple model/raw sources in jcr.repoinit.RepositoryInitializer
> configuration
> --------------------------------------------------------------------------------------
>
> Key: SLING-5969
> URL: https://issues.apache.org/jira/browse/SLING-5969
> Project: Sling
> Issue Type: Improvement
> Components: Repoinit
> Affects Versions: Repoinit JCR 1.0.0
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
> Priority: Minor
> Fix For: Repoinit JCR 1.0.2
>
>
> As suggested by [~olli] it is convenient to use multiple URI-like references
> to define where the {{RepositoryInitializer}} gets its repoinit statements,
> something like
> {code}
> model@section:context:/resources/provisioning/model.txt
> raw:classpath://com.example.sling.repoinit/repoinit.txt
> {code}
> Dropping the existing configuration parameters is not backwards compatible
> with V1.0.0 of this module, but that looks reasonable as the new format is
> much more convenient and we've had little feedback about usage of this module
> so far. I'll add warnings in case the old parameters are still used.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)