Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
453 stars 600 forks source link

versioned-clientlibs transformer factory should remain active on AEMaaCS but create a no-op transformer #2508

Closed adamcin closed 3 years ago

adamcin commented 3 years ago

Required Information

Expected Behavior

For a project code base that supports both classic and cloud service distributions, it is very challenging to structure a content package hierarchy in a convenient way that allows for deployments to both platforms in parallel, to a local cloud SDK, if that code base includes a config/rewriter override in /apps that includes the versioned-clientlibs transformer. This transformer may be needed in AEM classic installations that are either too old to have the HTML Library Manager rewrite functionality. These code bases should expect more graceful behavior for a lack of support for the versioned-clientlibs functionality than a completely blank page, when conceptually, the OSGi service can be responsible for opting out with a simple log statement at activation.

Actual Behavior

When a config/rewriter node referencing the versioned-clientlibs transformer is deployed to a cloud service instance or a cloud sdk instance, the transformer engine fails to satisfy the service reference and causes all requests to be rendered blank.

Steps to Reproduce

See above.

adamcin commented 3 years ago

After writing this up I realized that multi-distribution projects can easily provide their own implementation of this replacement transformer factory.