Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

content-package-maven-plugin and filter.xml issue

Avatar

Level 4

Hi!

I've a question regarding content-package-maven-plugin.

I'm using the 'multimodule-content-package-archetype' provided by Adobe, and I've followed the instructions provided in [1].

So, I've META-INF/vault/filter.xml like:

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
    <filter root="/apps/myproject"/>
</workspaceFilter>

And META-INF/vault/filter-vlt.xml like:

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
    <filter root="/libs/foundation"/>
    <filter root="/apps/myproject"/>
</workspaceFilter>

But when I 'mvn -PautoInstallPackage clean install', there is the /libs folder in the package zip file (which it's not expected, because /libs is not included in filter.xml file).

I've tried to apply the filters in POM, as well, but with no results. And I've checked also the documentation in [2].

Somebody with the same issue? Maybe there's a mistake in the documentation?

Any help will be very appreciated! ;-)

[1] http://dev.day.com/docs/en/cq/aem-how-tos/development/how-to-build-aem-projects-using-apache-maven.h...

[2] http://dev.day.com/docs/en/cq/current/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.html

1 Accepted Solution

Avatar

Correct answer by
Level 6

Why do you want to include it in the first place?

I think that you have to filter it out of the maven build.

<resource> <directory>src/main/content/jcr_root</directory> <includes> <include>apps/**</include> </includes> <excludes> <exclude>libs/foundation/**</exclude> </excludes> </resource>  

View solution in original post

5 Replies

Avatar

Employee

Hi,

The filter.xml file does not impact the contents of the package zip file. It is used when the package is installed.

Justin

Avatar

Level 4

justin_at_adobe wrote...

Hi,

The filter.xml file does not impact the contents of the package zip file. It is used when the package is installed.

Justin

 

Hi Justin.

You're right. Now I know it :-)

Is there any way to not to include /libs/foundation in the package?

Thank you!

Avatar

Correct answer by
Level 6

Why do you want to include it in the first place?

I think that you have to filter it out of the maven build.

<resource> <directory>src/main/content/jcr_root</directory> <includes> <include>apps/**</include> </includes> <excludes> <exclude>libs/foundation/**</exclude> </excludes> </resource>  

Avatar

Level 4

Hi Ove!

I included /libs/foundation for a compilation issue, following the instructions of Ben Peter, the guy who is answering the user coments in [1]. You could see my second post in [1], in the users coments section.

Thank you very much for your response.

[1] http://dev.day.com/docs/en/cq/aem-how-tos/development/how-to-build-aem-projects-using-apache-maven.h...

Avatar

Level 6

Ah, I have missed that part but is solved some problems for us that we have been annoyed about. Will create a module of its own that contain the current /lib.

 

/O