[jira] [Commented] (JCRVLT-582) Package import fails for namespaced paths and path mapping
[ https://issues.apache.org/jira/browse/JCRVLT-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17475970#comment-17475970 ] Tobias Bocanegra commented on JCRVLT-582: - yes, this was always a bit a best effort. to avoid having access to a session and to speed up the archive. a better approximation would be to make repo paths of the filenames before applying the path mapping. > Package import fails for namespaced paths and path mapping > -- > > 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 > Attachments: sites-3957.log > > > 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"); > } > 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)
[jira] [Commented] (JCRVLT-582) Package import fails for namespaced paths and path mapping
[ https://issues.apache.org/jira/browse/JCRVLT-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17475693#comment-17475693 ] Konrad Windszus commented on JCRVLT-582: [~tripod] I guess the idea of path mapping is that it act's on JCR paths, not on file paths. Any idea how to fix MappedArchive which is rather on the File-side and not on the repo side? To me it rather looks like a design flaw and the mapping should be done later and not already on the archive level... WDYT? > Package import fails for namespaced paths and path mapping > -- > > 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 > Attachments: sites-3957.log > > > 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"); > } > 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)
[jira] [Commented] (JCRVLT-582) Package import fails for namespaced paths and path mapping
[ https://issues.apache.org/jira/browse/JCRVLT-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17475450#comment-17475450 ] Konrad Windszus commented on JCRVLT-582: {{RegexpPathMapping.map(String path)}} is called twice: # from {{DefaultWorkspaceFilter.translate(...)}} # from {{MappedArchive.applyMapping(...)}} currently the former applies uses unescaped node names, while the latter uses namespace mangling (as it is acting on file names) > Package import fails for namespaced paths and path mapping > -- > > 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 > Attachments: sites-3957.log > > > 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"); > } > 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)
[jira] [Commented] (JCRVLT-582) Package import fails for namespaced paths and path mapping
[ https://issues.apache.org/jira/browse/JCRVLT-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17474649#comment-17474649 ] Burkhard Pauli commented on JCRVLT-582: --- Hi [~kwin], I created a PR with the updated test case in https://github.com/apache/jackrabbit-filevault/pull/198 This PR shows also a possible workaround. At the moment it's required to add a path mapping with mangled namespaces and without to get the node installed at the mapped location. > Package import fails for namespaced paths and path mapping > -- > > 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 > Attachments: sites-3957.log > > > 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"); > } > 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)
[jira] [Commented] (JCRVLT-582) Package import fails for namespaced paths and path mapping
[ https://issues.apache.org/jira/browse/JCRVLT-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470493#comment-17470493 ] Jean-Christophe Kautzmann commented on JCRVLT-582: -- I'm not familiar with the testing code base so here are the steps that the test should perform: # create a package containing namespaced paths, e.g. {{/content/_cq_tags/foo/bar}} # add some regex path mapping to the importer: {{/content/cq:tags/foo}} maps to {{/content/cq:tags/foo1}} # install the package into the JCR repository # verify that {{/content/cq:tags/foo1/bar}} is installed > Package import fails for namespaced paths and path mapping > -- > > 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 > Attachments: sites-3957.log > > > 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"); > } > 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)
[jira] [Commented] (JCRVLT-582) Package import fails for namespaced paths and path mapping
[ https://issues.apache.org/jira/browse/JCRVLT-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470396#comment-17470396 ] Konrad Windszus commented on JCRVLT-582: [~jck] Can you come up with a PR containing a failing test? > Package import fails for namespaced paths and path mapping > -- > > 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 > Attachments: sites-3957.log > > > 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"); > } > 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)