[
https://issues.apache.org/jira/browse/JCRVLT-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jean-Christophe Kautzmann updated JCRVLT-582:
---------------------------------------------
Description:
Package import fails to import nodes when used as follows:
* the package contains namespaced paths (e.g. {{/content/_cq_tags/src}})
* regex path mapping are defined to map {{/content/cq:tags/src}} to
{{/content/cq:tags/dest}}
{code}
RegexpPathMapping pathMapping = new RegexpPathMapping();
for (String path : sitePaths.keySet()) {
pathMapping.addMapping(path + "(/.*)?", sitePaths.get(path) + "$1");
if (StringUtils.contains(path, ":")) {
pathMapping.addMapping(mangleNamespaces(path, resourceResolver) +
"(/.*)?", mangleNamespaces(sitePaths.get(path), resourceResolver) + "$1");
}
}
ImportOptions options = new ImportOptions();
options.setPathMapping(pathMapping);
jcrPackage.install(options);
{code}
Result: nodes below {{/content/cq:tags}} are not created.
was:
Package import fails to import nodes when used as follows:
* the package contains namespaced paths (e.g. /content/_cq_tags/src)
* regex path mapping are defined to map /content/cq:tags/src to
/content/cq:tags/dest
{code}
RegexpPathMapping pathMapping = new RegexpPathMapping();
for (String path : sitePaths.keySet()) {
pathMapping.addMapping(path + "(/.*)?", sitePaths.get(path) + "$1");
if (StringUtils.contains(path, ":")) {
pathMapping.addMapping(mangleNamespaces(path, resourceResolver) +
"(/.*)?", mangleNamespaces(sitePaths.get(path), resourceResolver) + "$1");
}
}
ImportOptions options = new ImportOptions();
options.setPathMapping(pathMapping);
jcrPackage.install(options);
{code}
Result: nodes below /content/cq:tags are not created.
> Package import fails for namespaced paths
> -----------------------------------------
>
> Key: JCRVLT-582
> URL: https://issues.apache.org/jira/browse/JCRVLT-582
> Project: Jackrabbit FileVault
> Issue Type: Bug
> Components: Packaging
> Affects Versions: 3.5.8
> Reporter: Jean-Christophe Kautzmann
> Priority: Major
>
> Package import fails to import nodes when used as follows:
> * the package contains namespaced paths (e.g. {{/content/_cq_tags/src}})
> * regex path mapping are defined to map {{/content/cq:tags/src}} to
> {{/content/cq:tags/dest}}
> {code}
> RegexpPathMapping pathMapping = new RegexpPathMapping();
> for (String path : sitePaths.keySet()) {
> pathMapping.addMapping(path + "(/.*)?", sitePaths.get(path) + "$1");
> if (StringUtils.contains(path, ":")) {
> pathMapping.addMapping(mangleNamespaces(path, resourceResolver) +
> "(/.*)?", mangleNamespaces(sitePaths.get(path), resourceResolver) + "$1");
> }
> }
> ImportOptions options = new ImportOptions();
> options.setPathMapping(pathMapping);
> jcrPackage.install(options);
> {code}
> Result: nodes below {{/content/cq:tags}} are not created.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)