-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Never emit validation errors for default config
Add IT to verify this behaviour described in the readme This closes #2
- Loading branch information
Showing
23 changed files
with
332 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>application-package</artifactId> | ||
<packaging>content-package</packaging> | ||
<parent> | ||
<groupId>biz.netcentric.filevault.validator.aem.namespace.it</groupId> | ||
<artifactId>no-config</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.jackrabbit</groupId> | ||
<artifactId>filevault-package-maven-plugin</artifactId> | ||
<configuration> | ||
<packageType>mixed</packageType><!-- due to oak index --> | ||
<allowIndexDefinitions>true</allowIndexDefinitions> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
7 changes: 7 additions & 0 deletions
7
src/it/no-config/application-package/src/main/META-INF/vault/filter.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<workspaceFilter version="1.0"> | ||
<filter root="/apps/mytenant"> | ||
</filter> | ||
<filter root="/oak:index/mytenant-custom-1"> | ||
</filter> | ||
</workspaceFilter> |
4 changes: 4 additions & 0 deletions
4
src/it/no-config/application-package/src/main/jcr_root/_oak_index/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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" | ||
jcr:mixinTypes="[rep:AccessControllable]" | ||
jcr:primaryType="nt:unstructured"/> |
11 changes: 11 additions & 0 deletions
11
...no-config/application-package/src/main/jcr_root/_oak_index/mytenant-custom-1/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
xmlns:nt="http://www.jcp.org/jcr/nt/1.0" | ||
jcr:primaryType="oak:QueryIndexDefinition" | ||
type="lucene" | ||
async="async" | ||
compatibilityMode="cloud" | ||
evaluatePathRestrictions="{Boolean}true" | ||
reindex="{Boolean}false" | ||
includedPaths="[/content/mytenant/something]"> | ||
</jcr:root> |
3 changes: 3 additions & 0 deletions
3
...no-config/application-package/src/main/jcr_root/apps/mytenant/_sling_configs/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="sling:Folder"/> |
8 changes: 8 additions & 0 deletions
8
...ant/_sling_configs/com.adobe.cq.wcm.core.components.internal.DataLayerConfig/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="cq:Page"> | ||
<jcr:content | ||
jcr:primaryType="cq:PageContent" | ||
sling:configPropertyInherit="{Boolean}false" | ||
enabled="{Boolean}true"/> | ||
</jcr:root> |
4 changes: 4 additions & 0 deletions
4
...no-config/application-package/src/main/jcr_root/apps/mytenant/clientlibrary1/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="cq:ClientLibraryFolder" | ||
categories="[mytenant-librarya,mytenant-libraryb]"/> |
5 changes: 5 additions & 0 deletions
5
...ig/application-package/src/main/jcr_root/apps/mytenant/components/component1/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:primaryType="sling:Folder" | ||
sling:resourceType="/apps/othertenant/components/component2" | ||
sling:resourceSuperType="/apps/othertenant/components/component1"/> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>container-package</artifactId> | ||
<packaging>content-package</packaging> | ||
<parent> | ||
<groupId>biz.netcentric.filevault.validator.aem.namespace.it</groupId> | ||
<artifactId>no-config</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.jackrabbit</groupId> | ||
<artifactId>filevault-package-maven-plugin</artifactId> | ||
<configuration> | ||
<packageType>container</packageType> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
5 changes: 5 additions & 0 deletions
5
src/it/no-config/container-package/src/main/META-INF/vault/filter.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<workspaceFilter version="1.0"> | ||
<filter root="/apps/mytenant/config"> | ||
</filter> | ||
</workspaceFilter> |
4 changes: 4 additions & 0 deletions
4
...package/src/main/jcr_root/apps/mytenant/config/com.example.mytenant.MyComponent2.cfg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"myproperty1": "myvalue1", | ||
"myproperty2": 2 | ||
} |
4 changes: 4 additions & 0 deletions
4
...age/src/main/jcr_root/apps/mytenant/config/com.example.mytenant.MyComponent~name.cfg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"myproperty1": "myvalue1", | ||
"myproperty2": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>content-package</artifactId> | ||
<packaging>content-package</packaging> | ||
<parent> | ||
<groupId>biz.netcentric.filevault.validator.aem.namespace.it</groupId> | ||
<artifactId>no-config</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.jackrabbit</groupId> | ||
<artifactId>filevault-package-maven-plugin</artifactId> | ||
<configuration> | ||
<packageType>content</packageType> | ||
<properties> | ||
<installhook.test.class>my.custom.Hook</installhook.test.class> | ||
</properties> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
7 changes: 7 additions & 0 deletions
7
src/it/no-config/content-package/src/main/META-INF/vault/filter.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<workspaceFilter version="1.0"> | ||
<filter root="/home/users/mytenant"> | ||
</filter> | ||
<filter root="/conf/mytenant"> | ||
</filter> | ||
</workspaceFilter> |
12 changes: 12 additions & 0 deletions
12
src/it/no-config/content-package/src/main/jcr_root/conf/mytenant/my-segment/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" | ||
jcr:primaryType="cq:Page"> | ||
<jcr:content | ||
cq:lastModified="{Date}2024-05-13T13:00:57.908+02:00" | ||
cq:lastModifiedBy="admin" | ||
jcr:primaryType="cq:PageContent" | ||
jcr:title="new segment" | ||
sling:resourceType="/apps/mytenant2/components/segment-page" | ||
segmentBoost="{Long}0" | ||
segmentName="new-segment"> | ||
</jcr:content> | ||
</jcr:root> |
9 changes: 9 additions & 0 deletions
9
src/it/no-config/content-package/src/main/jcr_root/home/users/mytenant/myuser/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal" | ||
jcr:mixinTypes="[rep:AccessControllable]" | ||
jcr:primaryType="rep:User" | ||
jcr:uuid="2205dd08-d7c3-3d26-8bf8-ac538edd4bc2" | ||
rep:authorizableId="mytenant-myuser" | ||
rep:password="\{SHA-256}e106977a40196b0e-1000-e6d77348c0f254143bf7e42646eba07784770044e3d98dc63677c95ad0af24d3" | ||
rep:principalName="mytenant-myuser"> | ||
</jcr:root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
invoker.debug = false | ||
invoker.buildResult = success | ||
invoker.goals = clean verify -fae -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>biz.netcentric.filevault.validator.aem.namespace.it</groupId> | ||
<artifactId>no-config</artifactId> | ||
<packaging>pom</packaging> | ||
<version>1.0.0-SNAPSHOT</version> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-clean-plugin</artifactId> | ||
<version>3.1.0</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-install-plugin</artifactId> | ||
<version>3.0.0-M1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>3.0.0-M1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>3.2.0</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.8.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>3.0.0-M5</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.jackrabbit</groupId> | ||
<artifactId>filevault-package-maven-plugin</artifactId> | ||
<version>1.4.0</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<failOnDuplicateEntries>false</failOnDuplicateEntries> | ||
<filterSource>src/main/META-INF/vault/filter.xml</filterSource> | ||
<validatorsSettings> | ||
<jackrabbit-filter> | ||
<!-- define additional valid roots which are always provided in AEM --> | ||
<options> | ||
<validRoots>/,/libs,/apps,/oak:index,/etc,/var,/tmp,/conf,/content,/content/campaigns,/content/cq:tags,/content/dam,/content/experience-fragments,/content/projects,/content/screens,/etc/packages,/home/users</validRoots> | ||
<severityForUncoveredAncestorNodes>DEBUG</severityForUncoveredAncestorNodes> | ||
</options> | ||
</jackrabbit-filter> | ||
<jackrabbit-nodetypes> | ||
<options> | ||
<cnds>tccl:aem.cnd</cnds> | ||
</options> | ||
</jackrabbit-nodetypes> | ||
<jackrabbit-packagetype> | ||
<options> | ||
<legacyTypeSeverity>DEBUG</legacyTypeSeverity> | ||
</options> | ||
</jackrabbit-packagetype> | ||
</validatorsSettings> | ||
</configuration> | ||
<dependencies> | ||
<dependency> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<version>@project.version@</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>biz.netcentric.aem</groupId> | ||
<artifactId>aem-nodetypes</artifactId> | ||
<version>2023.10.0</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
|
||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<!-- this profile is active for content-packages only --> | ||
<id>packaging-contentpackage</id> | ||
<!-- profile inheritance does not work in Maven (https://issues.apache.org/jira/browse/MNG-5127) | ||
therefore the activation section needs to be copied from cq-parent --> | ||
<activation> | ||
<file> | ||
<exists>${basedir}/src/main/jcr_root</exists> | ||
</file> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.jackrabbit</groupId> | ||
<artifactId>filevault-package-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
<modules> | ||
<module>application-package</module> | ||
<module>content-package</module> | ||
<module>container-package</module> | ||
</modules> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.