How to deploy rep: policy files via maven?

I added additional ACLs for / home / groups and / home / users, adding _rep_policy.xml files for each, but cannot force them to expand. I added the following lines to my filter.xml store

<filter root="/home/users/rep:policy" mode="replace"/> <filter root="/home/groups/rep:policy" mode="replace"/> 

Both have the following contents:

 <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" jcr:primaryType="rep:ACL"> <allow jcr:primaryType="rep:GrantACE" rep:principalName="everyone" rep:privileges="{Name}[jcr:read]"/> </jcr:root> 

But when I start maven, I see that everything around them is expanding, but not these two. If I try to install a package directly through the package manager, it only works if I set the access control processing to "Replace". I do not know how to configure this in maven.

+6
source share
3 answers

Package properties are configured in the configuration section of the storage plugin in POM. To enable ACL import in a package, add the following configurations to the POM

 <configuration> <properties> <acHandling>Overwrite</acHandling> </properties> </configuration> 

The documentation for the storage plugin is at http://docs.adobe.com/docs/en/cq/5-6-1/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.html

+5
source

so this will correctly answer once and for all ... update the pom build plugin "com.day.jcr.vault":

 <plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <version>0.0.24</version> <extensions>true</extensions> <configuration> <failOnError>true</failOnError> <username>${crx.username}</username> <password>${crx.password}</password> <properties> <acHandling>merge_preserve</acHandling> </properties> </configuration> </plugin> 

AcHandling options: - ignore - overwrite - merge - merge_preserve - clear

+3
source

A small addition:

The acHandling parameters are not documented in the maven plugin, but in the documentation for the aem and jackrabbit packages.

https://docs.adobe.com/docs/en/aem/6-2/administer/content/package-manager.html as well as https://jackrabbit.apache.org/filevault/apidocs/org/apache/jackrabbit /vault/fs/io/AccessControlHandling.html

content-package-maven-plugin simply provides access to all package settings.

0
source

Source: https://habr.com/ru/post/985386/


All Articles