Maven 2.x Assembly Plugin

FileSet does not support filtering

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.2-beta-1
  • Fix Version/s: 2.2-beta-2
  • Component/s: None
  • Labels:
    None
  • Environment:
    Maven 2.0.4
  • Number of attachments :
    1

Description

For the moment we can only set a filter for one file
<files>
<file>
<source>./src/main/resources/log4j.properties</source>
<outputDirectory>resources</outputDirectory>
<filtered>true</filtered>
</file>
</files>

It would be nice to can do the same for a set of files like this
<fileSet>
<directory>./src/main/resources</directory>
<outputDirectory>resources</outputDirectory>
<includes>
<include>*/.properties</include>
</includes>
<filtered>true</filtered>
</fileSet>

Thanks

Issue Links

Activity

Hide
Mikhail Krangach added a comment -

Hello, All!

This patch solves an issue problem. It simply delegates FileSet filtering and lineEnding to File formating.

Best regards.

Show
Mikhail Krangach added a comment - Hello, All! This patch solves an issue problem. It simply delegates FileSet filtering and lineEnding to File formating. Best regards.
Hide
Stephane Nicoll added a comment -

This sounds to be applicable to unpackOptions as well.

Show
Stephane Nicoll added a comment - This sounds to be applicable to unpackOptions as well.
Hide
Rajesh Arya added a comment -

I would consider a feature such as filtering fileSets a major improvement in the Maven-Assembly-Plugin.

Right now I have got a whole lot of files which are produced by the developer team. They ought to be able to insert ${Variable} in their files.

The "process-resources" lifecycle-goal as well as "assembly:assembly" goal both act on these set of files and prepare them either for the local machine or for distribution purposes.

Now I, who happen to be incharge of the distribution, do not wish to go through these files and see which files are new and need to be included in <files> for filtering, or for that matter which files need to be removed from the descriptor.

So please, please Someone with some brains and motivation ought to look into this feature. It would be a great help.

Show
Rajesh Arya added a comment - I would consider a feature such as filtering fileSets a major improvement in the Maven-Assembly-Plugin. Right now I have got a whole lot of files which are produced by the developer team. They ought to be able to insert ${Variable} in their files. The "process-resources" lifecycle-goal as well as "assembly:assembly" goal both act on these set of files and prepare them either for the local machine or for distribution purposes. Now I, who happen to be incharge of the distribution, do not wish to go through these files and see which files are new and need to be included in <files> for filtering, or for that matter which files need to be removed from the descriptor. So please, please Someone with some brains and motivation ought to look into this feature. It would be a great help.
Hide
Stephane Nicoll added a comment -

you sound like very motivated to me

Show
Stephane Nicoll added a comment - you sound like very motivated to me
Hide
Fabrice Bellingard added a comment -

Mikhail,

thanks for your patch. I wrote a unit test for it, and discovered two bugs, which I fixed. It seems to be working fine now.
I will be doing some more tests, and then apply this in trunk.

Show
Fabrice Bellingard added a comment - Mikhail, thanks for your patch. I wrote a unit test for it, and discovered two bugs, which I fixed. It seems to be working fine now. I will be doing some more tests, and then apply this in trunk.
Hide
Fabrice Bellingard added a comment -

Fixed in trunk.

Show
Fabrice Bellingard added a comment - Fixed in trunk.
Hide
Daniel Spilker added a comment -

Hi Fabrice,

did you also fix this for lineEnding? I just tried the latest 2.2-beta-2-SNAPSHOT and lineEnding is only applied to files and not to filesets.

Regards,
Daniel

Show
Daniel Spilker added a comment - Hi Fabrice, did you also fix this for lineEnding? I just tried the latest 2.2-beta-2-SNAPSHOT and lineEnding is only applied to files and not to filesets. Regards, Daniel

People

Vote (14)
Watch (11)

Dates

  • Created:
    Updated:
    Resolved: