#
#  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.
#
# The feature for Apache Sling
[feature name=sling]

[variables]
    jackrabbit.version=2.18.2

[artifacts startLevel=4]
    org.apache.felix/org.apache.felix.scr/2.1.16
    org.apache.felix/org.apache.felix.metatype/1.2.2
    org.osgi/org.osgi.util.converter/1.0.0

[artifacts startLevel=5]
    org.apache.felix/org.apache.felix.http.whiteboard/4.0.0
    org.apache.sling/org.apache.sling.extensions.webconsolebranding/1.0.2
    org.apache.sling/org.apache.sling.extensions.webconsolesecurityprovider/1.2.4
    org.apache.felix/org.apache.felix.inventory/1.0.6
    org.apache.felix/org.apache.felix.prefs/1.1.0
    org.apache.felix/org.apache.felix.webconsole/4.3.16
    org.apache.felix/org.apache.felix.webconsole.plugins.ds/2.1.0
    org.apache.felix/org.apache.felix.webconsole.plugins.obr/1.0.4
    org.apache.felix/org.apache.felix.webconsole.plugins.packageadmin/1.0.4
    org.apache.felix/org.apache.felix.webconsole.plugins.event/1.1.8
    org.apache.felix/org.apache.felix.webconsole.plugins.memoryusage/1.0.10
    org.apache.sling/org.apache.sling.commons.johnzon/1.2.6
    org.apache.felix/org.apache.felix.bundlerepository/2.0.10
    org.apache.sling/org.apache.sling.extensions.threaddump/0.2.2
    org.apache.aries.jmx/org.apache.aries.jmx.api/1.1.5
    org.apache.aries.jmx/org.apache.aries.jmx.core/1.1.8
    org.apache.aries.jmx/org.apache.aries.jmx.whiteboard/1.2.0
    commons-io/commons-io/2.6
    commons-fileupload/commons-fileupload/1.4
    org.apache.sling/org.apache.sling.commons.log.webconsole/1.0.0
    org.apache.sling/org.apache.sling.api
    org.apache.sling/org.apache.sling.auth.core/1.4.4
    
[artifacts startLevel=10]
    org.apache.felix/org.apache.felix.http.sslfilter/1.2.6
    org.apache.pdfbox/pdfbox/2.0.17
    org.apache.pdfbox/fontbox/2.0.17
    org.apache.pdfbox/jempbox/1.8.16
    org.apache.tika/tika-core/1.22
    org.apache.tika/tika-parsers/1.22

[artifacts startLevel=15]
    org.apache.sling/org.apache.sling.jcr.jcr-wrapper/2.0.0
    org.apache.sling/org.apache.sling.jcr.api/2.4.0
    org.apache.sling/org.apache.sling.jcr.base/3.1.0
    org.apache.sling/org.apache.sling.jcr.registration/1.0.6
    org.apache.jackrabbit/jackrabbit-api/${jackrabbit.version}
    org.apache.jackrabbit/jackrabbit-jcr-commons/${jackrabbit.version}
    org.apache.jackrabbit/jackrabbit-spi/${jackrabbit.version}
    org.apache.jackrabbit/jackrabbit-spi-commons/${jackrabbit.version}
    org.apache.jackrabbit/jackrabbit-webdav/${jackrabbit.version}
    org.apache.jackrabbit/jackrabbit-jcr-rmi/${jackrabbit.version}
    org.apache.jackrabbit/jackrabbit-data/${jackrabbit.version}
    org.apache.sling/org.apache.sling.jcr.webdav/2.3.8
    org.apache.sling/org.apache.sling.jcr.davex/1.3.10
    org.apache.sling/org.apache.sling.jcr.jackrabbit.accessmanager/3.0.4
    org.apache.sling/org.apache.sling.jcr.webconsole/1.0.2
    io.dropwizard.metrics/metrics-core/3.2.6
    org.apache.sling/org.apache.sling.commons.metrics/1.2.6
    com.google.guava/guava/15.0
    org.apache.sling/org.apache.sling.resource.filter/1.0.0

