[
https://issues.apache.org/jira/browse/MDEP-481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hervé Boutemy updated MDEP-481:
-------------------------------
Description:
With the following configuration, the entry <destFileName> is getting ignored,
but the original name as matched by the <includes> pattern is used for the
destination file name:
{code:xml}<artifactItem>
<groupId>g</groupId>
<artifactId>a</artifactId>
<type>t</type>
<includes>prefix*suffix.ext</includes>
<destFileName>name.ext</destFileName>
</artifactItem>{code}
This is problematic in case the exact file name is unknown or irrelevant, e. g.
if a file shall be picked by prefix solely, while the suffix (version,
classifier, etc.) are irrelevant, as the destFileName would leave out suffix
anyways.
As it is the POM author's responsibility to not overwrite files, the default
behaviour should not be to ignore <destFileName> in case of multiple pattern
matches, but the files should simply auto-overwrite each other. Typically the
default use case where a POM author would use patterns and destFileName at the
same time, anyways is when he knows for sure there is can be only one match.
was:
With the following configuration, the entry <destFileName> is getting ignored,
but the original name as matched by the <includes> pattern is used for the
destination file name:
<artifactItem>
<groupId>g</groupId>
<artifactId>a</artifactId>
<type>t</type>
<includes>prefix*suffix.ext</includes>
<destFileName>name.ext</destFileName>
</artifactItem>
This is problematic in case the exact file name is unknown or irrelevant, e. g.
if a file shall be picked by prefix solely, while the suffix (version,
classifier, etc.) are irrelevant, as the destFileName would leave out suffix
anyways.
As it is the POM author's responsibility to not overwrite files, the default
behaviour should not be to ignore <destFileName> in case of multiple pattern
matches, but the files should simply auto-overwrite each other. Typically the
default use case where a POM author would use patterns and destFileName at the
same time, anyways is when he knows for sure there is can be only one match.
> <destFileName> is getting ignored
> ---------------------------------
>
> Key: MDEP-481
> URL: https://issues.apache.org/jira/browse/MDEP-481
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: unpack
> Affects Versions: 2.10
> Environment: Win 7 Pro SP1, 64 Bit, JDK 8u40
> Reporter: Markus Karg
>
> With the following configuration, the entry <destFileName> is getting
> ignored, but the original name as matched by the <includes> pattern is used
> for the destination file name:
> {code:xml}<artifactItem>
> <groupId>g</groupId>
> <artifactId>a</artifactId>
> <type>t</type>
> <includes>prefix*suffix.ext</includes>
> <destFileName>name.ext</destFileName>
> </artifactItem>{code}
> This is problematic in case the exact file name is unknown or irrelevant, e.
> g. if a file shall be picked by prefix solely, while the suffix (version,
> classifier, etc.) are irrelevant, as the destFileName would leave out suffix
> anyways.
> As it is the POM author's responsibility to not overwrite files, the default
> behaviour should not be to ignore <destFileName> in case of multiple pattern
> matches, but the files should simply auto-overwrite each other. Typically the
> default use case where a POM author would use patterns and destFileName at
> the same time, anyways is when he knows for sure there is can be only one
> match.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)