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

Guillaume Boué updated MASSEMBLY-752:
-------------------------------------

    Description: 
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 :
src/
   +-- folder1/
      +-- file.txt
   +-- folder2/

with the following fileSet in assembly.xml :
<fileSet>
    <directory>src</directory>
    <outputDirectory>/</outputDirectory>
</fileSet>

the assembly-plugin produces, as of today :
/folder1/file.txt
/folder2

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 :
<fileSet>
    <directory>src</directory>
    <outputDirectory>/</outputDirectory>
    <includeEmptyDirectories>false</includeEmptyDirectories>
</fileSet>

and the resulting assembly would be :
/folder1/file.txt

Note that folder2 would not be present inside the assembly.

Attached is a patch adding the attribute "includeEmptyDirectories" to fileSet 
element in assembly.xml file. For backward compatibility, the default value of 
this attribute is true.

  was:
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 :
src/
   +-- folder1/
      +-- file.txt
   +-- folder2/

with the following fileSet in assembly.xml :
<fileSet>
    <directory>src</directory>
    <outputDirectory>/</outputDirectory>
</fileSet>

the assembly-plugin produces, as of today :
/folder1/file.txt
/folder2

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 :
<fileSet>
    <directory>src</directory>
    <outputDirectory>/</outputDirectory>
    <includeEmptyDirectories>false</includeEmptyDirectories>
</fileSet>

and the resulting assembly would be :
/folder1/file.txt

Note that folder2 would not be present inside the assembly.

Attached is a patch adding the attribute "includeEmptyDirectories" to fileSet 
element in assembly.xml file. For backward compatibility, the default value of 
this attribute is true.


> [PATCH] Option to ignore empty directories on fileSet directory
> ---------------------------------------------------------------
>
>                 Key: MASSEMBLY-752
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-752
>             Project: Maven Assembly Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.5.3
>            Reporter: Guillaume Boué
>            Priority: Minor
>         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 :
> src/
>    +-- folder1/
>       +-- file.txt
>    +-- folder2/
> with the following fileSet in assembly.xml :
> <fileSet>
>     <directory>src</directory>
>     <outputDirectory>/</outputDirectory>
> </fileSet>
> the assembly-plugin produces, as of today :
> /folder1/file.txt
> /folder2
> 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 :
> <fileSet>
>     <directory>src</directory>
>     <outputDirectory>/</outputDirectory>
>     <includeEmptyDirectories>false</includeEmptyDirectories>
> </fileSet>
> and the resulting assembly would be :
> /folder1/file.txt
> Note that folder2 would not be present inside the assembly.
> Attached is a patch adding the attribute "includeEmptyDirectories" to fileSet 
> element in assembly.xml file. For backward compatibility, the default value 
> of this attribute is true.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to