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 816603 2012-05-08 12:53:30Z hboutemy $
Author:
Dennis Lundberg

Constructor Summary
ReleaseUtils(org.apache.maven.plugin.logging.Log log)
           
 
Method Summary
 List<Release> convertReleaseList(List changesReleases)
          Convert an untyped List of Release objects that comes from changes.xml into a typed List of Release objects.
 Release getLatestRelease(List<Release> releases, String pomVersion)
          Get the latest release by matching the supplied releases with the version from the pom.
protected  Release getRelease(List<Release> releases, String version)
          Get a release with the specified version from the list of releases.
protected  void logRelease(Release release)
           
 List<Release> mergeReleases(List<Release> firstReleases, List<Release> 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<Release> 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<Release> 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<Release> mergeReleases(List<Release> firstReleases,
                                   List<Release> 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

convertReleaseList

public List<Release> convertReleaseList(List changesReleases)
Convert an untyped List of Release objects that comes from changes.xml into a typed List of Release objects.

Parameters:
changesReleases - An untyped List of Release objects
Returns:
A type List of Release objects


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