-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to JSON HBS template for defining OSGi configurations (#38)
- Loading branch information
1 parent
1abb223
commit 90bcd56
Showing
4 changed files
with
152 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
145 changes: 145 additions & 0 deletions
145
...main/templates/__projectName__-aem-cms/__projectName__-aem-cms-config.osgiconfig.json.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"configurations": { | ||
|
||
// Set loglevel for project-specific bundles | ||
"org.apache.sling.commons.log.LogManager.factory.config-${projectName}": { | ||
"org.apache.sling.commons.log.file": "logs/error.log", | ||
"org.apache.sling.commons.log.level": "{{app.logLevel}}", | ||
"org.apache.sling.commons.log.names": ["io.wcm","${package}"] | ||
}, | ||
|
||
// Disable built-in AEM link checker by default (enable it only when configured properly). | ||
"com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformerFactory": { | ||
"linkcheckertransformer.disableChecking": true | ||
}, | ||
|
||
#if ( $optionContextAwareConfig == "y" ) | ||
#if ( $optionAemVersion == "6.5" ) | ||
// Update Context-Aware config settings as it is configured by default in latest AEM version | ||
"org.apache.sling.caconfig.management.impl.ConfigurationManagementSettingsImpl": { | ||
"ignorePropertyNameRegex": ["^(jcr|cq):.+$","^sling:resourceType$"], | ||
"configCollectionPropertiesResourceNames": ["jcr:content","."] | ||
}, | ||
|
||
#end | ||
// Context path strategy | ||
"io.wcm.caconfig.extensions.contextpath.impl.RootTemplateContextPathStrategy-${projectName}": { | ||
"templatePaths": ["#if($optionEditableTemplates=='y')/conf/${projectName}/settings/wcm/templates/homepage#else/apps/${projectName}/core/templates/homepage#end"], | ||
"minLevel": 1, | ||
"maxLevel": 5, | ||
"contextPathRegex": "^/content/(dam/)?(${projectName}/.*)?$", | ||
"configPathPatterns": ["/conf/$2"] | ||
}, | ||
|
||
// Store context-aware configuration in cq:Page nodes in /conf | ||
"io.wcm.caconfig.extensions.persistence.impl.PagePersistenceStrategy": { | ||
"enabled": true | ||
}, | ||
|
||
#end | ||
#if ( $optionWcmioHandler == "y" ) | ||
// Service user mapping for wcm.io URL handler | ||
"org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-${projectName}-wcmio-handler-wcm": { | ||
"user.mapping": [ | ||
"io.wcm.handler.url:clientlibs-service=[sling-scripting]", | ||
"io.wcm.wcm.commons:component-properties=[sling-scripting]" | ||
] | ||
}, | ||
|
||
// Service user mapping for wcm.io Media Handler | ||
"org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-${projectName}-wcmio-handler-media-dynamicmedia": { | ||
"user.mapping": [ | ||
"io.wcm.handler.media:dynamic-media-support=[configuration-reader-service]" | ||
] | ||
}, | ||
|
||
// Required DS components for systemready check | ||
"org.apache.felix.hc.generalchecks.DsComponentsCheck-${projectName}-systemready": { | ||
"hc.name": "${projectName} - Required Components", | ||
"hc.tags": ["${projectName}","systemready"], | ||
"statusForMissing": "TEMPORARILY_UNAVAILABLE", | ||
"components.list": [ | ||
"${package}.config.impl.LinkHandlerConfigImpl", | ||
"${package}.config.impl.MediaFormatProviderImpl", | ||
"${package}.config.impl.MediaHandlerConfigImpl", | ||
"io.wcm.caconfig.extensions.contextpath.impl.RootTemplateContextPathStrategy", | ||
"io.wcm.caconfig.extensions.persistence.impl.PagePersistenceStrategy", | ||
"io.wcm.handler.mediasource.dam.impl.dynamicmedia.DynamicMediaSupportServiceImpl" | ||
] | ||
}, | ||
|
||
#end | ||
}, | ||
|
||
"configurations:author": { | ||
|
||
// Show "Sites" view in TouchUI after login | ||
"com.day.cq.commons.servlets.RootMappingServlet": { | ||
"rootmapping.target": "/sites.html" | ||
}, | ||
|
||
#if ( $optionAemVersion == "cloud" ) | ||
#[[{{#if aem.disableAuthorUsageStatisticsCollection ~}}]]# | ||
// Disable usage tracking by default for admins (esp. for local usage) | ||
"com.adobe.cq.experiencelog.impl.ExperienceLogConfigServlet": { | ||
"enabled": false | ||
}, | ||
|
||
{{/if ~}} | ||
#end | ||
#if ( $optionWcmioHandler == "y" ) | ||
// Instance type | ||
"io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl": { | ||
"instance.type": "author" | ||
}, | ||
|
||
// Service user mapping for wcm.io Media Handler | ||
"org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-${projectName}-wcmio-handler-media-metadata": { | ||
"user.mapping": [ | ||
"io.wcm.handler.media:dam-rendition-metadata=[dam-writer-service]" | ||
] | ||
}, | ||
|
||
// Support previews of inline images in edit dialogs on Authoring instances for these resource types | ||
"io.wcm.handler.media.impl.InlineImageAuthorPreviewServlet": { | ||
"sling.servlet.resourceTypes": ["wcm-io/wcm/core/components/wcmio/responsiveimage/v1/responsiveimage"] | ||
}, | ||
|
||
#end | ||
}, | ||
|
||
"configurations:publish": { | ||
|
||
#if ( $optionContextAwareConfig == "y" ) | ||
// Disable Configuration Editor on publish | ||
"io.wcm.caconfig.editor.impl.EditorConfig": { | ||
"enabled": false | ||
}, | ||
|
||
#end | ||
// Disable default renderings for Sling GET servlet on publish | ||
"org.apache.sling.servlets.get.DefaultGetServlet": { | ||
"enable.html": "false", | ||
"enable.json": "true", | ||
"enable.txt": "false", | ||
"enable.xml": "false", | ||
"index": "false", | ||
"index.files": ["index","index.html"], | ||
"aliases": "xml:pdf", | ||
"json.maximumresults": 100 | ||
}, | ||
|
||
#if ( $optionWcmioHandler == "y" ) | ||
// Instance type | ||
"io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl": { | ||
"instance.type": "publish" | ||
}, | ||
|
||
#end | ||
}, | ||
|
||
"repoinit": [ | ||
// Create root folder below /apps for application | ||
"create path /apps/${projectName}(sling:Folder)" | ||
] | ||
} |
117 changes: 0 additions & 117 deletions
117
...rc/main/templates/__projectName__-aem-cms/__projectName__-aem-cms-config.provisioning.hbs
This file was deleted.
Oops, something went wrong.