[artifacts]
    # Add the Slingshot Sample provisioning model
    org.apache.sling/org.apache.sling.sample.slingshot/0.9.0/slingfeature/slingfeature
    # Default Starter content
    # Adjust responseTextFor503 in healthcheck.txt to "classpath:org.apache.sling.starter.content:startup/index.html" when updating org.apache.sling.starter.content, see SLING-8721
    org.apache.sling/org.apache.sling.starter.content/1.0.8
    commons-collections/commons-collections/3.2.2
    org.apache.commons/commons-collections4/4.4
    commons-codec/commons-codec/1.13
    org.apache.commons/commons-math/2.2
    org.apache.httpcomponents/httpcore-osgi/4.4.12
    org.apache.httpcomponents/httpclient-osgi/4.5.10
    org.apache.sling/org.apache.sling.adapter/2.1.10
    org.apache.sling/org.apache.sling.auth.form/1.0.16
    org.apache.sling/org.apache.sling.bundleresource.impl/2.3.2
    org.apache.sling/org.apache.sling.commons.classloader/1.4.4
    org.apache.sling/org.apache.sling.commons.compiler/2.4.0
    org.apache.sling/org.apache.sling.commons.fsclassloader/1.0.12
    org.apache.sling/org.apache.sling.commons.mime/2.2.2
    org.apache.sling/org.apache.sling.commons.osgi/2.4.0
    org.apache.sling/org.apache.sling.commons.scheduler/2.7.4
    org.apache.sling/org.apache.sling.commons.threads/3.2.20
    org.apache.sling/org.apache.sling.engine
    org.apache.sling/org.apache.sling.fsresource/2.1.16
    org.apache.sling/org.apache.sling.i18n/2.5.14
    org.apache.sling/org.apache.sling.installer.console/1.0.2
    org.apache.sling/org.apache.sling.installer.provider.jcr/3.1.26
    org.apache.sling/org.apache.sling.installer.hc/2.0.2
    org.apache.sling/org.apache.sling.jcr.contentloader/2.3.0
    org.apache.sling/org.apache.sling.jcr.resource/3.0.20
    org.apache.sling/org.apache.sling.models.api/1.3.8
    org.apache.sling/org.apache.sling.models.impl/1.4.12
    org.apache.sling/org.apache.sling.resourceresolver
    org.apache.sling/org.apache.sling.serviceusermapper/1.4.4
    org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.2
    org.apache.sling/org.apache.sling.servlets.get/2.1.40
    org.apache.sling/org.apache.sling.servlets.post/2.3.36
    org.apache.sling/org.apache.sling.servlets.resolver
    org.apache.sling/org.apache.sling.xss/2.1.18
    javax.mail/mail/1.5.0-b01
    org.apache.geronimo.bundles/jstl/1.2_1

[configurations]
  org.apache.sling.engine.impl.log.RequestLogger
    access.log.enabled=B"true"
    request.log.outputtype=I"0"
    access.log.output="log.access"
    request.log.output="log.request"
    request.log.enabled=B"true"
    access.log.outputtype=I"0"

  org.apache.sling.commons.log.LogManager
    org.apache.sling.commons.log.pattern="%d{dd.MM.yyyy HH:mm:ss.SSS}\ *%level*\ [%thread]\ %logger\ %msg%n"
    org.apache.sling.commons.log.file="logs/error.log"
    org.apache.sling.commons.log.level="info"
    org.apache.sling.commons.log.file.size="'.'yyyy-MM-dd"
    org.apache.sling.commons.log.file.number=I"7"
    org.apache.sling.commons.log.packagingDataEnabled=B"true"

  org.apache.sling.commons.log.LogManager.factory.config-access.log
    org.apache.sling.commons.log.pattern="%msg%n"
    org.apache.sling.commons.log.names=["log.access"]
    org.apache.sling.commons.log.file="logs/access.log"
    org.apache.sling.commons.log.level="info"

  org.apache.sling.commons.log.LogManager.factory.config-request.log
    org.apache.sling.commons.log.pattern="%msg%n"
    org.apache.sling.commons.log.names=["log.request"]
    org.apache.sling.commons.log.file="logs/request.log"
    org.apache.sling.commons.log.level="info"

  # TODO: remove bundles as their dependency on admin login is fixed, see SLING-5355 for linked issues
  # For these bundles, admin login is considered "ok":
  # org.apache.sling.jcr.contentloader
  org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment-sling
    whitelist.name="sling"
    whitelist.bundles=[
      "org.apache.sling.discovery.commons",\
      "org.apache.sling.discovery.base",\
      "org.apache.sling.discovery.oak",\
      "org.apache.sling.extensions.webconsolesecurityprovider",\
      "org.apache.sling.i18n",\
      "org.apache.sling.jcr.base",\
      "org.apache.sling.jcr.contentloader",\
      "org.apache.sling.jcr.jackrabbit.usermanager",\
      "org.apache.sling.jcr.oak.server",\
      "org.apache.sling.jcr.repoinit",\
      "org.apache.sling.jcr.webconsole",\
      "org.apache.sling.servlets.post",\
      "org.apache.sling.serviceuser.webconsole"
    ]

  # WebDAV servlet requires config now
  org.apache.sling.jcr.webdav.impl.servlets.SimpleWebDavServlet
    dav.root="/dav"

  # DavEx servlet requires config now
  org.apache.sling.jcr.davex.impl.servlets.SlingDavExServlet
      alias="/server"

  org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-resourceresolver
    user.mapping=[
      "org.apache.sling.resourceresolver:mapping\=sling-mapping",
      "org.apache.sling.resourceresolver:hierarchy\=sling-readall",
      "org.apache.sling.resourceresolver:observation\=sling-readall",
      "org.apache.sling.resourceresolver:console\=sling-readall"
    ]

  # the user mapping for the servlet resolver, subservice "console" namely the user sling-scripting is created in scripting.txt
  org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-servletsresolver
    user.mapping=[
      "org.apache.sling.servlets.resolver:console\=sling-readall",
      "org.apache.sling.servlets.resolver:scripts\=sling-scripting"
    ]

  org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-observation
    user.mapping=[
      "org.apache.sling.jcr.resource:observation\=sling-readall"
    ]

  org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-xss
    user.mapping=[
      "org.apache.sling.xss\=sling-xss"
    ]

  org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-i18n
    user.mapping=[
      "org.apache.sling.i18n\=sling-i18n"
    ]

  org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-jcr-install
    user.mapping=[
      "org.apache.sling.installer.provider.jcr\=sling-jcr-install"
    ]

  org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-jcr-resource
    user.mapping=[
      "org.apache.sling.jcr.resource:validation\=sling-readall"
    ]

