-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This closes #15
- Loading branch information
Showing
19 changed files
with
202 additions
and
9 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
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 |
---|---|---|
|
@@ -163,7 +163,6 @@ modules.xml | |
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?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.cloud.it</groupId> | ||
<artifactId>project1</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
</project> |
7 changes: 7 additions & 0 deletions
7
src/it/project1/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/example"> | ||
</filter> | ||
<filter root="/libs/cq"> | ||
</filter> | ||
</workspaceFilter> |
Empty file.
1 change: 1 addition & 0 deletions
1
src/it/project1/application-package/src/main/jcr_root/libs/cq/test/test.jsp
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 @@ | ||
just an example |
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,26 @@ | ||
<?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.cloud.it</groupId> | ||
<artifactId>project1</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.jackrabbit</groupId> | ||
<artifactId>filevault-package-maven-plugin</artifactId> | ||
<configuration> | ||
<properties> | ||
<installhook.test.class>my.custom.Hook</installhook.test.class> | ||
</properties> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
6 changes: 6 additions & 0 deletions
6
src/it/project1/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,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<workspaceFilter version="1.0"> | ||
<filter root="/content/example"> | ||
</filter> | ||
<filter root="/var/example" /> | ||
</workspaceFilter> |
Binary file added
BIN
+11.1 KB
src/it/project1/content-package/src/main/META-INF/vault/hooks/vault-hook-example-3.0.0.jar
Binary file not shown.
Empty file.
Empty file.
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,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>mixed-package</artifactId> | ||
<packaging>content-package</packaging> | ||
<parent> | ||
<groupId>biz.netcentric.filevault.validator.aem.cloud.it</groupId> | ||
<artifactId>project1</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> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
7 changes: 7 additions & 0 deletions
7
src/it/project1/mixed-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/example"> | ||
</filter> | ||
<filter root="/content/example"> | ||
</filter> | ||
</workspaceFilter> |
Empty file.
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,86 @@ | ||
<?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.cloud.it</groupId> | ||
<artifactId>project1</artifactId> | ||
<packaging>pom</packaging> | ||
<version>1.0.0-SNAPSHOT</version> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<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.1.6</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,/apps/kaw,/etc,/var,/tmp,/conf,/content,/content/campaigns/,/content/cq:tags/,/content/dam,/content/experience-fragments/,/content/projects/,/content/screens/,/etc/packages</validRoots> | ||
</options> | ||
</jackrabbit-filter> | ||
<netcentric-aem-cloud> | ||
<defaultSeverity>warn</defaultSeverity> | ||
</netcentric-aem-cloud> | ||
</validatorsSettings> | ||
</configuration> | ||
<dependencies> | ||
<dependency> | ||
<groupId>biz.netcentric.filevault.validator</groupId> | ||
<artifactId>aem-cloud-validator</artifactId> | ||
<version>@project.version@</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>mixed-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
String buildLog = new File(basedir, 'build.log').text | ||
|
||
assert buildLog.contains('[WARNING] ValidationViolation: "netcentric-aem-cloud: Nodes below \'/libs\' may be overwritten by future product upgrades. Rather use \'/apps\'. Further details at https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/full-stack/overlays.html?lang=en#developing", filePath=jcr_root/libs/cq/test/test.jsp, nodePath=/libs/cq/test/test.jsp') : 'libs violation not found' | ||
assert buildLog.contains('[WARNING] ValidationViolation: "netcentric-aem-cloud: Using mutable nodes in this repository location is not allowed as it is not writable by the underlying service user on publish. Consider to use repoinit scripts instead or move that content to another location. Further details at https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/debugging/debugging-aem-as-a-cloud-service/build-and-deployment.html?lang=en#including-%2Fvar-in-content-package", filePath=jcr_root/var/example/test.txt, nodePath=/var/example/test.txt') : 'read only path in mutable package not detected' | ||
assert buildLog.contains('[WARNING] ValidationViolation: "netcentric-aem-cloud: Using install hooks in mutable content packages leads to deployment failures as the underlying service user on the publish does not have the right to execute those.", filePath=META-INF/vault/hooks/vault-hook-example-3.0.0.jar') : 'external hook violation not found' | ||
assert buildLog.contains('[WARNING] ValidationViolation: "netcentric-aem-cloud: Mutable nodes in mixed package types are not installed!", filePath=jcr_root/content/example/test.txt, nodePath=/content/example/test.txt') : 'mutable content in mixed package not found' |