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

ASF GitHub Bot commented on MNG-2961:
-------------------------------------

elharo opened a new pull request, #441:
URL: https://github.com/apache/maven-dependency-plugin/pull/441

   (no comment)




> DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you 
> first call isSnapshot()
> ------------------------------------------------------------------------------------------------
>
>                 Key: MNG-2961
>                 URL: https://issues.apache.org/jira/browse/MNG-2961
>             Project: Maven
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7
>            Reporter: Brian E Fox
>            Assignee: John Dennis Casey
>            Priority: Minor
>             Fix For: 2.0.8, 3.0-alpha-1
>
>         Attachments: MNG-2961.diff
>
>
> calling isSnapshot() actually modifies the baseVersion:
>     public boolean isSnapshot()
>     {
>         if ( version != null || baseVersion != null )
>         {
>             Matcher m = VERSION_FILE_PATTERN.matcher( getBaseVersion() );
>             if ( m.matches() )
>             {
>                 setBaseVersion( m.group( 1 ) + "-" + SNAPSHOT_VERSION );
>                 return true;
>             }
>             else
>             {
>                 return getBaseVersion().endsWith( SNAPSHOT_VERSION ) || 
> getBaseVersion().equals( LATEST_VERSION );
>             }
>         }
>         else
>         {
>             return false;
>         }
>     }



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to