Maven Changes Plugin
  1. Maven Changes Plugin
  2. MCHANGES-272

Please add an option to the 'changes-check' goal to allow skipping release date checks of snapshot versions.

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.7
    • Component/s: None
    • Labels:
      None
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      The 'changes-check' goal treats snapshot versions the same way as release versions by removing the '-SNAPSHOT' suffix prior to checking the release date. Please add an option to the 'changes-check' goal to allow skipping snapshot versions.

      1. MCHANGES-272.patch
        6 kB
        Christian Schulte
      2. MCHANGES-272.patch
        7 kB
        Christian Schulte

        Activity

        Hide
        Christian Schulte added a comment -

        Patch adding a 'skipSnapshots' parameter to the 'changes-check' goal.

        Show
        Christian Schulte added a comment - Patch adding a 'skipSnapshots' parameter to the 'changes-check' goal.
        Hide
        Benson Margulies added a comment -

        What about timestamp snapshots? Those don't have -SNAPSHOT in their name anywhere.

        Show
        Benson Margulies added a comment - What about timestamp snapshots? Those don't have -SNAPSHOT in their name anywhere.
        Hide
        Dennis Lundberg added a comment -

        The need for such an option indicates to me that you might not be using this goal the way it was intended. For me this goal is supposed to be used in a release profile or something similar, so that it is only run prior to a release being made.

        What is your use case?

        Show
        Dennis Lundberg added a comment - The need for such an option indicates to me that you might not be using this goal the way it was intended. For me this goal is supposed to be used in a release profile or something similar, so that it is only run prior to a release being made. What is your use case?
        Hide
        Christian Schulte added a comment -

        I would like to be able to enable the release profile when building snapshots (e.g. for testing the release build or for deploying snapshots publicly). Just like 'mvn deploy' automatically chooses a repository to upload to based on the kind of artifact acted upon, I would like to avoid having to invoke maven differently based on the kind of artifact acted upon when enabling the release profile. The current behavior of the 'changes-check' goal makes this impossible, since it will fail the build when building a snapshot for which no matching release version is found in the 'changes.xml' file or for which no release date is found which makes no sense for snapshots, IMHO. Therefore, the goal should automatically skip itself, when building a snapshot.

        Show
        Christian Schulte added a comment - I would like to be able to enable the release profile when building snapshots (e.g. for testing the release build or for deploying snapshots publicly). Just like 'mvn deploy' automatically chooses a repository to upload to based on the kind of artifact acted upon, I would like to avoid having to invoke maven differently based on the kind of artifact acted upon when enabling the release profile. The current behavior of the 'changes-check' goal makes this impossible, since it will fail the build when building a snapshot for which no matching release version is found in the 'changes.xml' file or for which no release date is found which makes no sense for snapshots, IMHO. Therefore, the goal should automatically skip itself, when building a snapshot.
        Hide
        Benson Margulies added a comment -

        I would commit this if I could find the recipe for looking a a timestamp snapshot version and determining that it is, in fact, a snapshot version. It has to be in maven core somewhere.

        Show
        Benson Margulies added a comment - I would commit this if I could find the recipe for looking a a timestamp snapshot version and determining that it is, in fact, a snapshot version. It has to be in maven core somewhere.
        Hide
        Christian Schulte added a comment -

        Updated patch to use 'ArtifactUtils.isSnapshot'. I am not sure if method 'ReleaseUtils.getLatestRelease' also needs updating to support timestamp snapshot version.

        Show
        Christian Schulte added a comment - Updated patch to use 'ArtifactUtils.isSnapshot'. I am not sure if method 'ReleaseUtils.getLatestRelease' also needs updating to support timestamp snapshot version.
        Hide
        Benson Margulies added a comment -

        ------------------------------------------------------------------------
        r1329514 | bimargulies | 2012-04-23 20:39:20 -0400 (Mon, 23 Apr 2012) | 2 lines

        MCHANGES-272: Please add an option to the 'changes-check' goal to allow skipping release date checks of snapshot versions.

        ------------------------------------------------------------------------

        Show
        Benson Margulies added a comment - ------------------------------------------------------------------------ r1329514 | bimargulies | 2012-04-23 20:39:20 -0400 (Mon, 23 Apr 2012) | 2 lines MCHANGES-272 : Please add an option to the 'changes-check' goal to allow skipping release date checks of snapshot versions. ------------------------------------------------------------------------

          People

          • Assignee:
            Benson Margulies
            Reporter:
            Christian Schulte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: