org.apache.maven.plugin.changes
Class ChangesCheckMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.changes.ChangesCheckMojo
All Implemented Interfaces:
ContextEnabled, Mojo

public class ChangesCheckMojo
extends AbstractMojo

Goal which checks that the changes.xml file has the necessary data to generate an announcement or a report for the current release.

Since:
2.4
Author:
Justin Edelson, Dennis Lundberg
Is defined by the goal name:
changes-check

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ChangesCheckMojo()
           
 
Method Summary
 void execute()
          Check that the latest release contains a valid release date.
protected static boolean isValidDate(String string, String pattern)
          Use the pattern to try to parse a Date from the given string.
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangesCheckMojo

public ChangesCheckMojo()
Method Detail

execute

public void execute()
             throws MojoExecutionException
Check that the latest release contains a valid release date.

Throws:
MojoExecutionException

isValidDate

protected static boolean isValidDate(String string,
                                     String pattern)
Use the pattern to try to parse a Date from the given string.

Parameters:
string - A date as text
pattern - A pattern that can be used by SimpleDateFormat
Returns:
true if the string can be parsed as a date using the pattern, otherwise false


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