content-package-maven-plugin and filter.xml issue | Community
Skip to main content
New Participant
October 16, 2015
Solved

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

  • October 16, 2015
  • 5 replies
  • 3816 views

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.html

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ove_Lindström

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>  

5 replies

Employee
October 16, 2015

Hi,

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

Justin

New Participant
October 16, 2015

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ömAccepted solution
New Participant
October 16, 2015

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>  
New Participant
October 16, 2015

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.html

New Participant
October 16, 2015

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