Interesting Error with filevault-package-maven-plugin:1.0.3:generate-metadata | Community
Skip to main content
Giancarlo_at_KD
Level 2
January 12, 2020
Solved

Interesting Error with filevault-package-maven-plugin:1.0.3:generate-metadata

  • January 12, 2020
  • 2 replies
  • 16799 views

Has anyone experienced an error when doing a maven build?

My project structure is common stuff:

/ /apps /conf

The filter.xml in /META-INF/vault/filter.xml

<?xml version="1.0" encoding="UTF-8"?> <workspaceFilter version="1.0"> <filter root="/conf/testproj" mode="merge"/> <filter root="/apps/testproj" mode="merge"/> </workspaceFilter>

After doing a maven build (clean, then install) the error is

[INFO] Loading filter from /projects/my-view/src/main/content/META-INF/vault/filter.xml [ERROR] 1 error(s) detected during dependency analysis. 1 error(s) detected during dependency analysis. Filter root's ancestor '/conf' is not covered by any of the specified dependencies.

Not sure if the error message makes sense, since I have no dependencies on the view (or ui.apps). This behavior was reported already for the vault plugin 0.5.4.

Interesting is, that if I create a different Maven module, like e.g. ui.content, add a pom-dependency to the view (or ui.apps), manage /conf with that module, then the vault plugin seems to work.

 

Therefore my question: Is there indeed a dependency error (what dependency are we talking about) or is this a bug similar to what was reported for the vault plugin 0.5.4?

Best answer by Giancarlo_at_KD

Seems I can answer my own question...
In the AEM Maven archetype 22 there is a module called repository-structure. The module's description says it all:

Empty package that defines the structure of the Adobe Experience Manager repository the Code packages in this project deploy into.
Any roots in the Code packages of this project should have their parent enumerated in the Filters list below.

You have to define the /conf as "root":

<build>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<properties>
<cloudManagerTarget>none</cloudManagerTarget>>
</properties>
<filters>

<!-- /apps root -->
<filter><root>/apps</root></filter>

<!-- Common overlay roots -->
<filter><root>/apps/sling</root></filter>
<filter><root>/apps/cq</root></filter>
<filter><root>/apps/dam</root></filter>
<filter><root>/apps/wcm</root></filter>
<filter><root>/apps/msm</root></filter>

<!-- Immutable context-aware configurations -->
<filter><root>/apps/settings</root></filter>

<filter><root>/conf</root></filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>

Now building the view (or ui.apps) module in which /conf is treated like a code folder, e.g. for editable templates, the Maven build will work with no errors.

 

So no bug, just the typical "Saturday night disturbances"...

2 replies

Giancarlo_at_KD
Giancarlo_at_KDAuthorAccepted solution
Level 2
January 12, 2020

Seems I can answer my own question...
In the AEM Maven archetype 22 there is a module called repository-structure. The module's description says it all:

Empty package that defines the structure of the Adobe Experience Manager repository the Code packages in this project deploy into.
Any roots in the Code packages of this project should have their parent enumerated in the Filters list below.

You have to define the /conf as "root":

<build>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<properties>
<cloudManagerTarget>none</cloudManagerTarget>>
</properties>
<filters>

<!-- /apps root -->
<filter><root>/apps</root></filter>

<!-- Common overlay roots -->
<filter><root>/apps/sling</root></filter>
<filter><root>/apps/cq</root></filter>
<filter><root>/apps/dam</root></filter>
<filter><root>/apps/wcm</root></filter>
<filter><root>/apps/msm</root></filter>

<!-- Immutable context-aware configurations -->
<filter><root>/apps/settings</root></filter>

<filter><root>/conf</root></filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>

Now building the view (or ui.apps) module in which /conf is treated like a code folder, e.g. for editable templates, the Maven build will work with no errors.

 

So no bug, just the typical "Saturday night disturbances"...

fabianh12876403
Level 2
July 6, 2020
But this will overwrite the whole /conf folder. So if you have other projects with editable templates, they will not exists anymore, after installation. I've tested it on AEM 6.4.8.1. I'm still searching for a solution.
July 10, 2024

trying to help out anyone stuck with this: 

per the pom in the wknd guide see validatorSettings:



<plugin> <groupId>org.apache.jackrabbit</groupId> <artifactId>filevault-package-maven-plugin</artifactId> <configuration> <properties> <cloudManagerTarget>none</cloudManagerTarget> </properties> <group>com.adobe.aem.guides</group> <name>aem-guides-wknd.ui.content</name> <packageType>content</packageType> <accessControlHandling>merge</accessControlHandling> <validatorsSettings> <!-- disable nodetype validation as workaround until JCRVLT-463 got fixed --> <jackrabbit-nodetypes> <isDisabled>true</isDisabled> </jackrabbit-nodetypes> <jackrabbit-filter> <options> <validRoots>/conf,/content,/content/experience-fragments,/content/dam,/content/cq:tags</validRoots> </options> </jackrabbit-filter> </validatorsSettings>

re: https://github.com/adobe/aem-guides-wknd/blob/main/ui.content/pom.xml 

 

This ultimately worked for me to define a single scope filter once the root was defined. 

<plugin> <groupId>org.apache.jackrabbit</groupId> <artifactId>filevault-package-maven-plugin</artifactId> <configuration> <properties> <cloudManagerTarget>none</cloudManagerTarget> </properties> <filters> <!-- filter root --> <filter><root>/apps/some/path/my-scoped-filter-package-path</root></filter> </filters> <validatorsSettings> <!-- disable nodetype validation as workaround until JCRVLT-463 got fixed --> <jackrabbit-nodetypes> <isDisabled>true</isDisabled> </jackrabbit-nodetypes> <jackrabbit-filter> <options> <validRoots>/apps/some/path</validRoots> </options> </jackrabbit-filter> </validatorsSettings> <group>com.my.org</group> <name>my.ui.apps</name> <packageType>application</packageType> </configuration> </plugin>

 

Note: this project had no pre-existing filter.xml as a reference it's all defined in the pom.xml spec and gets generated when maven builds the package. 

April 18, 2025

I was trying to embed the wknd shared app in to my project by following instructions mentioned here adobe/aem-guides-wknd-shared

However , I faced the below error 

[ERROR] ValidationViolation: Node '/apps/wknd-vendor-packages/content/install/aem-guides-wknd-shared.ui.content-3.1.0.zip' is not contained in any of the filter rules @ jcr_root\apps\wknd-vendor-packages\content\install\aem-guides-wknd-shared.ui.content-3.1.0.zip, validator: jackrabbit-filter [WARNING] ValidationViolation: Property 'jcr:data' [Binary] is not allowed in node with potential default types [nt:folder]: No applicable property definition found for name and type! @ jcr_root\apps\wknd-vendor-packages\content\install\aem-guides-wknd-shared.ui.content-3.1.0.zip, validator: jackrabbit-nodetypes, JCR node path: /apps/wknd-vendor-packages/content/install/aem-guides-wknd-shared.ui.content-3.1.0.zip

Solved by simply adding the filter path (

/apps/wknd-vendor-packages/content/install/) in to all\src\main\content\META-INF\vault\filter.xml

 

<?xml version="1.0" encoding="UTF-8"?> <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Copyright 2019 Adobe ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> <workspaceFilter version="1.0"> <filter root="/apps/wknd-app-packages"/> <filter root="/apps/wknd-app-vendor-packages" mode="merge"/> <filter root="/apps/wknd-vendor-packages/content/install/" mode="merge"/> </workspaceFilter>