You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2015/06/16 21:29:10 UTC
svn commit: r1685894 [1/4] - in /maven/plugins/trunk/maven-changes-plugin:
./ src/main/java/org/apache/maven/plugin/announcement/
src/main/java/org/apache/maven/plugin/changes/
src/main/java/org/apache/maven/plugin/changes/schema/
src/main/java/org/apa...
Author: khmarbaise
Date: Tue Jun 16 19:29:09 2015
New Revision: 1685894
URL: http://svn.apache.org/r1685894
Log:
Java 5 update of the code
Checkstyle cleanup
Reformatting
Index: pom.xml
===================================================================
--- pom.xml (revision 1685879)
+++ pom.xml (working copy)
@@ -445,6 +445,7 @@
</execution>
</executions>
<configuration>
+ <useJava5>true</useJava5>
<version>1.0.0</version>
<models>
<model>src/main/mdo/changes.mdo</model>
Index: src/main/java/org/apache/maven/plugin/announcement/AbstractAnnouncementMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/announcement/AbstractAnnouncementMojo.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/announcement/AbstractAnnouncementMojo.java (working copy)
@@ -32,9 +32,8 @@
extends AbstractChangesMojo
{
/**
- * This will cause the execution to be run only at the top of a given module
- * tree. That is, run in the project contained in the same folder where the
- * mvn execution was launched.
+ * This will cause the execution to be run only at the top of a given module tree. That is, run in the project
+ * contained in the same folder where the mvn execution was launched.
*
* @since 2.3
*/
Index: src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java (working copy)
@@ -57,9 +57,9 @@
public class AnnouncementMailMojo
extends AbstractAnnouncementMojo
{
- //=========================================
+ // =========================================
// announcement-mail goal fields
- //=========================================
+ // =========================================
/**
* Possible senders.
@@ -68,10 +68,9 @@
private List from;
/**
- * The id of the developer sending the announcement mail. Only used if the <tt>mailSender</tt>
- * attribute is not set. In this case, this should match the id of one of the developers in
- * the pom. If a matching developer is not found, then the first developer in the pom will be
- * used.
+ * The id of the developer sending the announcement mail. Only used if the <tt>mailSender</tt> attribute is not set.
+ * In this case, this should match the id of one of the developers in the pom. If a matching developer is not found,
+ * then the first developer in the pom will be used.
*/
@Parameter( property = "changes.fromDeveloperId" )
private String fromDeveloperId;
@@ -85,21 +84,36 @@
private String mailContentType;
/**
- * Defines the sender of the announcement email. This takes precedence over the list
- * of developers specified in the POM.
- * if the sender is not a member of the development team. Note that since this is a bean type,
- * you cannot specify it from command level with <pre>-D</pre>. Use
- * <pre>-Dchanges.sender='Your Name <you@domain>'</pre> instead.
+ * Defines the sender of the announcement email. This takes precedence over the list of developers specified in the
+ * POM. if the sender is not a member of the development team. Note that since this is a bean type, you cannot
+ * specify it from command level with
+ *
+ * <pre>
+ * -D
+ * </pre>
+ *
+ * . Use
+ *
+ * <pre>
+ * -Dchanges.sender='Your Name <you@domain>'
+ * </pre>
+ *
+ * instead.
*/
@Parameter( property = "changes.mailSender" )
private MailSender mailSender;
/**
- * Defines the sender of the announcement. This takes precedence over both ${changes.mailSender}
- * and the list of developers in the POM.
+ * Defines the sender of the announcement. This takes precedence over both ${changes.mailSender} and the list of
+ * developers in the POM.
* <p/>
* This parameter parses an email address in standard RFC822 format, e.g.
- * <pre>-Dchanges.sender='Your Name <you@domain>'</pre>.
+ *
+ * <pre>
+ * -Dchanges.sender='Your Name <you@domain>'
+ * </pre>
+ *
+ * .
*
* @since 2.7
*/
@@ -146,9 +160,10 @@
/**
* Subject for the email.
*/
- @Parameter( property = "changes.subject",
- defaultValue = "[ANNOUNCEMENT] - ${project.name} ${project.version} released", required = true )
+ // CHECKSTYLE_OFF: LineLength
+ @Parameter( property = "changes.subject", defaultValue = "[ANNOUNCEMENT] - ${project.name} ${project.version} released", required = true )
private String subject;
+ // CHECKSTYLE_ON: LineLength
/**
* The file that contains the generated announcement.
@@ -177,8 +192,8 @@
/**
* Directory which contains the template for announcement email.
*
- * @deprecated Starting with version 2.10 this parameter is no longer used.
- * You must use {@link #announcementDirectory} instead.
+ * @deprecated Starting with version 2.10 this parameter is no longer used. You must use
+ * {@link #announcementDirectory} instead.
*/
@Parameter
private File templateOutputDirectory;
@@ -359,7 +374,7 @@
{
templateEncoding = ReaderFactory.FILE_ENCODING;
getLog().warn( "File encoding has not been set, using platform encoding '" + templateEncoding
- + "', i.e. build is platform dependent!" );
+ + "', i.e. build is platform dependent!" );
}
reader = new InputStreamReader( inputStream, templateEncoding );
@@ -417,9 +432,8 @@
}
else if ( from == null || from.isEmpty() )
{
- throw new MojoExecutionException(
- "The <developers> section in your pom should not be empty. Add a <developer> entry or set the "
- + "mailSender parameter." );
+ throw new MojoExecutionException( "The <developers> section in your pom should not be empty. "
+ + "Add a <developer> entry or set the mailSender parameter." );
}
else if ( fromDeveloperId == null )
{
@@ -437,14 +451,14 @@
return new MailSender( developer.getName(), developer.getEmail() );
}
}
- throw new MojoExecutionException(
- "Missing developer with id '" + fromDeveloperId + "' in the <developers> section in your pom." );
+ throw new MojoExecutionException( "Missing developer with id '" + fromDeveloperId
+ + "' in the <developers> section in your pom." );
}
}
- //================================
+ // ================================
// announcement-mail accessors
- //================================
+ // ================================
public List getBccAddresses()
{
Index: src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java (working copy)
@@ -80,8 +80,8 @@
private static final String GIT_HUB = "GitHub";
/**
- * The name of the file which will contain the generated announcement. If
- * no value is specified the plugin will use the name of the template.
+ * The name of the file which will contain the generated announcement. If no value is specified the plugin will use
+ * the name of the template.
*
* @since 2.4
*/
@@ -89,8 +89,7 @@
private String announcementFile;
/**
- * Map of custom parameters for the announcement.
- * This Map will be passed to the template.
+ * Map of custom parameters for the announcement. This Map will be passed to the template.
*
* @since 2.1
*/
@@ -103,8 +102,7 @@
private String artifactId;
/**
- * Name of the team that develops the artifact.
- * This parameter will be passed to the template.
+ * Name of the team that develops the artifact. This parameter will be passed to the template.
*/
@Parameter( property = "changes.developmentTeam", defaultValue = "${project.name} team", required = true )
private String developmentTeam;
@@ -121,23 +119,20 @@
private String groupId;
/**
- * Short description or introduction of the released artifact.
- * This parameter will be passed to the template.
+ * Short description or introduction of the released artifact. This parameter will be passed to the template.
*/
@Parameter( defaultValue = "${project.description}" )
private String introduction;
/**
- * A list of issue management systems to fetch releases from. This parameter
- * replaces the parameters <code>generateJiraAnnouncement</code> and
- * <code>jiraMerge</code>.
+ * A list of issue management systems to fetch releases from. This parameter replaces the parameters
+ * <code>generateJiraAnnouncement</code> and <code>jiraMerge</code>.
* <p>
* Valid values are: <code>changes.xml</code> and <code>JIRA</code>.
* </p>
- * <strong>Note:</strong> Only one issue management system that is
- * configured in <project>/<issueManagement> can be used. This
- * currently means that you can combine a changes.xml file with one other
- * issue management system.
+ * <strong>Note:</strong> Only one issue management system that is configured in
+ * <project>/<issueManagement> can be used. This currently means that you can combine a changes.xml file
+ * with one other issue management system.
*
* @since 2.4
*/
@@ -145,9 +140,8 @@
private List<String> issueManagementSystems;
/**
- * Maps issues types to action types for grouping issues in announcements.
- * If issue types are not defined for a action type then the default issue type
- * will be applied.
+ * Maps issues types to action types for grouping issues in announcements. If issue types are not defined for a
+ * action type then the default issue type will be applied.
* <p>
* Valid action types: <code>add</code>, <code>fix</code> and <code>update</code>.
* </p>
@@ -168,8 +162,8 @@
/**
* Directory where the announcement file will be generated.
*
- * @deprecated Starting with version 2.10 this parameter is no longer used.
- * You must use {@link #announcementDirectory} instead.
+ * @deprecated Starting with version 2.10 this parameter is no longer used. You must use
+ * {@link #announcementDirectory} instead.
*/
@Parameter
private File outputDirectory;
@@ -199,9 +193,10 @@
* <code>/src/main/resources/ or current project base directory</code>.
* </p>
*/
- @Parameter( property = "changes.templateDirectory", defaultValue = "org/apache/maven/plugin/announcement",
- required = true )
+ // CHECKSTYLE_OFF: LineLength
+ @Parameter( property = "changes.templateDirectory", defaultValue = "org/apache/maven/plugin/announcement", required = true )
private String templateDirectory;
+ // CHECKSTYLE_ON: LineLength
/**
* The template encoding.
@@ -212,9 +207,9 @@
private String templateEncoding;
/**
- * Use the JIRA query language instead of the JIRA query based on HTTP parameters.
- * From JIRA 5.1 and up only JQL is supported. JIRA 4.4 supports both JQL and URL parameter based queries.
- * From 5.1.1 this is obsolete, since REST queries only use JQL.
+ * Use the JIRA query language instead of the JIRA query based on HTTP parameters. From JIRA 5.1 and up only JQL is
+ * supported. JIRA 4.4 supports both JQL and URL parameter based queries. From 5.1.1 this is obsolete, since REST
+ * queries only use JQL.
*
* @since 2.10
*/
@@ -222,16 +217,14 @@
private boolean useJql;
/**
- * Distribution URL of the artifact.
- * This parameter will be passed to the template.
+ * Distribution URL of the artifact. This parameter will be passed to the template.
*/
@Parameter( property = "project.url" )
private String url;
/**
- * URL where the artifact can be downloaded. If not specified,
- * no URL is used.
- * This parameter will be passed to the template.
+ * URL where the artifact can be downloaded. If not specified, no URL is used. This parameter will be passed to the
+ * template.
*/
@Parameter
private String urlDownload;
@@ -257,14 +250,13 @@
@Parameter( defaultValue = "${basedir}/src/changes/changes.xml" )
private File xmlPath;
- //=======================================//
- // JIRA-Announcement Needed Parameters //
- //=======================================//
+ // =======================================//
+ // JIRA-Announcement Needed Parameters //
+ // =======================================//
/**
- * Defines the filter parameters to restrict which issues are retrieved
- * from JIRA. The filter parameter uses the same format of url
- * parameters that is used in a JIRA search.
+ * Defines the filter parameters to restrict which issues are retrieved from JIRA. The filter parameter uses the
+ * same format of url parameters that is used in a JIRA search.
*
* @since 2.4
*/
@@ -274,19 +266,18 @@
/**
* Flag to determine if the plugin will generate a JIRA announcement.
*
- * @deprecated Since version 2.4 this parameter has been deprecated.
- * Please use the issueManagementSystems parameter instead.
+ * @deprecated Since version 2.4 this parameter has been deprecated. Please use the issueManagementSystems parameter
+ * instead.
*/
@Parameter( property = "generateJiraAnnouncement", defaultValue = "false", required = true )
private boolean generateJiraAnnouncement;
/**
- * If releases from JIRA should be merged with the releases from a
- * changes.xml file.
+ * If releases from JIRA should be merged with the releases from a changes.xml file.
*
* @since 2.1
- * @deprecated Since version 2.4 this parameter has been deprecated.
- * Please use the issueManagementSystems parameter instead.
+ * @deprecated Since version 2.4 this parameter has been deprecated. Please use the issueManagementSystems parameter
+ * instead.
*/
@Parameter( property = "changes.jiraMerge", defaultValue = "false" )
private boolean jiraMerge;
@@ -316,8 +307,7 @@
/**
* The maximum number of issues to fetch from JIRA.
* <p>
- * <b>Note:</b> In versions 2.0-beta-3 and earlier this parameter was
- * called "nbEntries".
+ * <b>Note:</b> In versions 2.0-beta-3 and earlier this parameter was called "nbEntries".
* </p>
*/
@Parameter( property = "changes.maxEntries", defaultValue = "25", required = true )
@@ -324,11 +314,10 @@
private int maxEntries;
/**
- * Include issues from JIRA with these resolution ids. Multiple resolution
- * ids can be specified as a comma separated list of ids.
+ * Include issues from JIRA with these resolution ids. Multiple resolution ids can be specified as a comma separated
+ * list of ids.
* <p>
- * <b>Note:</b> In versions 2.0-beta-3 and earlier this parameter was
- * called "resolutionId".
+ * <b>Note:</b> In versions 2.0-beta-3 and earlier this parameter was called "resolutionId".
* </p>
*/
@Parameter( property = "changes.resolutionIds", defaultValue = "Fixed" )
@@ -341,11 +330,10 @@
private Settings settings;
/**
- * Include issues from JIRA with these status ids. Multiple status ids can
- * be specified as a comma separated list of ids.
+ * Include issues from JIRA with these status ids. Multiple status ids can be specified as a comma separated list of
+ * ids.
* <p>
- * <b>Note:</b> In versions 2.0-beta-3 and earlier this parameter was
- * called "statusId".
+ * <b>Note:</b> In versions 2.0-beta-3 and earlier this parameter was called "statusId".
* </p>
*/
@Parameter( property = "changes.statusIds", defaultValue = "Closed" )
@@ -370,11 +358,9 @@
/**
* The prefix used when naming versions in JIRA.
* <p>
- * If you have a project in JIRA with several components that have different
- * release cycles, it is an often used pattern to prefix the version with
- * the name of the component, e.g. maven-filtering-1.0 etc. To fetch issues
- * from JIRA for a release of the "maven-filtering" component you would need
- * to set this parameter to "maven-filtering-".
+ * If you have a project in JIRA with several components that have different release cycles, it is an often used
+ * pattern to prefix the version with the name of the component, e.g. maven-filtering-1.0 etc. To fetch issues from
+ * JIRA for a release of the "maven-filtering" component you would need to set this parameter to "maven-filtering-".
* </p>
*
* @since 2.5
@@ -404,13 +390,12 @@
@Parameter( property = "changes.jiraReceiveTimout", defaultValue = "32000" )
private int jiraReceiveTimout;
- //=======================================//
- // Trac Parameters //
- //=======================================//
+ // =======================================//
+ // Trac Parameters //
+ // =======================================//
/**
- * Defines the Trac password for authentication into a private Trac
- * installation.
+ * Defines the Trac password for authentication into a private Trac installation.
*
* @since 2.4
*/
@@ -426,8 +411,7 @@
private String tracQuery;
/**
- * Defines the Trac username for authentication into a private Trac
- * installation.
+ * Defines the Trac username for authentication into a private Trac installation.
*
* @since 2.4
*/
@@ -434,9 +418,9 @@
@Parameter( property = "changes.tracUser", defaultValue = "" )
private String tracUser;
- //=======================================//
- // Github Parameters //
- //=======================================//
+ // =======================================//
+ // Github Parameters //
+ // =======================================//
/**
* The scheme of your github api domain. Only use if using github enterprise.
@@ -462,14 +446,14 @@
*/
@Parameter( defaultValue = "github" )
private String githubAPIServerId;
-
+
private ReleaseUtils releaseUtils = new ReleaseUtils( getLog() );
private ChangesXML xml;
- //=======================================//
- // announcement-generate execution //
- //=======================================//
+ // =======================================//
+ // announcement-generate execution //
+ // =======================================//
/**
* Generate the template
@@ -515,7 +499,7 @@
issueManagementSystems.add( CHANGES_XML );
}
}
-
+
// Fetch releases from the configured issue management systems
List<Release> releases = null;
if ( issueManagementSystems.contains( CHANGES_XML ) )
@@ -543,8 +527,8 @@
}
else
{
- throw new MojoExecutionException(
- "Something is wrong with the Issue Management section. See previous error messages." );
+ throw new MojoExecutionException( "Something is wrong with the Issue Management section. "
+ + "See previous error messages." );
}
}
@@ -558,8 +542,8 @@
}
else
{
- throw new MojoExecutionException(
- "Something is wrong with the Issue Management section. See previous error messages." );
+ throw new MojoExecutionException( "Something is wrong with the Issue Management section. "
+ + "See previous error messages." );
}
}
@@ -591,8 +575,8 @@
// Generate the report
if ( releases == null || releases.isEmpty() )
{
- throw new MojoExecutionException(
- "No releases found in any of the configured issue management systems." );
+ throw new MojoExecutionException( "No releases found in any of the "
+ + "configured issue management systems." );
}
else
{
@@ -613,7 +597,7 @@
String version = ( versionPrefix == null ? "" : versionPrefix ) + getVersion();
getLog().debug( "Generating announcement for version [" + version + "]. Found these releases: "
- + ReleaseUtils.toString( releases ) );
+ + ReleaseUtils.toString( releases ) );
doGenerate( releases, releaseUtils.getLatestRelease( releases, version ) );
}
@@ -665,7 +649,6 @@
context.put( "announceParameters", announceParameters );
}
-
processTemplate( context, announcementDirectory, template, announcementFile );
}
catch ( ResourceNotFoundException rnfe )
@@ -713,10 +696,9 @@
if ( StringUtils.isEmpty( templateEncoding ) )
{
- templateEncoding = ReaderFactory.FILE_ENCODING;
- getLog().warn(
- "File encoding has not been set, using platform encoding " + templateEncoding
- + ", i.e. build is platform dependent!" );
+ templateEncoding = ReaderFactory.FILE_ENCODING;
+ getLog().warn( "File encoding has not been set, using platform encoding " + templateEncoding
+ + ", i.e. build is platform dependent!" );
}
Writer writer = new OutputStreamWriter( new FileOutputStream( f ), templateEncoding );
@@ -813,7 +795,7 @@
private List<Release> getReleases( List<Issue> issues, IssueManagementSystem ims )
throws MojoExecutionException
{
- if ( issueTypes != null )
+ if ( issueTypes != null )
{
ims.applyConfiguration( issueTypes );
}
@@ -858,9 +840,9 @@
{
GitHubDownloader issueDownloader =
new GitHubDownloader( project, githubAPIScheme, githubAPIPort, false, true );
-
+
issueDownloader.configureAuthentication( githubAPIServerId, settings, getLog() );
-
+
return getReleases( issueDownloader.getIssueList(), new GitHubIssueManagementSystem() );
}
catch ( Exception e )
@@ -922,7 +904,7 @@
{
this.introduction = introduction;
}
-
+
public void setIssueTypes( Map<String, String> issueTypes )
{
this.issueTypes = issueTypes;
Index: src/main/java/org/apache/maven/plugin/announcement/MailSender.java
===================================================================
--- src/main/java/org/apache/maven/plugin/announcement/MailSender.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/announcement/MailSender.java (working copy)
@@ -20,8 +20,8 @@
*/
/**
- * Defines the sender of the announcement if the list of developer is empty or
- * if the sender is not a member of the development team.
+ * Defines the sender of the announcement if the list of developer is empty or if the sender is not a member of the
+ * development team.
*
* @author Stephane Nicoll
*/
@@ -32,13 +32,11 @@
private String email;
-
public MailSender()
{
super();
}
-
public MailSender( String name, String email )
{
this.name = name;
Index: src/main/java/org/apache/maven/plugin/changes/AbstractChangesMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/AbstractChangesMojo.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/AbstractChangesMojo.java (working copy)
@@ -49,9 +49,8 @@
protected MavenSession mavenSession;
/**
- * This will cause the execution to be run only at the top of a given module
- * tree. That is, run in the project contained in the same folder where the
- * mvn execution was launched.
+ * This will cause the execution to be run only at the top of a given module tree. That is, run in the project
+ * contained in the same folder where the mvn execution was launched.
*
* @since 2.9
*/
@@ -59,8 +58,8 @@
protected boolean runOnlyAtExecutionRoot;
/**
- * Returns <code>true</code> if the current project is located at the
- * Execution Root Directory (where mvn was launched).
+ * Returns <code>true</code> if the current project is located at the Execution Root Directory (where mvn was
+ * launched).
*
* @return <code>true</code> if the current project is at the Execution Root
*/
Index: src/main/java/org/apache/maven/plugin/changes/AbstractChangesReport.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/AbstractChangesReport.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/AbstractChangesReport.java (working copy)
@@ -56,13 +56,10 @@
import java.util.Map;
/**
- * Base class with the things that should be in AbstractMavenReport anyway.
+ * Base class with the things that should be in AbstractMavenReport anyway. Note: This file was copied from r415312 of
+ * AbstractProjectInfoReport in maven-project-info-reports, as a work-around to MCHANGES-88.
*
- * Note: This file was copied from r415312 of AbstractProjectInfoReport in
- * maven-project-info-reports, as a work-around to MCHANGES-88.
- *
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
- *
*/
public abstract class AbstractChangesReport
extends AbstractMavenReport
@@ -85,8 +82,8 @@
/**
* Report output encoding. Note that this parameter is only relevant if the goal is run from the command line or
- * from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output
- * encoding configured in the Maven Site Plugin is used instead.
+ * from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output encoding
+ * configured in the Maven Site Plugin is used instead.
*
* @since 2.4
*/
@@ -94,9 +91,8 @@
private String outputEncoding;
/**
- * This will cause the execution to be run only at the top of a given module
- * tree. That is, run in the project contained in the same folder where the
- * mvn execution was launched.
+ * This will cause the execution to be run only at the top of a given module tree. That is, run in the project
+ * contained in the same folder where the mvn execution was launched.
*
* @since 2.10
*/
@@ -209,7 +205,7 @@
outputDirectory.mkdirs();
File file = new File( outputDirectory, getOutputName() + ".html" );
- fileOutputStream = new FileOutputStream( file ) ;
+ fileOutputStream = new FileOutputStream( file );
Writer writer = new OutputStreamWriter( fileOutputStream, getOutputEncoding() );
siteRenderer.generateDocument( writer, sink, siteContext );
@@ -219,18 +215,18 @@
}
catch ( RendererException e )
{
- throw new MojoExecutionException(
- "An error has occurred in " + getName( Locale.ENGLISH ) + " report generation.", e );
+ throw new MojoExecutionException( "An error has occurred in " + getName( Locale.ENGLISH )
+ + " report generation.", e );
}
catch ( IOException e )
{
- throw new MojoExecutionException(
- "An error has occurred in " + getName( Locale.ENGLISH ) + " report generation.", e );
+ throw new MojoExecutionException( "An error has occurred in " + getName( Locale.ENGLISH )
+ + " report generation.", e );
}
catch ( MavenReportException e )
{
- throw new MojoExecutionException(
- "An error has occurred in " + getName( Locale.ENGLISH ) + " report generation.", e );
+ throw new MojoExecutionException( "An error has occurred in " + getName( Locale.ENGLISH )
+ + " report generation.", e );
}
finally
{
@@ -274,8 +270,8 @@
}
/**
- * Returns <code>true</code> if the current project is located at the
- * Execution Root Directory (where mvn was launched).
+ * Returns <code>true</code> if the current project is located at the Execution Root Directory (where mvn was
+ * launched).
*
* @return <code>true</code> if the current project is at the Execution Root
*/
Index: src/main/java/org/apache/maven/plugin/changes/ChangesCheckMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/ChangesCheckMojo.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/ChangesCheckMojo.java (working copy)
@@ -31,8 +31,8 @@
import org.apache.maven.plugins.changes.model.Release;
/**
- * Goal which checks that the changes.xml file has the necessary data to
- * generate an announcement or a report for the current release.
+ * Goal which checks that the changes.xml file has the necessary data to generate an announcement or a report for the
+ * current release.
*
* @author Justin Edelson
* @author Dennis Lundberg
@@ -43,15 +43,13 @@
extends AbstractChangesMojo
{
/**
- * The format that a correct release date should have. This value will be
- * used as a pattern to try to parse a date.
+ * The format that a correct release date should have. This value will be used as a pattern to try to parse a date.
*/
@Parameter( property = "changes.releaseDateFormat", defaultValue = "yyyy-MM-dd" )
private String releaseDateFormat;
/**
- * The locale that a correct release date should have. This value will be
- * used as a locale to try to parse a date.
+ * The locale that a correct release date should have. This value will be used as a locale to try to parse a date.
*
* @since 2.10
*/
@@ -78,8 +76,6 @@
@Parameter( property = "changes.skipSnapshots", defaultValue = "false" )
private boolean skipSnapshots;
- private ReleaseUtils releaseUtils = new ReleaseUtils( getLog() );
-
/**
* Check that the latest release contains a valid release date.
*
@@ -108,8 +104,8 @@
if ( !isValidDate( release.getDateRelease(), releaseDateFormat, releaseDateLocale ) )
{
- throw new MojoExecutionException(
- "The file " + xmlPath.getAbsolutePath() + " has an invalid release date." );
+ throw new MojoExecutionException( "The file " + xmlPath.getAbsolutePath()
+ + " has an invalid release date." );
}
}
@@ -121,8 +117,8 @@
}
/**
- * Use the pattern to try to parse a Date from the given string. Kept for
- * backward compatibility with existing unit tests.
+ * Use the pattern to try to parse a Date from the given string. Kept for backward compatibility with existing unit
+ * tests.
*
* @param string A date as text
* @param pattern A pattern that can be used by {@link SimpleDateFormat}
@@ -134,8 +130,7 @@
}
/**
- * Use the pattern to try to parse a Date from the given string using the
- * given Locale.
+ * Use the pattern to try to parse a Date from the given string using the given Locale.
*
* @param string A date as text
* @param pattern A pattern that can be used by {@link SimpleDateFormat}
@@ -168,7 +163,7 @@
{
// Try to find the specified locale on this system
Locale[] locales = Locale.getAvailableLocales();
- for ( int i = 0 ; i < locales.length ; i++ )
+ for ( int i = 0; i < locales.length; i++ )
{
if ( locales[i].toString().equals( locale ) )
{
Index: src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java (working copy)
@@ -23,34 +23,32 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
-
import java.net.URL;
-
import java.text.SimpleDateFormat;
-
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Properties;
import java.util.ResourceBundle;
import org.apache.commons.collections.map.CaseInsensitiveMap;
+import org.apache.commons.io.input.XmlStreamReader;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.changes.model.Release;
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.MavenReportException;
import org.apache.maven.shared.filtering.MavenFileFilter;
import org.apache.maven.shared.filtering.MavenFileFilterRequest;
import org.apache.maven.shared.filtering.MavenFilteringException;
-
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
-import org.apache.commons.io.input.XmlStreamReader;
/**
* Goal which creates a nicely formatted Changes Report in html format from a changes.xml file.
@@ -63,8 +61,8 @@
extends AbstractChangesReport
{
/**
- * A flag whether the report should also include changes from child modules. If set to <code>false</code>, only
- * the changes from current project will be written to the report.
+ * A flag whether the report should also include changes from child modules. If set to <code>false</code>, only the
+ * changes from current project will be written to the report.
*
* @since 2.5
*/
@@ -81,17 +79,14 @@
private boolean addActionDate;
/**
- * Whether HTML code within an action should be escaped. By changing this to
- * <code>false</code> you can restore the behavior that was in version 2.2
- * of this plugin, allowing you to use HTML code to format the content of an
+ * Whether HTML code within an action should be escaped. By changing this to <code>false</code> you can restore the
+ * behavior that was in version 2.2 of this plugin, allowing you to use HTML code to format the content of an
* action.
* <p>
- * <strong>Note:</strong> If you use HTML code in an action you need to
- * place it inside a CDATA section.
+ * <strong>Note:</strong> If you use HTML code in an action you need to place it inside a CDATA section.
* </p>
- * <strong>Note:</strong> Putting any kind of markup inside a CDATA section
- * might mess up the Changes Report or other generated documents, such as
- * PDFs, that are based on your <code>changes.xml</code> file if you are not
+ * <strong>Note:</strong> Putting any kind of markup inside a CDATA section might mess up the Changes Report or
+ * other generated documents, such as PDFs, that are based on your <code>changes.xml</code> file if you are not
* careful.
*
* @since 2.4
@@ -117,10 +112,10 @@
private boolean filteringChanges;
/**
- * Template string that is used to discover the URL to use to display an issue report.
- * There are 2 template tokens you can use. <code>%URL%</code>: this is computed by getting the
- * <code><issueManagement>/<url></code> value from the POM, and removing the last '/'
- * and everything that comes after it. <code>%ISSUE%</code>: this is the issue number.
+ * Template string that is used to discover the URL to use to display an issue report. There are 2 template tokens
+ * you can use. <code>%URL%</code>: this is computed by getting the <code><issueManagement>/<url></code>
+ * value from the POM, and removing the last '/' and everything that comes after it. <code>%ISSUE%</code>: this is
+ * the issue number.
* <p>
* <strong>Note:</strong> In versions of this plugin prior to 2.0-beta-2 this parameter was called
* <code>link_template</code>.
@@ -137,24 +132,22 @@
* map denotes the (case-insensitive) identifier of the issue tracking system and its value gives the URL template.
* <p>
* There are 2 template tokens you can use. <code>%URL%</code>: this is computed by getting the
- * <code><issueManagement>/<url></code> value from the POM, and removing the last '/'
- * and everything that comes after it. <code>%ISSUE%</code>: this is the issue number.
+ * <code><issueManagement>/<url></code> value from the POM, and removing the last '/' and everything
+ * that comes after it. <code>%ISSUE%</code>: this is the issue number.
* </p>
* <p>
* <strong>Note:</strong> The deprecated issueLinkTemplate will be used for a system called "default".
* </p>
* <p>
- * <strong>Note:</strong> Starting with version 2.4 you usually don't need
- * to specify this, unless you need to link to an issue management system in
- * your Changes report that isn't supported out of the box. See the
- * <a href="./usage.html">Usage page</a> for more
- * information.
+ * <strong>Note:</strong> Starting with version 2.4 you usually don't need to specify this, unless you need to link
+ * to an issue management system in your Changes report that isn't supported out of the box. See the
+ * <a href="./usage.html">Usage page</a> for more information.
* </p>
*
* @since 2.1
*/
@Parameter
- private Map issueLinkTemplatePerSystem;
+ private Map<String, String> issueLinkTemplatePerSystem;
/**
* @since 2.2
@@ -193,8 +186,8 @@
private String system;
/**
- * The URI of a file containing all the team members. If this is set to the
- * special value "none", no links will be generated for the team members.
+ * The URI of a file containing all the team members. If this is set to the special value "none", no links will be
+ * generated for the team members.
*
* @since 2.4
*/
@@ -208,15 +201,14 @@
/**
* The type of the feed to generate.
- *
* <p>
- * Supported values are:
- * <code>"rss_0.9", "rss_0.91N" (RSS 0.91 Netscape), "rss_0.91U" (RSS 0.91 Userland),
+ * Supported values are: <code>"rss_0.9", "rss_0.91N" (RSS 0.91 Netscape), "rss_0.91U" (RSS 0.91 Userland),
* "rss_0.92", "rss_0.93", "rss_0.94", "rss_1.0", "rss_2.0", "atom_0.3", "atom_1.0"</code>.
* </p>
+ * <p>
+ * If not specified, no feed is generated.
+ * </p>
*
- * <p>If not specified, no feed is generated.</p>
- *
* @since 2.9
*/
@Parameter
@@ -233,7 +225,7 @@
private CaseInsensitiveMap caseInsensitiveIssueLinkTemplatePerSystem;
/* --------------------------------------------------------------------- */
- /* Public methods */
+ /* Public methods */
/* --------------------------------------------------------------------- */
public boolean canGenerateReport()
@@ -251,8 +243,7 @@
throws MavenReportException
{
Date now = new Date();
- SimpleDateFormat simpleDateFormat =
- new SimpleDateFormat( publishDateFormat, new Locale( publishDateLocale ) );
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat( publishDateFormat, new Locale( publishDateLocale ) );
Properties additionalProperties = new Properties();
additionalProperties.put( "publishDate", simpleDateFormat.format( now ) );
@@ -273,7 +264,7 @@
}
final String relativePath = absolutePath.substring( basePath.length() );
- List releaseList = changesXml.getReleaseList();
+ List<Release> releaseList = changesXml.getReleaseList();
for ( Object o : project.getCollectedProjects() )
{
final MavenProject childProject = (MavenProject) o;
@@ -281,8 +272,8 @@
final ChangesXML childXml = getChangesFromFile( changesFile, childProject, additionalProperties );
if ( childXml != null )
{
- releaseList = releaseUtils.mergeReleases( releaseList, childProject.getName(),
- childXml.getReleaseList() );
+ releaseList =
+ releaseUtils.mergeReleases( releaseList, childProject.getName(), childXml.getReleaseList() );
}
}
changesXml.setReleaseList( releaseList );
@@ -293,7 +284,7 @@
report.setAuthor( changesXml.getAuthor() );
report.setTitle( changesXml.getTitle() );
- report.setEscapeHTML ( escapeHTML );
+ report.setEscapeHTML( escapeHTML );
// Create a case insensitive version of issueLinkTemplatePerSystem
// We need something case insensitive to maintain backward compatibility
@@ -333,7 +324,7 @@
report.setSystem( system );
- report.setTeamlist ( teamlist );
+ report.setTeamlist( teamlist );
report.setUrl( url );
@@ -375,12 +366,12 @@
}
/* --------------------------------------------------------------------- */
- /* Private methods */
+ /* Private methods */
/* --------------------------------------------------------------------- */
/**
- * Parses specified changes.xml file. It also makes filtering if needed. If specified file doesn't exist
- * it will log warning and return <code>null</code>.
+ * Parses specified changes.xml file. It also makes filtering if needed. If specified file doesn't exist it will log
+ * warning and return <code>null</code>.
*
* @param changesXml changes xml file to parse
* @param project maven project to parse changes for
@@ -413,8 +404,8 @@
project.getGroupId() + "." + project.getArtifactId() + "-changes.xml" );
final MavenFileFilterRequest mavenFileFilterRequest =
- new MavenFileFilterRequest( changesXml, resultFile, true, project, Collections.EMPTY_LIST,
- false, encoding, session, additionalProperties );
+ new MavenFileFilterRequest( changesXml, resultFile, true, project, Collections.<String>emptyList(),
+ false, encoding, session, additionalProperties );
mavenFileFilter.copyFile( mavenFileFilterRequest );
changesXml = resultFile;
}
@@ -439,8 +430,8 @@
}
/**
- * Add the issue link template for the given issue management system,
- * but only if it has not already been configured.
+ * Add the issue link template for the given issue management system, but only if it has not already been
+ * configured.
*
* @param system The issue management system
* @param issueLinkTemplate The issue link template to use
@@ -462,13 +453,8 @@
throws MavenReportException
{
final String pluginResourcesBase = "org/apache/maven/plugin/changes";
- String resourceNames[] = {
- "images/add.gif",
- "images/fix.gif",
- "images/icon_help_sml.gif",
- "images/remove.gif",
- "images/rss.png",
- "images/update.gif" };
+ String resourceNames[] = { "images/add.gif", "images/fix.gif", "images/icon_help_sml.gif", "images/remove.gif",
+ "images/rss.png", "images/update.gif" };
try
{
getLog().debug( "Copying static resources." );
@@ -494,7 +480,7 @@
return teamlist;
}
- private void logIssueLinkTemplatePerSystem( Map issueLinkTemplatePerSystem )
+ private void logIssueLinkTemplatePerSystem( Map<String, String> issueLinkTemplatePerSystem )
{
if ( getLog().isDebugEnabled() )
{
@@ -504,9 +490,8 @@
}
else
{
- for ( Object o : issueLinkTemplatePerSystem.entrySet() )
+ for ( Entry<String, String> entry : issueLinkTemplatePerSystem.entrySet() )
{
- Map.Entry entry = (Map.Entry) o;
getLog().debug( "issueLinkTemplatePerSystem[" + entry.getKey() + "] = " + entry.getValue() );
}
}
Index: src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java (working copy)
@@ -44,7 +44,8 @@
*
* @version $Id$
*/
-public class ChangesReportGenerator extends AbstractIssuesReportGenerator
+public class ChangesReportGenerator
+ extends AbstractIssuesReportGenerator
{
/**
@@ -62,8 +63,7 @@
private static final String NO_TEAMLIST = "none";
/**
- * The issue management system to use, for actions that do not specify a
- * system.
+ * The issue management system to use, for actions that do not specify a system.
*
* @since 2.4
*/
@@ -73,7 +73,7 @@
private String url;
- private Map issueLinksPerSystem;
+ private Map<String, String> issueLinksPerSystem;
private boolean addActionDate;
@@ -87,14 +87,14 @@
/**
* @since 2.4
*/
- private List releaseList;
+ private List<Release> releaseList;
public ChangesReportGenerator()
{
- issueLinksPerSystem = new HashMap();
+ issueLinksPerSystem = new HashMap<String, String>();
}
- public ChangesReportGenerator( List releaseList )
+ public ChangesReportGenerator( List<Release> releaseList )
{
this();
this.releaseList = releaseList;
@@ -152,12 +152,12 @@
return url;
}
- public Map getIssueLinksPerSystem()
+ public Map<String, String> getIssueLinksPerSystem()
{
return issueLinksPerSystem;
}
- public void setIssueLinksPerSystem( Map issueLinksPerSystem )
+ public void setIssueLinksPerSystem( Map<String, String> issueLinksPerSystem )
{
if ( this.issueLinksPerSystem != null && issueLinksPerSystem == null )
{
@@ -198,7 +198,7 @@
{
return false;
}
- String issueLink = (String) this.issueLinksPerSystem.get( system );
+ String issueLink = this.issueLinksPerSystem.get( system );
// If the issue link entry is blank then no links are possible
if ( StringUtils.isBlank( issueLink ) )
@@ -318,7 +318,7 @@
* @param bundle A resource bundle for i18n
* @param dueTos Other people that helped with an action
*/
- private void constructDueTo( Sink sink, Action action, ResourceBundle bundle, List dueTos )
+ private void constructDueTo( Sink sink, Action action, ResourceBundle bundle, List<DueTo> dueTos )
{
// Create a Map with key : dueTo name, value : dueTo email
@@ -330,9 +330,8 @@
namesEmailMap.put( action.getDueTo(), action.getDueToEmail() );
}
- for ( Object dueTo1 : dueTos )
+ for ( DueTo dueTo : dueTos )
{
- DueTo dueTo = (DueTo) dueTo1;
namesEmailMap.put( dueTo.getName(), dueTo.getEmail() );
}
@@ -374,7 +373,7 @@
* @param sink The sink
* @param fixes The List of issues specified as fixes elements
*/
- private void constructIssueLink( String issue, String system, Sink sink, List fixes )
+ private void constructIssueLink( String issue, String system, Sink sink, List<FixedIssue> fixes )
{
if ( StringUtils.isNotEmpty( issue ) )
{
@@ -390,9 +389,9 @@
}
}
- for ( Iterator iterator = fixes.iterator(); iterator.hasNext(); )
+ for ( Iterator<FixedIssue> iterator = fixes.iterator(); iterator.hasNext(); )
{
- FixedIssue fixedIssue = (FixedIssue) iterator.next();
+ FixedIssue fixedIssue = iterator.next();
String currentIssueId = fixedIssue.getIssue();
if ( StringUtils.isNotEmpty( currentIssueId ) )
{
@@ -411,14 +410,13 @@
}
/**
- * Construct a text that references (but does not link to) the issues that
- * were solved by an action.
+ * Construct a text that references (but does not link to) the issues that were solved by an action.
*
* @param issue The issue specified by attributes
* @param sink The sink
* @param fixes The List of issues specified as fixes elements
*/
- private void constructIssueText( String issue, Sink sink, List fixes )
+ private void constructIssueText( String issue, Sink sink, List<FixedIssue> fixes )
{
if ( StringUtils.isNotEmpty( issue ) )
{
@@ -430,9 +428,9 @@
}
}
- for ( Iterator iterator = fixes.iterator(); iterator.hasNext(); )
+ for ( Iterator<FixedIssue> iterator = fixes.iterator(); iterator.hasNext(); )
{
- FixedIssue fixedIssue = (FixedIssue) iterator.next();
+ FixedIssue fixedIssue = iterator.next();
String currentIssueId = fixedIssue.getIssue();
if ( StringUtils.isNotEmpty( currentIssueId ) )
@@ -447,7 +445,7 @@
}
}
- private void constructReleaseHistory( Sink sink, ResourceBundle bundle, List releaseList )
+ private void constructReleaseHistory( Sink sink, ResourceBundle bundle, List<Release> releaseList )
{
sink.section2();
@@ -467,10 +465,8 @@
sink.tableRow_();
- for ( Object aReleaseList : releaseList )
+ for ( Release release : releaseList )
{
- Release release = (Release) aReleaseList;
-
sink.tableRow();
sinkCellLink( sink, release.getVersion(), "#" + HtmlTools.encodeId( release.getVersion() ) );
@@ -506,11 +502,10 @@
* @param bundle Resource bundle
* @param releaseList Releases to create content for
*/
- private void constructReleases( Sink sink, ResourceBundle bundle, List releaseList )
+ private void constructReleases( Sink sink, ResourceBundle bundle, List<Release> releaseList )
{
- for ( Object aReleaseList : releaseList )
+ for ( Release release : releaseList )
{
- Release release = (Release) aReleaseList;
constructRelease( sink, bundle, release );
}
}
@@ -531,8 +526,7 @@
SinkEventAttributes attrs = new SinkEventAttributeSet();
attrs.addAttribute( SinkEventAttributes.ID, HtmlTools.encodeId( release.getVersion() ) );
sink.sectionTitle( Sink.SECTION_LEVEL_2, attrs );
- sink.text( bundle.getString( "report.changes.label.release" ) + " "
- + release.getVersion() + date );
+ sink.text( bundle.getString( "report.changes.label.release" ) + " " + release.getVersion() + date );
sink.sectionTitle_( Sink.SECTION_LEVEL_2 );
if ( isReleaseEmpty( release ) )
@@ -573,8 +567,8 @@
}
/**
- * Constructs table rows for specified release component. It will create header row for
- * component name and action rows for all component issues.
+ * Constructs table rows for specified release component. It will create header row for component name and action
+ * rows for all component issues.
*
* @param sink Sink
* @param bundle Resource bundle
Index: src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java (working copy)
@@ -33,7 +33,6 @@
import org.xml.sax.SAXParseException;
/**
- *
* Goal which validate the <code>changes.xml</code> file.
*
* @author Olivier Lamy
@@ -68,7 +67,7 @@
@Parameter( property = "changes.xmlPath", defaultValue = "src/changes/changes.xml" )
private File xmlPath;
- /**
+ /**
* @see org.apache.maven.plugin.Mojo#execute()
*/
public void execute()
@@ -89,8 +88,8 @@
try
{
- XmlValidationHandler xmlValidationHandler = changesSchemaValidator
- .validateXmlWithSchema( xmlPath, changesXsdVersion, failOnError );
+ XmlValidationHandler xmlValidationHandler =
+ changesSchemaValidator.validateXmlWithSchema( xmlPath, changesXsdVersion, failOnError );
boolean hasErrors = !xmlValidationHandler.getErrors().isEmpty();
if ( hasErrors )
{
Index: src/main/java/org/apache/maven/plugin/changes/ChangesXML.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/ChangesXML.java (revision 1685874)
+++ src/main/java/org/apache/maven/plugin/changes/ChangesXML.java (working copy)
@@ -19,18 +19,38 @@
* under the License.
*/
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Collections;
+import java.util.List;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugins.changes.model.Body;
import org.apache.maven.plugins.changes.model.ChangesDocument;
import org.apache.maven.plugins.changes.model.Properties;
+import org.apache.maven.plugins.changes.model.Release;
import org.apache.maven.plugins.changes.model.io.xpp3.ChangesXpp3Reader;
import org.codehaus.plexus.util.IOUtil;
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.Collections;
-import java.util.List;
-
/**
* A facade for a changes.xml file.
*
@@ -40,7 +60,7 @@
{
/** The list of releases in the changes.xml file. */
- private List releaseList;
+ private List<Release> releaseList;
/** The author in the changes.xml file. */
private String author;
@@ -56,11 +76,13 @@
/**
* Constructor that sets the changes.xml file and the logger.
+ *
* @param xmlPath the changes.xml file
* @param log the logger
* @throws ChangesXMLRuntimeException if there was a fatal error while parsing the changes.xml file
*/
- public ChangesXML( File xmlPath, Log log ) throws ChangesXMLRuntimeException
+ public ChangesXML( File xmlPath, Log log )
+ throws ChangesXMLRuntimeException
{
if ( xmlPath == null || !xmlPath.exists() )
@@ -97,10 +119,8 @@
this.title = properties.getTitle();
}
-
Body body = changesDocument.getBody();
-
if ( body != null )
{
this.releaseList = body.getReleases();
@@ -120,6 +140,7 @@
/**
* Sets the {@link ChangesXML#author} attribute.
+ *
* @param author the new value of the {@link ChangesXML#author} attribute
*/
public void setAuthor( String author )
@@ -129,6 +150,7 @@
/**
* Returns the current value of the author attribute.
+ *
* @return the current value of the author attribute
*/
public String getAuthor()
@@ -138,9 +160,10 @@
/**
* Sets the {@link ChangesXML#releaseList} attribute.
+ *
* @param releaseList the new value of the {@link ChangesXML#releaseList} attribute
*/
- public void setReleaseList( List releaseList )
+ public void setReleaseList( List<Release> releaseList )
{
this.releaseList = releaseList;
}
@@ -147,15 +170,17 @@
/**
* Returns the current value of the {@link ChangesXML#releaseList} attribute.
+ *
* @return the current value of the {@link ChangesXML#releaseList} attribute
*/
- public List getReleaseList()
+ public List<Release> getReleaseList()
{
- return releaseList == null ? Collections.EMPTY_LIST : releaseList;
+ return releaseList == null ? Collections.<Release>emptyList() : releaseList;
}
/**
* Sets the {@link ChangesXML#title} attribute.
+ *
* @param title the new value of the {@link ChangesXML#title} attribute
*/
public void setTitle( String title )
@@ -165,6 +190,7 @@
/**
* Returns the current value of the {@link ChangesXML#title} attribute.
+ *
* @return the current value of the {@link ChangesXML#title} attribute
*/
public String getTitle()
@@ -173,7 +199,8 @@
}
/**
- Returns the current value of the {@link ChangesXML#changesDocument} attribute.
+ * Returns the current value of the {@link ChangesXML#changesDocument} attribute.
+ *
* @return the current value of the {@link ChangesXML#changesDocument} attribute
*/
public ChangesDocument getChangesDocument()
@@ -183,6 +210,7 @@
/**
* Returns the current value of the {@link ChangesXML#authorEmail} attribute.
+ *
* @return the current value of the {@link ChangesXML#authorEmail} attribute
*/
public String getAuthorEmail()
@@ -192,6 +220,7 @@
/**
* Sets the {@link ChangesXML#authorEmail} attribute.
+ *
* @param authorEmail the new value of the {@link ChangesXML#authorEmail} attribute
*/
public void setAuthorEmail( String authorEmail )
Index: src/main/java/org/apache/maven/plugin/changes/ChangesXMLRuntimeException.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/ChangesXMLRuntimeException.java (revision 1685874)
+++ src/main/java/org/apache/maven/plugin/changes/ChangesXMLRuntimeException.java (working copy)
@@ -21,8 +21,8 @@
/**
* This is a runtime exception class that is thrown by the
- * {@link ChangesXML#ChangesXML(java.io.File, org.apache.maven.plugin.logging.Log)} constructor if the given
- * changes.xml file cannot be parsed, for example it is not well-formed or valid.
+ * {@link ChangesXML#ChangesXML(java.io.File, org.apache.maven.plugin.logging.Log)} constructor if the given changes.xml
+ * file cannot be parsed, for example it is not well-formed or valid.
*
* @author <a href="mailto:szgabsz91@gmail.com">Gabor Szabo</a>
*/
Index: src/main/java/org/apache/maven/plugin/changes/FeedGenerator.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/FeedGenerator.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/FeedGenerator.java (working copy)
@@ -44,19 +44,21 @@
import org.apache.maven.plugins.changes.model.Release;
-
/**
- *
* @author ltheussl
*/
public class FeedGenerator
{
private final ResourceBundle rbundle;
+
private final SyndFeed feed;
private String link;
+
private String title;
+
private String author;
+
private DateFormat dateFormat;
/**
@@ -121,8 +123,7 @@
}
/**
- * Set the date format.
- * This should match the date format used for the release dates in changes.xml.
+ * Set the date format. This should match the date format used for the release dates in changes.xml.
*
* @param dateFormat may be null.
*/
@@ -157,7 +158,6 @@
* "rss_0.92", "rss_0.93", "rss_0.94", "rss_1.0", "rss_2.0", "atom_0.3", "atom_1.0"</code>.
*
* @param type the feed type to check. May be null.
- *
* @return true if if the given type is supported by the rome library, false otherwise.
*/
public boolean isSupportedFeedType( final String type )
@@ -169,7 +169,6 @@
* A List of supported feed types.
*
* @return a List of supported feed types.
- *
* @see #isSupportedFeedType(java.lang.String)
*/
@SuppressWarnings( "unchecked" )
@@ -182,11 +181,9 @@
* Extract a feed and export it to a Writer.
*
* @param releases the List of Releases. Only the last release is used in the feed.
- * @param feedType The type of the feed to generate.
- * See {@link #isSupportedFeedType(java.lang.String)} for supported values.
- *
+ * @param feedType The type of the feed to generate. See {@link #isSupportedFeedType(java.lang.String)} for
+ * supported values.
* @param writer a Writer. Note that this is not flushed nor closed upon exit.
- *
* @throws IOException if an error occurs during export.
*/
public void export( final List<Release> releases, final String feedType, final Writer writer )
@@ -199,8 +196,8 @@
feed.setLink( link );
feed.setDescription( rbundle.getString( "report.changes.text.rssfeed.description" ) );
feed.setLanguage( rbundle.getLocale().getLanguage() );
- //feed.setCopyright( );
- //feed.setEncoding();
+ // feed.setCopyright( );
+ // feed.setEncoding();
feed.setEntries( getEntries( releases ) );
try
@@ -250,9 +247,8 @@
}
// TODO: localize?
- sb.append( "<p>Version " )
- .append( release.getVersion() ).append( " is available with " )
- .append( release.getActions().size() ).append( " fixed issues.</p>" );
+ sb.append( "<p>Version " ).append( release.getVersion() ).append( " is available with " );
+ sb.append( release.getActions().size() ).append( " fixed issues.</p>" );
syndContent.setValue( sb.toString() );
Index: src/main/java/org/apache/maven/plugin/changes/IssueAdapter.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/IssueAdapter.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/IssueAdapter.java (working copy)
@@ -40,6 +40,7 @@
public class IssueAdapter
{
private static final String UNKNOWN_ISSUE_TYPE = "";
+
private IssueManagementSystem ims;
/**
Index: src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/ProjectUtils.java (working copy)
@@ -38,8 +38,8 @@
* @param issueManagementSystem The name of the issue management system that is required
* @param mojoResult What the calling mojo produces, used in the error messages
* @param log A log
- * @return <code>true</code> if the <issueManagement> element of the POM is complete,
- * otherwise <code>false</code>
+ * @return <code>true</code> if the <issueManagement> element of the POM is complete, otherwise
+ * <code>false</code>
*/
public static boolean validateIfIssueManagementComplete( MavenProject project, String issueManagementSystem,
String mojoResult, Log log )
Index: src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java (working copy)
@@ -47,8 +47,7 @@
}
/**
- * Get the latest release by matching the supplied releases
- * with the version from the pom.
+ * Get the latest release by matching the supplied releases with the version from the pom.
*
* @param releases list of releases
* @param pomVersion Version of the artifact
@@ -94,8 +93,8 @@
{
if ( getLog().isDebugEnabled() )
{
- getLog().debug( "The release: " + release.getVersion()
- + " has " + release.getActions().size() + " actions." );
+ getLog().debug( "The release: " + release.getVersion() + " has " + release.getActions().size()
+ + " actions." );
}
if ( release.getVersion() != null && release.getVersion().equals( version ) )
@@ -125,9 +124,8 @@
}
/**
- * 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.
+ * 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.
*
* @param firstReleases Releases from the first issue tracker
* @param secondReleases Releases from the second issue tracker
@@ -179,14 +177,13 @@
}
/**
- * Convert an untyped List of Release objects that comes from changes.xml
- * into a typed List of Release objects.
+ * Convert an untyped List of Release objects that comes from changes.xml into a typed List of Release objects.
*
* @param changesReleases An untyped List of Release objects
* @return A type List of Release objects
* @todo When Modello can generate typed collections this method is no longer needed
*/
- public List<Release> convertReleaseList( List changesReleases )
+ public List<Release> convertReleaseList( List<Release> changesReleases )
{
List<Release> releases = new ArrayList<Release>();
@@ -201,10 +198,9 @@
}
/**
- * Merge releases from parent component with releases from child component.
- * If a release is found in both components, i.e. they have the same version,
- * their issues are merged into one (parent) release with component marker
- * for component issues.
+ * Merge releases from parent component with releases from child component. If a release is found in both
+ * components, i.e. they have the same version, their issues are merged into one (parent) release with component
+ * marker for component issues.
*
* @param releases Releases from the parent component
* @param componentName child component name (retrieved from project name)
@@ -211,11 +207,12 @@
* @param componentReleases Releases from the child component
* @return A list containing the merged releases
*/
- public List mergeReleases( final List releases, final String componentName, final List componentReleases )
+ public List<Release> mergeReleases( final List<Release> releases, final String componentName,
+ final List<Release> componentReleases )
{
if ( releases == null && componentReleases == null )
{
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
if ( componentReleases == null )
{
@@ -222,7 +219,7 @@
return releases;
}
- final List mergedReleases = new ArrayList();
+ final List<Release> mergedReleases = new ArrayList<Release>();
if ( releases != null )
{
@@ -257,12 +254,9 @@
private static String toString( Release release )
{
- return release.getClass().getSimpleName()
- + "[version='" + release.getVersion() + "'"
- + ", date='" + release.getDateRelease() + "'"
- + ", description='" + release.getDescription() + "'"
- + ", actionsSize=" + release.getActions().size()
- + "]";
+ return release.getClass().getSimpleName() + "[version='" + release.getVersion() + "'" + ", date='"
+ + release.getDateRelease() + "'" + ", description='" + release.getDescription() + "'" + ", actionsSize="
+ + release.getActions().size() + "]";
}
public static String toString( List<Release> releases )
Index: src/main/java/org/apache/maven/plugin/changes/schema/DefaultChangesSchemaValidator.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/schema/DefaultChangesSchemaValidator.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/schema/DefaultChangesSchemaValidator.java (working copy)
@@ -23,18 +23,16 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
+import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.io.input.XmlStreamReader;
-
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Validator;
-import org.codehaus.plexus.util.FastMap;
+import org.apache.commons.io.input.XmlStreamReader;
import org.codehaus.plexus.util.IOUtil;
-
import org.xml.sax.SAXException;
/**
@@ -54,7 +52,7 @@
public static final String CHANGES_SCHEMA_PATH = "META-INF/changes/xsd/";
- private Map compiledSchemas = new FastMap();
+ private Map<String, Schema> compiledSchemas = new HashMap<String, Schema>();
public XmlValidationHandler validateXmlWithSchema( File file, String schemaVersion, boolean failOnValidationError )
throws SchemaValidatorException
Index: src/main/java/org/apache/maven/plugin/changes/schema/SchemaValidatorException.java
===================================================================
--- src/main/java/org/apache/maven/plugin/changes/schema/SchemaValidatorException.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/changes/schema/SchemaValidatorException.java (working copy)
@@ -27,8 +27,13 @@
public class SchemaValidatorException
extends Exception
{
-
+
/**
+ * Generated serial UID.
+ */
+ private static final long serialVersionUID = -8265574906534248274L;
+
+ /**
* @param message
* @param cause
*/
Index: src/main/java/org/apache/maven/plugin/github/GitHubDownloader.java
===================================================================
--- src/main/java/org/apache/maven/plugin/github/GitHubDownloader.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/github/GitHubDownloader.java (working copy)
@@ -75,7 +75,7 @@
public GitHubDownloader( MavenProject project, String githubScheme, int githubPort, boolean includeOpenIssues,
boolean onlyMilestoneIssues )
- throws MalformedURLException
+ throws MalformedURLException
{
this.includeOpenIssues = includeOpenIssues;
this.onlyMilestoneIssues = onlyMilestoneIssues;
@@ -114,8 +114,8 @@
if ( urlPathParts.length != 3 )
{
- throw new MalformedURLException(
- "GitHub issue management URL must look like, [GITHUB_DOMAIN]/[OWNER]/[REPO]/issues" );
+ throw new MalformedURLException( "GitHub issue management URL must look like, "
+ + "[GITHUB_DOMAIN]/[OWNER]/[REPO]/issues" );
}
this.githubOwner = urlPathParts[0];
@@ -227,9 +227,9 @@
configured = true;
break;
-}
+ }
}
-
+
if ( !configured )
{
log.warn( "Can't find server id [" + githubAPIServerId + "] configured in githubAPIServerId." );
Index: src/main/java/org/apache/maven/plugin/github/GitHubIssueManagementSystem.java
===================================================================
--- src/main/java/org/apache/maven/plugin/github/GitHubIssueManagementSystem.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/github/GitHubIssueManagementSystem.java (working copy)
@@ -23,7 +23,6 @@
import org.apache.maven.plugin.issues.AbstractIssueManagementSystem;
/**
- *
* @since 2.8
*/
public class GitHubIssueManagementSystem
Index: src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/github/GitHubMojo.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/github/GitHubMojo.java (working copy)
@@ -38,8 +38,7 @@
import java.util.ResourceBundle;
/**
- * Goal which downloads issues from GitHub and generates a
- * report.
+ * Goal which downloads issues from GitHub and generates a report.
*
* @author Bryan Baugher
* @since 2.8
@@ -52,31 +51,27 @@
/**
* Valid Github columns.
*/
- @SuppressWarnings( "checkstyle:staticvariablename" )
- private static Map<String, Integer> GITHUB_COLUMNS = new HashMap<String, Integer>();
+ private static Map<String, Integer> githubColumns = new HashMap<String, Integer>();
static
{
- GITHUB_COLUMNS.put( "Assignee", IssuesReportHelper.COLUMN_ASSIGNEE );
- GITHUB_COLUMNS.put( "Created", IssuesReportHelper.COLUMN_CREATED );
- GITHUB_COLUMNS.put( "Fix Version", IssuesReportHelper.COLUMN_FIX_VERSION );
- GITHUB_COLUMNS.put( "Id", IssuesReportHelper.COLUMN_ID );
- GITHUB_COLUMNS.put( "Reporter", IssuesReportHelper.COLUMN_REPORTER );
- GITHUB_COLUMNS.put( "Status", IssuesReportHelper.COLUMN_STATUS );
- GITHUB_COLUMNS.put( "Summary", IssuesReportHelper.COLUMN_SUMMARY );
- GITHUB_COLUMNS.put( "Type", IssuesReportHelper.COLUMN_TYPE );
- GITHUB_COLUMNS.put( "Updated", IssuesReportHelper.COLUMN_UPDATED );
+ githubColumns.put( "Assignee", IssuesReportHelper.COLUMN_ASSIGNEE );
+ githubColumns.put( "Created", IssuesReportHelper.COLUMN_CREATED );
+ githubColumns.put( "Fix Version", IssuesReportHelper.COLUMN_FIX_VERSION );
+ githubColumns.put( "Id", IssuesReportHelper.COLUMN_ID );
+ githubColumns.put( "Reporter", IssuesReportHelper.COLUMN_REPORTER );
+ githubColumns.put( "Status", IssuesReportHelper.COLUMN_STATUS );
+ githubColumns.put( "Summary", IssuesReportHelper.COLUMN_SUMMARY );
+ githubColumns.put( "Type", IssuesReportHelper.COLUMN_TYPE );
+ githubColumns.put( "Updated", IssuesReportHelper.COLUMN_UPDATED );
}
/**
- * Sets the column names that you want to show in the report. The columns
- * will appear in the report in the same order as you specify them here.
- * Multiple values can be separated by commas.
+ * Sets the column names that you want to show in the report. The columns will appear in the report in the same
+ * order as you specify them here. Multiple values can be separated by commas.
* <p>
- * Valid columns are: <code>Assignee</code>, <code>Created</code>,
- * <code>Fix Version</code>, <code>Id</code>, <code>Reporter</code>,
- * <code>Status</code>, <code>Summary</code>, <code>Type</code> and
- * <code>Updated</code>.
+ * Valid columns are: <code>Assignee</code>, <code>Created</code>, <code>Fix Version</code>, <code>Id</code>,
+ * <code>Reporter</code>, <code>Status</code>, <code>Summary</code>, <code>Type</code> and <code>Updated</code>.
* </p>
*/
@Parameter( defaultValue = "Id,Type,Summary,Assignee,Reporter,Status,Created,Updated,Fix Version" )
@@ -120,9 +115,8 @@
private boolean onlyMilestoneIssues;
/**
- * If you only want to show issues for the current version in the report.
- * The current version being used is <code>${project.version}</code> minus
- * any "-SNAPSHOT" suffix.
+ * If you only want to show issues for the current version in the report. The current version being used is
+ * <code>${project.version}</code> minus any "-SNAPSHOT" suffix.
*/
@Parameter( defaultValue = "false" )
private boolean onlyCurrentVersion;
@@ -143,7 +137,7 @@
}
/* --------------------------------------------------------------------- */
- /* Public methods */
+ /* Public methods */
/* --------------------------------------------------------------------- */
/**
@@ -166,12 +160,12 @@
{
// Validate parameters
- List<Integer> columnIds = IssuesReportHelper.getColumnIds( columnNames, GITHUB_COLUMNS );
+ List<Integer> columnIds = IssuesReportHelper.getColumnIds( columnNames, githubColumns );
if ( columnIds.size() == 0 )
{
// This can happen if the user has configured column names and they are all invalid
- throw new MavenReportException(
- "maven-changes-plugin: None of the configured columnNames '" + columnNames + "' are valid." );
+ throw new MavenReportException( "maven-changes-plugin: None of the configured columnNames '" + columnNames
+ + "' are valid." );
}
try
@@ -215,7 +209,7 @@
}
/* --------------------------------------------------------------------- */
- /* Private methods */
+ /* Private methods */
/* --------------------------------------------------------------------- */
private ResourceBundle getBundle( Locale locale )
Index: src/main/java/org/apache/maven/plugin/issues/AbstractIssueManagementSystem.java
===================================================================
--- src/main/java/org/apache/maven/plugin/issues/AbstractIssueManagementSystem.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/issues/AbstractIssueManagementSystem.java (working copy)
@@ -31,9 +31,8 @@
* modularity for support of multiple systems.<br>
* Initially, all it provides is a structure for mapping from per-IMS issue types to the three categories defined in
* {@link org.apache.maven.plugin.changes.IssueAdapter}. <br/>
- * Note that the map in here is <strong>not</strong> immutable. It contains the default
- * configuration for an IMS. Users are expected to add entries to the map via configuration
- * to reflect their customizations.
+ * Note that the map in here is <strong>not</strong> immutable. It contains the default configuration for an IMS. Users
+ * are expected to add entries to the map via configuration to reflect their customizations.
*
* @version $Id$
*/
@@ -47,7 +46,8 @@
issueTypeMap = new HashMap<String, IssueType>();
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.apache.maven.plugin.issues.IssueManagementSystem#getIssueTypeMap()
*/
public Map<String, IssueType> getIssueTypeMap()
@@ -54,13 +54,15 @@
{
return issueTypeMap;
}
-
- /* (non-Javadoc)
+
+ /*
+ * (non-Javadoc)
* @see org.apache.maven.plugin.issues.IssueManagementSystem#getName()
*/
public abstract String getName();
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.apache.maven.plugin.issues.IssueManagementSystem#applyConfiguration(java.util.Map)
*/
public void applyConfiguration( Map<String, String> issueTypes )
@@ -75,7 +77,7 @@
}
String imsTypes = me.getValue();
String[] imsTypeArray = imsTypes.split( "," );
- for ( String imsType : imsTypeArray )
+ for ( String imsType : imsTypeArray )
{
issueTypeMap.put( imsType, type );
}
Index: src/main/java/org/apache/maven/plugin/issues/Issue.java
===================================================================
--- src/main/java/org/apache/maven/plugin/issues/Issue.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/issues/Issue.java (working copy)
@@ -254,10 +254,7 @@
public String toString()
{
- return this.getClass().getSimpleName()
- + "[id='" + this.getId() + "'"
- + ", title='" + this.getTitle() + "'"
- + ", fixVersions='" + this.getFixVersions() + "'"
- + "]";
+ return this.getClass().getSimpleName() + "[id='" + this.getId() + "'" + ", title='" + this.getTitle() + "'"
+ + ", fixVersions='" + this.getFixVersions() + "'" + "]";
}
}
Index: src/main/java/org/apache/maven/plugin/issues/IssueManagementSystem.java
===================================================================
--- src/main/java/org/apache/maven/plugin/issues/IssueManagementSystem.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/issues/IssueManagementSystem.java (working copy)
@@ -53,7 +53,7 @@
* Configure this issue management system.
*
* @param issueTypes The mapping of issue types used in this issue management system to the ones used in a
- * changes.xml file
+ * changes.xml file
* @throws MojoExecutionException If the configuration fails
*/
void applyConfiguration( Map<String, String> issueTypes )
Index: src/main/java/org/apache/maven/plugin/issues/IssueUtils.java
===================================================================
--- src/main/java/org/apache/maven/plugin/issues/IssueUtils.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/issues/IssueUtils.java (working copy)
@@ -41,8 +41,7 @@
* @param issues A list of issues
* @param prefix The prefix of the "Fix Version" that should match
* @return A <code>List</code> of issues fixed in versions that match the supplied prefix
- * @throws org.apache.maven.plugin.MojoExecutionException
- * If no issues could be found for the supplied prefix
+ * @throws org.apache.maven.plugin.MojoExecutionException If no issues could be found for the supplied prefix
*/
public static List<Issue> filterIssuesWithVersionPrefix( List<Issue> issues, String prefix )
throws MojoExecutionException
@@ -78,16 +77,14 @@
}
/**
- * Find the issues for only the supplied version, by matching the "Fix for"
- * version in the supplied list of issues with the supplied version.
- * If the supplied version is a SNAPSHOT, then that part of the version
- * will be removed prior to the matching.
+ * Find the issues for only the supplied version, by matching the "Fix for" version in the supplied list of issues
+ * with the supplied version. If the supplied version is a SNAPSHOT, then that part of the version will be removed
+ * prior to the matching.
*
* @param issues A list of issues
* @param version The version that issues should be returned for
* @return A <code>List</code> of issues for the supplied version
- * @throws org.apache.maven.plugin.MojoExecutionException
- * If no issues could be found for the supplied version
+ * @throws org.apache.maven.plugin.MojoExecutionException If no issues could be found for the supplied version
*/
public static List<Issue> getIssuesForVersion( List<Issue> issues, String version )
throws MojoExecutionException
Index: src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java
===================================================================
--- src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java (working copy)
@@ -34,7 +34,8 @@
* @version $Id$
* @since 2.4
*/
-public class IssuesReportGenerator extends AbstractIssuesReportGenerator
+public class IssuesReportGenerator
+ extends AbstractIssuesReportGenerator
{
/**
* Fallback value that is used if date field are not available.
@@ -42,8 +43,7 @@
private static final String NOT_AVAILABLE = "n/a";
/**
- * Holds the id:s for the columns to include in the report, in the order
- * that they should appear in the report.
+ * Holds the id:s for the columns to include in the report, in the order that they should appear in the report.
*/
private int[] columns;
@@ -68,7 +68,7 @@
sinkEndReport( sink );
}
- public void doGenerateReport( ResourceBundle bundle, Sink sink, List issueList )
+ public void doGenerateReport( ResourceBundle bundle, Sink sink, List<Issue> issueList )
{
sinkBeginReport( sink, bundle );
@@ -82,7 +82,7 @@
sinkEndReport( sink );
}
- private void constructHeaderRow( Sink sink, List issueList, ResourceBundle bundle )
+ private void constructHeaderRow( Sink sink, List<Issue> issueList, ResourceBundle bundle )
{
if ( issueList == null )
{
@@ -162,7 +162,7 @@
sink.tableRow_();
}
- private void constructDetailRows( Sink sink, List issueList, ResourceBundle bundle, Locale locale )
+ private void constructDetailRows( Sink sink, List<Issue> issueList, ResourceBundle bundle, Locale locale )
{
if ( issueList == null )
{
@@ -169,13 +169,11 @@
return;
}
- for ( Object anIssueList : issueList )
+ for ( Issue issue : issueList )
{
// Use a DateFormat based on the Locale
DateFormat df = DateFormat.getDateInstance( DateFormat.SHORT, locale );
- Issue issue = (Issue) anIssueList;
-
sink.tableRow();
for ( int column : columns )
Index: src/main/java/org/apache/maven/plugin/issues/IssuesReportHelper.java
===================================================================
--- src/main/java/org/apache/maven/plugin/issues/IssuesReportHelper.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/issues/IssuesReportHelper.java (working copy)
@@ -77,10 +77,9 @@
}
/**
- * Get a list of id:s for the columns that are to be included in the report.
- * This method also handles deprecated column names, which will still work.
- * If deprecated column names are used they generate a warning, indicating
- * the replacement column name.
+ * Get a list of id:s for the columns that are to be included in the report. This method also handles deprecated
+ * column names, which will still work. If deprecated column names are used they generate a warning, indicating the
+ * replacement column name.
*
* @param columnNames The names of the columns
* @param allColumns A mapping from column name to column id
@@ -115,7 +114,7 @@
if ( log != null )
{
log.warn( "The columnName '" + columnName + "' has been deprecated." + " Please use "
- + "the columnName '" + bidiColumns.getKey( columnId ) + "' instead." );
+ + "the columnName '" + bidiColumns.getKey( columnId ) + "' instead." );
}
}
}
Index: src/main/java/org/apache/maven/plugin/jira/AbstractJiraDownloader.java
===================================================================
--- src/main/java/org/apache/maven/plugin/jira/AbstractJiraDownloader.java (revision 1685762)
+++ src/main/java/org/apache/maven/plugin/jira/AbstractJiraDownloader.java (working copy)
@@ -34,8 +34,8 @@
import java.util.List;
/**
- * Abstract API, more or less, to retrieving issue information from JIRA.
- * Intended to have subclasses for the old (RSS) and new (REST) ways of doing things.
[... 2193 lines stripped ...]