You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brian Fox (JIRA)" <ji...@codehaus.org> on 2007/04/25 04:21:26 UTC

[jira] Created: (MNG-2961) DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you first call isSnapshot()

DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you first call isSnapshot()
------------------------------------------------------------------------------------------------

                 Key: MNG-2961
                 URL: http://jira.codehaus.org/browse/MNG-2961
             Project: Maven 2
          Issue Type: Bug
          Components: Artifacts and Repositories
    Affects Versions: 2.0.6, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0
            Reporter: Brian Fox
            Priority: Minor


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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-2961) DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you first call isSnapshot()

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy updated MNG-2961:
-------------------------------

    Attachment: MNG-2961.diff

with this patch, baseVersion attribute is only set by its setter setBaseVersion(), which does the -SNAPSHOT conversion

> DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you first call isSnapshot()
> ------------------------------------------------------------------------------------------------
>
>                 Key: MNG-2961
>                 URL: http://jira.codehaus.org/browse/MNG-2961
>             Project: Maven 2
>          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 Fox
>            Assignee: Brian Fox
>            Priority: Minor
>             Fix For: 2.0.8
>
>         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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-2961) DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you first call isSnapshot()

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox updated MNG-2961:
---------------------------

         Assignee: Brian Fox
    Fix Version/s:     (was: Reviewed Pending Version Assignment)
                   2.0.x

> DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you first call isSnapshot()
> ------------------------------------------------------------------------------------------------
>
>                 Key: MNG-2961
>                 URL: http://jira.codehaus.org/browse/MNG-2961
>             Project: Maven 2
>          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
>            Reporter: Brian Fox
>            Assignee: Brian Fox
>            Priority: Minor
>             Fix For: 2.0.x
>
>
> 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-2961) DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you first call isSnapshot()

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey closed MNG-2961.
---------------------------

         Assignee: John Casey  (was: Brian Fox)
       Resolution: Fixed
    Fix Version/s: 2.1-alpha-1

Applied, and added my own unit test to verify the fix. Thanks, Brian!

> DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you first call isSnapshot()
> ------------------------------------------------------------------------------------------------
>
>                 Key: MNG-2961
>                 URL: http://jira.codehaus.org/browse/MNG-2961
>             Project: Maven 2
>          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 Fox
>            Assignee: John Casey
>            Priority: Minor
>             Fix For: 2.0.8, 2.1-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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-2961) DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you first call isSnapshot()

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy updated MNG-2961:
-------------------------------

    Affects Version/s: 2.0.7
        Fix Version/s:     (was: 2.0.x)
                       2.0.8
      Patch Submitted: [Yes]

> DefaultArtifact getBaseVersion is changed to "xxxx-SNAPSHOT" only if you first call isSnapshot()
> ------------------------------------------------------------------------------------------------
>
>                 Key: MNG-2961
>                 URL: http://jira.codehaus.org/browse/MNG-2961
>             Project: Maven 2
>          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 Fox
>            Assignee: Brian Fox
>            Priority: Minor
>             Fix For: 2.0.8
>
>         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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira