Hi there people,
Thanks for your help. We've been able to solve the problem by doing the following:
1) First, in `ui.content`'s folder `pom.xml` file, we had to add the `properties` configuration to the Vault Package Plugin. We are using `Overwrite` here, but `MergePreserve` may be a better option:
<build>
...
<plugins>
...
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
...
<configuration>
<properties>
<acHandling>Overwrite</acHandling>
</properties>
</configuration>
...
</plugin>
...
</plugins>
...
</build>
2) Second, we had to create a `_rep_policy.xml` file for each of the following paths:
- /conf/oursite/settings/wcm/policies/_rep_policy.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:crx="http://www.day.com/crx/1.0" 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]"/>
<allow1
jcr:primaryType="rep:GrantACE"
rep:principalName="content-authors"
rep:privileges="{Name}[crx:replicate]"/>
<allow2
jcr:primaryType="rep:GrantACE"
rep:principalName="template-authors"
rep:privileges="{Name}[jcr:versionManagement,crx:replicate,rep:write,jcr:lockManagement]"/>
</jcr:root>
- /conf/oursite/settings/wcm/template-types/_rep_policy.xml
<?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="template-authors"
rep:privileges="{Name}[jcr:read]"/>
</jcr:root>
- /conf/oursite/settings/wcm/template/_rep_policy.xml
<?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="anonymous"
rep:privileges="{Name}[jcr:read]"/>
<allow1
jcr:primaryType="rep:GrantACE"
rep:principalName="everyone"
rep:privileges="{Name}[jcr:read]"/>
<allow2
jcr:primaryType="rep:GrantACE"
rep:principalName="content-authors"
rep:privileges="{Name}[crx:replicate]"/>
<allow3
jcr:primaryType="rep:GrantACE"
rep:principalName="template-authors"
rep:privileges="{Name}[jcr:versionManagement,crx:replicate,rep:write,jcr:lockManagement]"/>
</jcr:root>
3) After changing the pom and adding the code above, just build your project normally and install it at your author's instance. Then, go to Package Manager and replicate the installed packages as normal;
3) And finally, you have to go to the authoring environment:
a) Go to Templates section, choose the desired template, do some change in any of the policies for any of the components (or just add a fake one);
b) Publish the changes.
4) That's what we had to do.
It is a little bit pain in the a*s, because we didn't find any documentation available, and we tried to get some idea looking at the We Retail code.
I also don't know if there is a better way doing it, but it worked for us.