if (resourceGuard instanceof SecurePackageResourceGuard) {
SecurePackageResourceGuard securePackageResourceGuard = (SecurePackageResourceGuard) resourceGuard;
securePackageResourceGuard.addPattern("+*.less");
}
ResourceReferenceRegistry resourceReferenceRegistry = app.getResourceReferenceRegistry();
IResourceReferenceFactory delegate = resourceReferenceRegistry.getResourceReferenceFactory();
resourceReferenceRegistry.setResourceReferenceFactory(new LessResourceReferenceFactory(delegate));
}