Skip to content

Commit dd7e51e

Browse files
authored
Create dedicated Oak index definition for AEM as a Cloud Service (#550)
Update to the newest filevault-package-maven-plugin 1.1.6 This closes #549
1 parent 964c729 commit dd7e51e

File tree

13 files changed

+139
-93
lines changed

13 files changed

+139
-93
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ You can get the content package containing the [index definition](http://jackrab
5353
<groupId>biz.netcentric.cq.tools.accesscontroltool</groupId>
5454
<artifactId>accesscontroltool-oakindex-package</artifactId>
5555
```
56+
(for AEM Classic/On Premise) or
57+
58+
```
59+
<groupId>biz.netcentric.cq.tools.accesscontroltool</groupId>
60+
<artifactId>accesscontroltool-oakindex-package</artifactId>
61+
<classifier>cloud</classifier>
62+
```
63+
(for AEM as a Cloud Service)
5664

5765
Install it afterwards e.g. via AEM's package manager.
5866

accesscontroltool-apps-package/pom.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,22 @@
3434
<artifactId>filevault-package-maven-plugin</artifactId>
3535
<configuration>
3636
<packageType>application</packageType>
37-
<!-- filter roots are not given in any dependency -->
38-
<failOnDependencyErrors>false</failOnDependencyErrors>
3937
<properties>
4038
<!-- ACLs are included to show AC Tool by default only to admin -->
4139
<acHandling>merge_preserve</acHandling>
4240
</properties>
41+
<validatorsSettings>
42+
<jackrabbit-filter>
43+
<options>
44+
<validRoots>/apps/netcentric/actool,/apps/cq/core/content</validRoots>
45+
</options>
46+
</jackrabbit-filter>
47+
<jackrabbit-packagetype>
48+
<options>
49+
<allowComplexFilterRulesInApplicationPackages>true</allowComplexFilterRulesInApplicationPackages>
50+
</options>
51+
</jackrabbit-packagetype>
52+
</validatorsSettings>
4353
</configuration>
4454
</plugin>
4555
<plugin>

accesscontroltool-apps-package/src/main/META-INF/vault/filter.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<include pattern="/apps/cq/core/content/nav"/>
99
<include pattern="/apps/cq/core/content/nav/tools"/>
1010
<include pattern="/apps/cq/core/content/nav/tools/security"/>
11-
<include pattern="/apps/cq/core/content/nav/tools/security/actool"/>
11+
<include pattern="/apps/cq/core/content/nav/tools/security/actool(.*)?"/>
1212
</filter>
1313
</workspaceFilter>

accesscontroltool-content-package/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
<properties>
3838
<acHandling>merge_preserve</acHandling>
3939
</properties>
40+
<validatorsSettings>
41+
<jackrabbit-nodetypes>
42+
<!-- disable due to https://issues.apache.org/jira/browse/JCRVLT-497 -->
43+
<isDisabled>true</isDisabled>
44+
</jackrabbit-nodetypes>
45+
</validatorsSettings>
4046
</configuration>
4147
</plugin>
4248
<plugin>

accesscontroltool-oakindex-package/pom.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,37 @@
3737
<group>Netcentric</group>
3838
<filterSource>src/main/META-INF/vault/filter.xml</filterSource>
3939
<allowIndexDefinitions>true</allowIndexDefinitions>
40+
<!-- overwrite (compare with https://issues.apache.org/jira/browse/JCRVLT-496) -->
41+
<packageType>application</packageType>
42+
<validatorsSettings>
43+
<jackrabbit-packagetype>
44+
<!-- https://issues.apache.org/jira/browse/JCRVLT-496 -->
45+
<isDisabled>true</isDisabled>
46+
</jackrabbit-packagetype>
47+
</validatorsSettings>
4048
</configuration>
49+
<executions>
50+
<execution>
51+
<id>generate-metadata-for-cloud</id>
52+
<goals>
53+
<goal>generate-metadata</goal>
54+
</goals>
55+
<configuration>
56+
<classifier>cloud</classifier>
57+
</configuration>
58+
</execution>
59+
<execution>
60+
<id>package-for-cloud</id>
61+
<goals>
62+
<goal>package</goal>
63+
</goals>
64+
<configuration>
65+
<classifier>cloud</classifier>
66+
<!-- due to https://issues.apache.org/jira/browse/JCRVLT-498 -->
67+
<workDirectory>${project.build.directory}/vault-work-cloud</workDirectory>
68+
</configuration>
69+
</execution>
70+
</executions>
4171
</plugin>
4272

4373
<plugin>

accesscontroltool-oakindex-package/src/main/META-INF/vault/config.xml

Lines changed: 0 additions & 77 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<workspaceFilter version="1.0">
3-
<filter root="/oak:index/repACL"/>
3+
<filter root="/oak:index/repACL-custom-1"/>
44
</workspaceFilter>

accesscontroltool-oakindex-package/src/main/META-INF/vault/settings.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0"
3+
jcr:primaryType="nt:unstructured"/>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<jcr:root xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal"
3+
jcr:primaryType="oak:QueryIndexDefinition"
4+
async="async"
5+
compatVersion="{Long}2"
6+
type="lucene">
7+
<indexRules jcr:primaryType="nt:unstructured">
8+
<rep:ACL jcr:primaryType="nt:unstructured">
9+
<properties jcr:primaryType="nt:unstructured">
10+
<primaryType
11+
jcr:primaryType="nt:unstructured"
12+
name="jcr:primaryType"
13+
propertyIndex="{Boolean}true"/>
14+
<mixinTypes
15+
jcr:primaryType="nt:unstructured"
16+
name="jcr:mixinTypes"
17+
propertyIndex="{Boolean}true"/>
18+
</properties>
19+
</rep:ACL>
20+
</indexRules>
21+
</jcr:root>

0 commit comments

Comments
 (0)