Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Julio_Baixauli
Level 4
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
Ove_Lindström
Correct answer by
Level 6
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
justin_at_adobe
Employee
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

Julio_Baixauli
Level 4
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!

Ove_Lindström
Correct answer by
Level 6
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

Julio_Baixauli
Level 4
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...

Ove_Lindström
Level 6
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