Maven
  1. Maven
  2. MNG-2961

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7
    • Fix Version/s: 2.0.8, 3.0-alpha-1
    • Labels:
      None
    • Flags:
      Patch

      Description

      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; }

      }

      1. MNG-2961.diff
        2 kB
        Hervé Boutemy

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          111d 18h 25m 1 John Casey 14/Aug/07 16:46
          Mark Thomas made changes -
          Workflow jira [ 12952981 ] Default workflow, editable Closed status [ 12990310 ]
          Mark Thomas made changes -
          Link This issue is related to MRELEASE-124 [ MRELEASE-124 ]
          Mark Thomas made changes -
          Link This issue relates to MINVOKER-70 [ MINVOKER-70 ]
          Mark Thomas made changes -
          Link This issue relates to MANTTASKS-18 [ MANTTASKS-18 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Patch Submitted Yes [ 10763 ]
          Flags Patch [ 10430 ]
          Mark Thomas made changes -
          Workflow jira [ 12713473 ] Default workflow, editable Closed status [ 12755608 ]
          Mark Thomas made changes -
          Link This issue is related to MRELEASE-124 [ MRELEASE-124 ]
          Mark Thomas made changes -
          Link This issue relates to MINVOKER-70 [ MINVOKER-70 ]
          Mark Thomas made changes -
          Link This issue relates to MANTTASKS-18 [ MANTTASKS-18 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MINVOKER-70 [ MINVOKER-70 ]
          Tuomas Kiviaho made changes -
          Link This issue is related to MRELEASE-124 [ MRELEASE-124 ]
          John Casey made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Brian Fox [ brianfox ] John Casey [ jdcasey ]
          Fix Version/s 2.1-alpha-1 [ 13143 ]
          Resolution Fixed [ 1 ]
          Hide
          John Casey added a comment -

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

          Show
          John Casey added a comment - Applied, and added my own unit test to verify the fix. Thanks, Brian!
          Hervé Boutemy made changes -
          Affects Version/s 2.0.7 [ 13138 ]
          Fix Version/s 2.0.x [ 13141 ]
          Patch Submitted [Yes]
          Fix Version/s 2.0.8 [ 13139 ]
          Hervé Boutemy made changes -
          Attachment MNG-2961.diff [ 28155 ]
          Hide
          Hervé Boutemy added a comment -

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

          Show
          Hervé Boutemy added a comment - with this patch, baseVersion attribute is only set by its setter setBaseVersion(), which does the -SNAPSHOT conversion
          Brian Fox made changes -
          Fix Version/s 2.0.x [ 13141 ]
          Assignee Brian Fox [ brianfox ]
          Fix Version/s Reviewed Pending Version Assignment [ 13555 ]
          Jason van Zyl made changes -
          Fix Version/s Reviewed [ 13555 ]
          Hervé Boutemy made changes -
          Field Original Value New Value
          Link This issue relates to MANTTASKS-18 [ MANTTASKS-18 ]
          Brian E. Fox created issue -

            People

            • Assignee:
              John Casey
              Reporter:
              Brian E. Fox
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development