maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <>
Subject [jira] Commented: (MASSEMBLY-528) FileSet does not support filtering (again)
Date Sun, 20 Feb 2011 12:54:22 GMT


Dennis Lundberg commented on MASSEMBLY-528:

Thanks for the sample project Marc!

Background on versions

Assembly plugin 2.2-beta-5 uses maven-filtering 1.0-beta-2,
Assembly Plugin 2.2 uses maven-filtering 1.0-beta-4.

The problem

When filtering more than one file, only the first file is filtered. This is highlighted by
the sample project. Look at the file target\MASSEMBLY-528-1.0-SNAPSHOT_without-assembly-filter\
after the build. It has not had the value for ${} injected.

The cause

In [r809265|] the following
change was made to the file DefaultMavenFileFilter in maven-filtering.
            loadProperties( filterProperties, mavenProject.getBuild().getFilters(), baseProps
            if ( request.isInjectProjectBuildFilters() )
                List buildFilters = request.getMavenProject().getBuild().getFilters();
                buildFilters.removeAll( request.getFileFilters() );
                loadProperties( filterProperties, buildFilters, baseProps );

What happens here is that filters are removed from the MavenProject. So after this code has
been called the first time, to actual Maven Project has changed! My tests so far indicate
that in a project where only build/filters are used they all gets nuked by this, resulting
in only the first file being filtered.


Making sure that we work on a copy of the project's filters like this:
                List buildFilters = new ArrayList(request.getMavenProject().getBuild().getFilters());

Comments and feedback are most welcome.

I have integration tests in the works for the Assembly Plugin.

> FileSet does not support filtering (again)
> ------------------------------------------
>                 Key: MASSEMBLY-528
>                 URL:
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: Maik Richey
>            Assignee: John Casey
>            Priority: Critical
>             Fix For: 2.2.1
>         Attachments:
> After switching to version 2.2 of the Assembly Plugin filtering for FileSets does not
work again as in versions prior to 2.2-beta-3.
> Can anybody confirm this issue?

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message