org.apache.maven.plugin.changes
Class ReleaseUtils

java.lang.Object
  extended by org.apache.maven.plugin.changes.ReleaseUtils

public class ReleaseUtils
extends Object

A utility class for working with Release objects.

Since:
2.4
Version:
$Id: ReleaseUtils.html 816598 2012-05-08 12:46:49Z hboutemy $
Author:
Dennis Lundberg

Constructor Summary
ReleaseUtils(org.apache.maven.plugin.logging.Log log)
           
 
Method Summary
 Release getLatestRelease(List releases, String pomVersion)
          Get the latest release by matching the supplied releases with the version from the pom.
protected  Release getRelease(List releases, String version)
          Get a release with the specified version from the list of releases.
protected  void logRelease(Release release)
           
 List mergeReleases(List firstReleases, List secondReleases)
          Merge releases from one issue tracker with releases from another issue tracker.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReleaseUtils

public ReleaseUtils(org.apache.maven.plugin.logging.Log log)
Method Detail

getLatestRelease

public Release getLatestRelease(List releases,
                                String pomVersion)
                         throws org.apache.maven.plugin.MojoExecutionException
Get the latest release by matching the supplied releases with the version from the pom.

Parameters:
releases - list of releases
pomVersion - Version of the artifact
Returns:
A Release that matches the next release of the current project
Throws:
org.apache.maven.plugin.MojoExecutionException - If a release can't be found

getRelease

protected Release getRelease(List releases,
                             String version)
Get a release with the specified version from the list of releases.

Parameters:
releases - A list of releases
version - The version we want
Returns:
A Release, or null if no release with the specified version can be found

logRelease

protected void logRelease(Release release)

mergeReleases

public List mergeReleases(List firstReleases,
                          List secondReleases)
Merge releases from one issue tracker with releases from another issue tracker. If a release is found in both issue trackers, i.e. they have the same version, their issues are merged into one release.

Parameters:
firstReleases - Releases from the first issue tracker
secondReleases - Releases from the second issue tracker
Returns:
A list containing the merged releases


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.