You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Marat Abrarov (Jira)" <ji...@apache.org> on 2020/10/14 17:46:00 UTC

[jira] [Commented] (MEAR-272) SNAPSHOT dependencies are copied with timestamp

    [ https://issues.apache.org/jira/browse/MEAR-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17214099#comment-17214099 ] 

Marat Abrarov commented on MEAR-272:
------------------------------------

I believe that to fix this issue we can use [outputFileNameMapping|https://maven.apache.org/plugins/maven-ear-plugin/ear-mojo.html#outputFileNameMapping] option with
{noformat}
@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@
{noformat}
value, i.e. we have to explicitly configure Maven EAR Plugin to use {{baseVersion}} instead of {{version}}.

Note that default value of outputFileNameMapping option is
{noformat}
@{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@
{noformat}
It means that this bug is not an issue for Maven EAR Plugin 3.1.0, i.e. it's expected default behavior of Maven EAR Plugin 3.1.0. I believe that documentation of [useBaseVersion|https://maven.apache.org/plugins/maven-ear-plugin/ear-mojo.html#useBaseVersion] option clearly states that outputFileNameMapping option should be used instead of useBaseVersion option (if it's not so then we could enhance documentation within this issue).

We may need / want to change smth related to useBaseVersion option within this bug - either make useBaseVersion option impacting default value of outputFileNameMapping option or clarify description of / remove / deprecate useBaseVersion option.

[~elharo@metalab.unc.edu], could you please review this comment? If you agree that description of useBaseVersion option is clear and we should use outputFileNameMapping option instead then could you please close this bug as not an issue?

> SNAPSHOT dependencies are copied with timestamp
> -----------------------------------------------
>
>                 Key: MEAR-272
>                 URL: https://issues.apache.org/jira/browse/MEAR-272
>             Project: Maven Ear Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.1
>         Environment: JDK 8
> Maven 3.3 and 3.5
>            Reporter: Benjamin Cartereau
>            Priority: Major
>
> We have an EAR project that have a dependency towards a SNAPSHOT (version in dependency within the pom set as "1.0-SNASPHOT") version of a jar stored in our Nexus repository.
> When we build the project, the ear:ear plugin is executed and we can see that the timestamp version of the dependency is copied as is:
> [INFO] Copying artifact[jar:xxx:yyy:1.0-20181106.150409-27] to[yyy-*1.0-20181106.150409-27*.jar]
> We also tried with the 3.0.0 version of the ear plugin and we get the same result.
> Then we have tried the 2.10.1 version of the plugin (with the useBaseVersion set to true in ear plugin configuration) and it is now working:
> [INFO] Copying artifact[jar:xxx:yyy:1.0-20181106.150409-27] to[yyy-*1.0-SNAPSHOT*.jar]
> The "useBaseVersion" parameter has no effect with 3.0.1 version of the plugin except displaying the warn message "Using _useBaseVersion_ not _yet_ fixed".



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