This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch feature/SLING-10600 in repository https://gitbox.apache.org/repos/asf/sling-project-archetype.git
commit d09061a12bf9610d76226fab9cfa5058fdc2e0bb Author: Robert Munteanu <[email protected]> AuthorDate: Mon Jul 12 23:53:21 2021 +0300 SLING-10600 - Add a mapping entry redirecting to the project's top-level content path --- .../src/main/content/META-INF/vault/filter.xml | 8 ++++++++ .../jcr_root/etc/map/http/localhost_any/.content.xml | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/main/resources/archetype-resources/ui.apps.example/src/main/content/META-INF/vault/filter.xml b/src/main/resources/archetype-resources/ui.apps.example/src/main/content/META-INF/vault/filter.xml index 8b0461e..998d409 100644 --- a/src/main/resources/archetype-resources/ui.apps.example/src/main/content/META-INF/vault/filter.xml +++ b/src/main/resources/archetype-resources/ui.apps.example/src/main/content/META-INF/vault/filter.xml @@ -40,4 +40,12 @@ <filter root="/apps/${appsFolderName}"> <exclude pattern="/apps/${appsFolderName}/install/.*"/> </filter> + + <!-- + Sets up redirects to make the application easier to access. Can + erase previous rules, therefore it needs to be uncommented. + --> + <!-- + <filter root="/etc/map/http/localhost_any" /> + --> </workspaceFilter> diff --git a/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/etc/map/http/localhost_any/.content.xml b/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/etc/map/http/localhost_any/.content.xml new file mode 100644 index 0000000..dc54dac --- /dev/null +++ b/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/etc/map/http/localhost_any/.content.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more contributor license + agreements. See the NOTICE file distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file to you under the Apache License, + Version 2.0 (the "License"); you may not use this file except in compliance with the + License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed under the + License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions + and limitations under the License. +--> +<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" + jcr:primaryType="sling:Mapping" + sling:match="localhost\\.\\d*/$" + sling:redirect="/content/${appsFolderName}/home.html"/> +
