You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2019/12/23 01:27:00 UTC

[jira] [Resolved] (MASSEMBLY-752) [PATCH] Option to ignore empty directories in fileSet directory

     [ https://issues.apache.org/jira/browse/MASSEMBLY-752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Elliotte Rusty Harold resolved MASSEMBLY-752.
---------------------------------------------
    Resolution: Won't Do

> [PATCH] Option to ignore empty directories in fileSet directory
> ---------------------------------------------------------------
>
>                 Key: MASSEMBLY-752
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-752
>             Project: Maven Assembly Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.5.3
>            Reporter: Guillaume Boué
>            Priority: Major
>         Attachments: MASSEMBLY-ignoreEmptyDirectories.patch
>
>
> When the directory attribute of fileSets contains empty directories, it would be nice to have an option to ignore them.
> ======= Actual behaviour =======
> Considering the structure :
> {noformat}
> src/
>        +-- folder1/file.txt
>        +-- folder2/
> {noformat}
> with the following fileSet in {{assembly.xml}} :
> {code:xml}
> <fileSet>
>     <directory>src</directory>
>     <outputDirectory>/</outputDirectory>
> </fileSet>
> {code}
> the assembly-plugin produces, as of today :
> {noformat}
> /folder1/file.txt
> /folder2
> {noformat}
> Note that the empty directory folder2 is present in the assembly.
> ======= Proposed enhancement =======
> With this enhancement, it would be possible to have the following in {{assembly.xml}} :
> {code:xml}
> <fileSet>
>     <directory>src</directory>
>     <outputDirectory>/</outputDirectory>
>     <includeEmptyDirectories>false</includeEmptyDirectories>
> </fileSet>
> {code}
> and the resulting assembly would be :
> {noformat}
> /folder1/file.txt
> {noformat}
> Note that folder2 would not be present inside the assembly because it is empty.
> Attached is a patch adding the attribute "includeEmptyDirectories" to the fileSet element in assembly.xml file. For backward compatibility, the default value of this attribute is true.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)