Hi all,
Some component folders under /apps/myproject/components aren’t getting deployed even though they exist in ui.apps/src/main/content/jcr_root/apps/myproject/components.
Here’s my filter.xml:
<workspaceFilter version="1.0">
<filter root="/apps/myproject"/>
<filter root="/content/myproject"/>
</workspaceFilter>I rebuilt (mvn clean install) and redeployed to local + Cloud, but still missing those folders.
Could this be due to how filter.xml handles subpaths or exclusions?
Do I need to explicitly include those component paths or adjust filters to fix it?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @garimak,
Yes, this is very likely related to how your filter.xml is configured.
When you use only a top-level filter like:
<filter root="/apps/myproject"/>
AEM includes only the files that exist under that exact path in your package at build time. If certain subfolders (e.g., /apps/myproject/components/page) are missing in your built ZIP, it usually means one of the following:
1. Files not included in the package build
Check whether these folders are actually being packaged inside:
ui.apps/target/<package-name>.zip
Open it with 7zip or WinRAR and verify the missing paths.
If they’re not there, Maven isn’t picking them up — often due to .content.xml missing or ignored files.
2. Missing jcr_root or .content.xml
Each folder you want deployed must either:
Contain a .content.xml file, or
Be under a folder that does.
Without .content.xml, AEM doesn’t recognize it as a node during deployment.
Fix: Add an empty .content.xml in those folders:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="nt:folder"/>
3. Use explicit filters for reliability
It’s best practice to declare filters for each app/content path that needs to be deployed:
<workspaceFilter version="1.0">
<filter root="/apps/myproject/components"/>
<filter root="/apps/myproject/config"/>
<filter root="/content/myproject"/>
</workspaceFilter>
This ensures AEM doesn’t skip nested paths or treat them as external.
Hi @garimak
Include "/components" in your filter file as mentioned below.
<workspaceFilter version="1.0">
<filter root="/apps/myproject/components"/>
</workspaceFilter>
Hi @garimak
If your components are deeper than apps/myproject (for example, apps/myproject/clientlibs and apps/myproject/components exist under different modules), split filters explicitly:
<filter root="/apps/myproject/components"/>
<filter root="/apps/myproject/clientlibs"/>
<filter root="/content/myproject"/>
This guarantees inclusion if something else interferes with /apps/myproject broadly.
If after checking you still get missing subfolders, inspect the .content.xml inside each component - a malformed <jcr:primaryType> or typo can prevent installation. Check the error.log to find out if there is any build issue.
Hi @garimak,
Yes, this is very likely related to how your filter.xml is configured.
When you use only a top-level filter like:
<filter root="/apps/myproject"/>
AEM includes only the files that exist under that exact path in your package at build time. If certain subfolders (e.g., /apps/myproject/components/page) are missing in your built ZIP, it usually means one of the following:
1. Files not included in the package build
Check whether these folders are actually being packaged inside:
ui.apps/target/<package-name>.zip
Open it with 7zip or WinRAR and verify the missing paths.
If they’re not there, Maven isn’t picking them up — often due to .content.xml missing or ignored files.
2. Missing jcr_root or .content.xml
Each folder you want deployed must either:
Contain a .content.xml file, or
Be under a folder that does.
Without .content.xml, AEM doesn’t recognize it as a node during deployment.
Fix: Add an empty .content.xml in those folders:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="nt:folder"/>
3. Use explicit filters for reliability
It’s best practice to declare filters for each app/content path that needs to be deployed:
<workspaceFilter version="1.0">
<filter root="/apps/myproject/components"/>
<filter root="/apps/myproject/config"/>
<filter root="/content/myproject"/>
</workspaceFilter>
This ensures AEM doesn’t skip nested paths or treat them as external.
Views
Likes
Replies