You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2011/01/17 23:14:03 UTC
svn commit: r1060111 - in
/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin:
announcement/ changes/ jira/ trac/
Author: dennisl
Date: Mon Jan 17 22:14:03 2011
New Revision: 1060111
URL: http://svn.apache.org/viewvc?rev=1060111&view=rev
Log:
o Refactoring: Sort mojo parameters and methods.
Modified:
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java?rev=1060111&r1=1060110&r2=1060111&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java Mon Jan 17 22:14:03 2011
@@ -53,33 +53,39 @@ public class AnnouncementMailMojo
//=========================================
/**
- * @parameter expression="${project}"
+ * Possible senders.
+ *
+ * @parameter expression="${project.developers}"
+ * @required
* @readonly
*/
- private MavenProject project;
+ private List from;
/**
- * Smtp Server.
+ * 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 expression="${changes.smtpHost}"
- * @required
+ * @parameter expression="${changes.fromDeveloperId}"
*/
- private String smtpHost;
+ private String fromDeveloperId;
/**
- * Port.
- *
- * @parameter default-value="25" expression="${changes.smtpPort}"
+ * Mail content type to use.
+ * @parameter default-value="text/plain"
* @required
+ * @since 2.1
*/
- private int smtpPort;
+ private String mailContentType;
/**
- * The username used to send the email.
+ * 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.
*
- * @parameter expression="${changes.username}"
+ * @parameter expression="${changes.mailSender}"
*/
- private String username;
+ private MailSender mailSender;
/**
* The password used to send the email.
@@ -89,55 +95,50 @@ public class AnnouncementMailMojo
private String password;
/**
- * If the email should be sent in SSL mode.
- *
- * @parameter default-value="false" expression="${changes.sslMode}"
+ * @parameter expression="${project}"
+ * @readonly
*/
- private boolean sslMode;
+ private MavenProject project;
/**
- * Subject for the email.
+ * Smtp Server.
*
- * @parameter default-value="[ANNOUNCEMENT] - ${project.name} ${project.version} released" expression="${changes.subject}"
+ * @parameter expression="${changes.smtpHost}"
* @required
*/
- private String subject;
+ private String smtpHost;
/**
- * 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.
+ * Port.
*
- * @parameter expression="${changes.fromDeveloperId}"
+ * @parameter default-value="25" expression="${changes.smtpPort}"
+ * @required
*/
- private String fromDeveloperId;
+ private int smtpPort;
/**
- * 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.
+ * If the email should be sent in SSL mode.
*
- * @parameter expression="${changes.mailSender}"
+ * @parameter default-value="false" expression="${changes.sslMode}"
*/
- private MailSender mailSender;
+ private boolean sslMode;
/**
- * Recipient email address.
+ * Subject for the email.
*
- * @parameter
+ * @parameter default-value="[ANNOUNCEMENT] - ${project.name} ${project.version} released" expression="${changes.subject}"
* @required
*/
- private List toAddresses;
+ private String subject;
/**
- * Possible senders.
+ * The Velocity template used to format the announcement.
*
- * @parameter expression="${project.developers}"
+ * @parameter default-value="announcement.vm" expression="${changes.template}"
* @required
- * @readonly
*/
- private List from;
+ private String template;
/**
* Directory which contains the template for announcement email.
@@ -148,20 +149,19 @@ public class AnnouncementMailMojo
private File templateOutputDirectory;
/**
- * The Velocity template used to format the announcement.
+ * Recipient email address.
*
- * @parameter default-value="announcement.vm" expression="${changes.template}"
+ * @parameter
* @required
*/
- private String template;
+ private List toAddresses;
/**
- * Mail content type to use.
- * @parameter default-value="text/plain"
- * @required
- * @since 2.1
+ * The username used to send the email.
+ *
+ * @parameter expression="${changes.username}"
*/
- private String mailContentType;
+ private String username;
private ProjectJavamailMailSender mailer = new ProjectJavamailMailSender();
@@ -341,44 +341,44 @@ public class AnnouncementMailMojo
// announcement-mail accessors
//================================
- public String getSmtpHost()
+ public List getFrom()
{
- return smtpHost;
+ return from;
}
- public void setSmtpHost( String smtpHost )
+ public void setFrom( List from )
{
- this.smtpHost = smtpHost;
+ this.from = from;
}
- public int getSmtpPort()
+ public String getFromDeveloperId()
{
- return smtpPort;
+ return fromDeveloperId;
}
- public void setSmtpPort( int smtpPort )
+ public void setFromDeveloperId( String fromDeveloperId )
{
- this.smtpPort = smtpPort;
+ this.fromDeveloperId = fromDeveloperId;
}
- public String getSubject()
+ public MailSender getMailSender()
{
- return subject;
+ return mailSender;
}
- public void setSubject( String subject )
+ public void setMailSender( MailSender mailSender )
{
- this.subject = subject;
+ this.mailSender = mailSender;
}
- public List getFrom()
+ public String getPassword()
{
- return from;
+ return password;
}
- public void setFrom( List from )
+ public void setPassword( String password )
{
- this.from = from;
+ this.password = password;
}
public MavenProject getProject()
@@ -391,84 +391,83 @@ public class AnnouncementMailMojo
this.project = project;
}
- public List getToAddresses()
+ public String getSmtpHost()
{
- return toAddresses;
+ return smtpHost;
}
- public void setToAddresses( List toAddresses )
+ public void setSmtpHost( String smtpHost )
{
- this.toAddresses = toAddresses;
+ this.smtpHost = smtpHost;
}
- public String getFromDeveloperId()
+ public int getSmtpPort()
{
- return fromDeveloperId;
+ return smtpPort;
}
- public void setFromDeveloperId( String fromDeveloperId )
+ public void setSmtpPort( int smtpPort )
{
- this.fromDeveloperId = fromDeveloperId;
+ this.smtpPort = smtpPort;
}
-
- public String getUsername()
+ public boolean isSslMode()
{
- return username;
+ return sslMode;
}
- public void setUsername( String username )
+ public void setSslMode( boolean sslMode )
{
- this.username = username;
+ this.sslMode = sslMode;
}
- public String getPassword()
+ public String getSubject()
{
- return password;
+ return subject;
}
- public void setPassword( String password )
+ public void setSubject( String subject )
{
- this.password = password;
+ this.subject = subject;
}
- public boolean isSslMode()
+ public String getTemplate()
{
- return sslMode;
+ return template;
}
- public void setSslMode( boolean sslMode )
+ public void setTemplate( String template )
{
- this.sslMode = sslMode;
+ this.template = template;
}
- public MailSender getMailSender()
+ public File getTemplateOutputDirectory()
{
- return mailSender;
+ return templateOutputDirectory;
}
- public void setMailSender( MailSender mailSender )
+ public void setTemplateOutputDirectory( File templateOutputDirectory )
{
- this.mailSender = mailSender;
+ this.templateOutputDirectory = templateOutputDirectory;
}
- public File getTemplateOutputDirectory()
+ public List getToAddresses()
{
- return templateOutputDirectory;
+ return toAddresses;
}
- public void setTemplateOutputDirectory( File templateOutputDirectory )
+ public void setToAddresses( List toAddresses )
{
- this.templateOutputDirectory = templateOutputDirectory;
+ this.toAddresses = toAddresses;
}
- public String getTemplate()
+ public String getUsername()
{
- return template;
+ return username;
}
- public void setTemplate( String template )
+ public void setUsername( String username )
{
- this.template = template;
+ this.username = username;
}
}
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java?rev=1060111&r1=1060110&r2=1060111&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java Mon Jan 17 22:14:03 2011
@@ -63,16 +63,6 @@ public class AnnouncementMojo
private static final String JIRA = "JIRA";
- private ReleaseUtils releaseUtils = new ReleaseUtils( getLog() );
-
- /**
- * Directory where the template file will be generated.
- *
- * @parameter expression="${project.build.directory}/announcement"
- * @required
- */
- private File outputDirectory;
-
/**
* 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.
@@ -83,10 +73,13 @@ public class AnnouncementMojo
private String announcementFile;
/**
- * @parameter expression="${project.groupId}"
- * @readonly
+ * Map of custom parameters for the announcement.
+ * This Map will be passed to the template.
+ *
+ * @parameter
+ * @since 2.1
*/
- private String groupId;
+ private Map announceParameters;
/**
* @parameter expression="${project.artifactId}"
@@ -95,28 +88,13 @@ public class AnnouncementMojo
private String artifactId;
/**
- * Version of the artifact.
- *
- * @parameter expression="${changes.version}" default-value="${project.version}"
- * @required
- */
- private String version;
-
- /**
- * Distribution URL of the artifact.
+ * Name of the team that develops the artifact.
* This parameter will be passed to the template.
*
- * @parameter expression="${project.url}"
- */
- private String url;
-
- /**
- * Packaging structure for the artifact.
- *
- * @parameter expression="${project.packaging}"
- * @readonly
+ * @parameter default-value="${project.name} team" expression="${changes.developmentTeam}"
+ * @required
*/
- private String packaging;
+ private String developmentTeam;
/**
* The name of the artifact to be used in the announcement.
@@ -127,46 +105,51 @@ public class AnnouncementMojo
private String finalName;
/**
- * URL where the artifact can be downloaded. If not specified,
- * no URL is used.
- * This parameter will be passed to the template.
- *
- * @parameter
+ * @parameter expression="${project.groupId}"
+ * @readonly
*/
- private String urlDownload;
+ private String groupId;
/**
- * The path of the changes.xml file.
+ * Short description or introduction of the released artifact.
+ * This parameter will be passed to the template.
*
- * @parameter expression="${basedir}/src/changes/changes.xml"
- * @required
+ * @parameter default-value="${project.description}"
*/
- private File xmlPath;
+ private String introduction;
/**
- * Name of the team that develops the artifact.
- * This parameter will be passed to the template.
+ * 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.
*
- * @parameter default-value="${project.name} team" expression="${changes.developmentTeam}"
- * @required
+ * @parameter
+ * @since 2.4
*/
- private String developmentTeam;
+ private List issueManagementSystems;
/**
- * Short description or introduction of the released artifact.
- * This parameter will be passed to the template.
+ * Directory where the template file will be generated.
*
- * @parameter default-value="${project.description}"
+ * @parameter expression="${project.build.directory}/announcement"
+ * @required
*/
- private String introduction;
+ private File outputDirectory;
/**
- * Velocity Component.
+ * Packaging structure for the artifact.
*
- * @component role="org.codehaus.plexus.velocity.VelocityComponent" roleHint="maven-changes-plugin"
+ * @parameter expression="${project.packaging}"
* @readonly
*/
- private VelocityComponent velocity;
+ private String packaging;
/**
* The Velocity template used to format the announcement.
@@ -188,38 +171,56 @@ public class AnnouncementMojo
*/
private String templateDirectory;
- private ChangesXML xml;
+ /**
+ * The template encoding.
+ *
+ * @parameter expression="${changes.templateEncoding}" default-value="${project.build.sourceEncoding}"
+ * @since 2.1
+ */
+ private String templateEncoding;
- //=======================================//
- // JIRA-Announcement Needed Parameters //
- //=======================================//
+ /**
+ * Distribution URL of the artifact.
+ * This parameter will be passed to the template.
+ *
+ * @parameter expression="${project.url}"
+ */
+ private String url;
/**
- * The Maven Project.
+ * URL where the artifact can be downloaded. If not specified,
+ * no URL is used.
+ * This parameter will be passed to the template.
*
- * @parameter expression="${project}"
- * @required
- * @readonly
+ * @parameter
*/
- private MavenProject project;
+ private String urlDownload;
/**
- * Settings XML configuration.
+ * Velocity Component.
*
- * @parameter expression="${settings}"
- * @required
+ * @component role="org.codehaus.plexus.velocity.VelocityComponent" roleHint="maven-changes-plugin"
* @readonly
*/
- private Settings settings;
-
+ private VelocityComponent velocity;
/**
- * Flag to determine if the plugin will generate a JIRA announcement.
+ * Version of the artifact.
*
- * @parameter expression="${generateJiraAnnouncement}" default-value="false"
+ * @parameter expression="${changes.version}" default-value="${project.version}"
* @required
- * @deprecated Since version 2.4 this parameter has been deprecated. Please use the issueManagementSystems parameter instead.
*/
- private boolean generateJiraAnnouncement;
+ private String version;
+ /**
+ * The path of the changes.xml file.
+ *
+ * @parameter expression="${basedir}/src/changes/changes.xml"
+ * @required
+ */
+ private File xmlPath;
+
+ //=======================================//
+ // JIRA-Announcement Needed Parameters //
+ //=======================================//
/**
* Defines the filter parameters to restrict which issues are retrieved
@@ -232,28 +233,39 @@ public class AnnouncementMojo
private String filter;
/**
- * 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".
- * </p>
+ * Flag to determine if the plugin will generate a JIRA announcement.
*
- * @parameter default-value="Closed" expression="${changes.statusIds}"
+ * @parameter expression="${generateJiraAnnouncement}" default-value="false"
+ * @required
+ * @deprecated Since version 2.4 this parameter has been deprecated. Please use the issueManagementSystems parameter instead.
*/
- private String statusIds;
+ private boolean generateJiraAnnouncement;
/**
- * 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".
- * </p>
+ * If releases from JIRA should be merged with the releases from a
+ * changes.xml file.
*
- * @parameter default-value="Fixed" expression="${changes.resolutionIds}"
+ * @parameter expression="${changes.jiraMerge}" default-value="false"
+ * @since 2.1
+ * @deprecated Since version 2.4 this parameter has been deprecated. Please use the issueManagementSystems parameter instead.
*/
- private String resolutionIds;
+ private boolean jiraMerge;
+
+ /**
+ * Defines the JIRA password for authentication into a private JIRA installation.
+ *
+ * @parameter default-value="" expression="${changes.jiraPassword}"
+ * @since 2.1
+ */
+ private String jiraPassword;
+
+ /**
+ * Defines the JIRA username for authentication into a private JIRA installation.
+ *
+ * @parameter default-value="" expression="${changes.jiraUser}"
+ * @since 2.1
+ */
+ private String jiraUser;
/**
* Path to the JIRA XML file, which will be parsed.
@@ -286,80 +298,66 @@ public class AnnouncementMojo
private int maxEntries;
/**
- * Defines the JIRA username for authentication into a private JIRA installation.
+ * The Maven Project.
*
- * @parameter default-value="" expression="${changes.jiraUser}"
- * @since 2.1
+ * @parameter expression="${project}"
+ * @required
+ * @readonly
*/
- private String jiraUser;
+ private MavenProject project;
/**
- * Defines the JIRA password for authentication into a private JIRA installation.
+ * 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".
+ * </p>
*
- * @parameter default-value="" expression="${changes.jiraPassword}"
- * @since 2.1
+ * @parameter default-value="Fixed" expression="${changes.resolutionIds}"
*/
- private String jiraPassword;
+ private String resolutionIds;
/**
- * Defines the http user for basic authentication into the JIRA webserver.
+ * Settings XML configuration.
*
- * @parameter default-value=""
- * @since 2.4
+ * @parameter expression="${settings}"
+ * @required
+ * @readonly
*/
- private String webUser;
+ private Settings settings;
/**
- * Defines the http password for basic authentication into the JIRA webserver.
+ * 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".
+ * </p>
*
- * @parameter default-value=""
- * @since 2.4
+ * @parameter default-value="Closed" expression="${changes.statusIds}"
*/
- private String webPassword;
+ private String statusIds;
/**
- * The template encoding.
+ * Defines the http user for basic authentication into the JIRA webserver.
*
- * @parameter expression="${changes.templateEncoding}" default-value="${project.build.sourceEncoding}"
- * @since 2.1
+ * @parameter default-value=""
+ * @since 2.4
*/
- private String templateEncoding;
+ private String webUser;
/**
- * If releases from JIRA should be merged with the releases from a
- * changes.xml file.
+ * Defines the http password for basic authentication into the JIRA webserver.
*
- * @parameter expression="${changes.jiraMerge}" default-value="false"
- * @since 2.1
- * @deprecated Since version 2.4 this parameter has been deprecated. Please use the issueManagementSystems parameter instead.
+ * @parameter default-value=""
+ * @since 2.4
*/
- private boolean jiraMerge;
+ private String webPassword;
- /**
- * Map of custom parameters for the announcement.
- * This Map will be passed to the template.
- *
- * @parameter
- * @since 2.1
- */
- private Map announceParameters;
+ private ReleaseUtils releaseUtils = new ReleaseUtils( getLog() );
- /**
- * 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.
- *
- * @parameter
- * @since 2.4
- */
- private List issueManagementSystems;
+ private ChangesXML xml;
//=======================================//
// announcement-generate execution //
@@ -653,74 +651,64 @@ public class AnnouncementMojo
* accessors
*/
- public File getXmlPath()
- {
- return xmlPath;
- }
-
- public void setXmlPath( File xmlPath )
- {
- this.xmlPath = xmlPath;
- }
-
- public File getOutputDirectory()
+ public String getArtifactId()
{
- return outputDirectory;
+ return artifactId;
}
- public void setOutputDirectory( File outputDirectory )
+ public void setArtifactId( String artifactId )
{
- this.outputDirectory = outputDirectory;
+ this.artifactId = artifactId;
}
- public String getGroupId()
+ public String getDevelopmentTeam()
{
- return groupId;
+ return developmentTeam;
}
- public void setGroupId( String groupId )
+ public void setDevelopmentTeam( String developmentTeam )
{
- this.groupId = groupId;
+ this.developmentTeam = developmentTeam;
}
- public String getArtifactId()
+ public String getFinalName()
{
- return artifactId;
+ return finalName;
}
- public void setArtifactId( String artifactId )
+ public void setFinalName( String finalName )
{
- this.artifactId = artifactId;
+ this.finalName = finalName;
}
- public String getVersion()
+ public String getGroupId()
{
- return version;
+ return groupId;
}
- public void setVersion( String version )
+ public void setGroupId( String groupId )
{
- this.version = version;
+ this.groupId = groupId;
}
- public String getUrl()
+ public String getIntroduction()
{
- return url;
+ return introduction;
}
- public void setUrl( String url )
+ public void setIntroduction( String introduction )
{
- this.url = url;
+ this.introduction = introduction;
}
- public ChangesXML getXml()
+ public File getOutputDirectory()
{
- return xml;
+ return outputDirectory;
}
- public void setXml( ChangesXML xml )
+ public void setOutputDirectory( File outputDirectory )
{
- this.xml = xml;
+ this.outputDirectory = outputDirectory;
}
public String getPackaging()
@@ -733,24 +721,24 @@ public class AnnouncementMojo
this.packaging = packaging;
}
- public String getDevelopmentTeam()
+ public String getUrl()
{
- return developmentTeam;
+ return url;
}
- public void setDevelopmentTeam( String developmentTeam )
+ public void setUrl( String url )
{
- this.developmentTeam = developmentTeam;
+ this.url = url;
}
- public String getIntroduction()
+ public String getUrlDownload()
{
- return introduction;
+ return urlDownload;
}
- public void setIntroduction( String introduction )
+ public void setUrlDownload( String urlDownload )
{
- this.introduction = introduction;
+ this.urlDownload = urlDownload;
}
public VelocityComponent getVelocity()
@@ -763,23 +751,33 @@ public class AnnouncementMojo
this.velocity = velocity;
}
- public String getFinalName()
+ public String getVersion()
{
- return finalName;
+ return version;
}
- public void setFinalName( String finalName )
+ public void setVersion( String version )
{
- this.finalName = finalName;
+ this.version = version;
}
- public String getUrlDownload()
+ public ChangesXML getXml()
{
- return urlDownload;
+ return xml;
}
- public void setUrlDownload( String urlDownload )
+ public void setXml( ChangesXML xml )
{
- this.urlDownload = urlDownload;
+ this.xml = xml;
+ }
+
+ public File getXmlPath()
+ {
+ return xmlPath;
+ }
+
+ public void setXmlPath( File xmlPath )
+ {
+ this.xmlPath = xmlPath;
}
}
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java?rev=1060111&r1=1060110&r2=1060111&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java Mon Jan 17 22:14:03 2011
@@ -54,11 +54,51 @@ public class ChangesMojo
extends AbstractChangesReport
{
/**
- * The path of the <code>changes.xml</code> file that will be converted into an HTML report.
+ * A flag whether the report should also include the dates of individual actions. If set to <code>false</code>, only
+ * the dates of releases will be written to the report.
*
- * @parameter expression="${changes.xmlPath}" default-value="src/changes/changes.xml"
+ * @parameter expression="${changes.addActionDate}" default-value="false"
+ * @since 2.1
*/
- private File xmlPath;
+ 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
+ * action.
+ * <p>
+ * <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
+ * careful.
+ *
+ * @parameter default-value="true"
+ * @since 2.4
+ * @deprecated using markup inside CDATA sections does not work for all output formats!
+ */
+ private boolean escapeHTML;
+
+ /**
+ * The directory for interpolated changes.xml.
+ *
+ * @parameter expression="${project.build.directory}/changes"
+ * @required
+ * @readonly
+ * @since 2.2
+ */
+ private File filteredOutputDirectory;
+
+ /**
+ * applying filtering filtering "a la" resources plugin
+ *
+ * @parameter default-value="false"
+ * @since 2.2
+ */
+ private boolean filteringChanges;
/**
* Template string that is used to discover the URL to use to display an issue report.
@@ -75,7 +115,7 @@ public class ChangesMojo
* @deprecated As of 2.1 use issueLinkTemplatePerSystem : this one will be with system default
*/
private String issueLinkTemplate;
-
+
/**
* Template strings per system that is used to discover the URL to use to display an issue report. Each key in this
* map denotes the (case-insensitive) identifier of the issue tracking system and its value gives the URL template.
@@ -101,158 +141,81 @@ public class ChangesMojo
private Map issueLinkTemplatePerSystem;
/**
- * @parameter default-value="${project.issueManagement.system}"
- * @readonly
- * @since 2.4
- */
- private String system;
-
- /**
- * @parameter default-value="${project.issueManagement.url}"
- * @readonly
+ * @component
+ * @since 2.2
*/
- private String url;
+ private MavenFileFilter mavenFileFilter;
/**
- * A flag whether the report should also include the dates of individual actions. If set to <code>false</code>, only
- * the dates of releases will be written to the report.
- *
- * @parameter expression="${changes.addActionDate}" default-value="false"
- * @since 2.1
- */
- private boolean addActionDate;
-
- /**
- *
- * @component
+ * Format to use for publishDate. The value will be available with the following expression ${publishDate}
*
+ * @see SimpleDateFormat
+ * @parameter default-value="yyyy-MM-dd"
* @since 2.2
*/
- private MavenFileFilter mavenFileFilter;
-
+ private String publishDateFormat;
+
+ /**
+ * Locale to use for publishDate when formatting
+ *
+ * @see Locale
+ * @parameter default-value="en"
+ * @since 2.2
+ */
+ private String publishDateLocale;
+
/**
* @parameter expression="${session}"
* @readonly
* @required
- *
* @since 2.2
- *
*/
protected MavenSession session;
-
+
/**
- * 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.
- *
- * @parameter default-value="team-list.html"
+ * @parameter default-value="${project.issueManagement.system}"
+ * @readonly
* @since 2.4
*/
- private String teamlist;
+ private String system;
/**
- * 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.
- * </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
- * careful.
+ * 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.
*
- * @parameter default-value="true"
+ * @parameter default-value="team-list.html"
* @since 2.4
- * @deprecated using markup inside CDATA sections does not work for all output formats!
*/
- private boolean escapeHTML;
+ private String teamlist;
/**
- * applying filtering filtering "a la" resources plugin
- *
- * @parameter default-value="false"
- *
- * @since 2.2
- */
- private boolean filteringChanges;
-
- /**
- * The directory for interpolated changes.xml.
- *
- * @parameter expression="${project.build.directory}/changes"
- * @required
+ * @parameter default-value="${project.issueManagement.url}"
* @readonly
- *
- * @since 2.2
- *
*/
- private File filteredOutputDirectory;
-
+ private String url;
+
/**
+ * The path of the <code>changes.xml</code> file that will be converted into an HTML report.
*
- * Format to use for publishDate. The value will be available with the following expression ${publishDate}
- *
- * @see SimpleDateFormat
- *
- * @parameter default-value="yyyy-MM-dd"
- *
- * @since 2.2
- *
+ * @parameter expression="${changes.xmlPath}" default-value="src/changes/changes.xml"
*/
- private String publishDateFormat;
-
- /**
- *
- * Locale to use for publishDate when formatting
- *
- * @see Locale
- *
- * @parameter default-value="en"
- *
- * @since 2.2
- *
- */
- private String publishDateLocale;
-
+ private File xmlPath;
+
private CaseInsensitiveMap caseInsensitiveIssueLinkTemplatePerSystem;
+ /* --------------------------------------------------------------------- */
+ /* Public methods */
+ /* --------------------------------------------------------------------- */
+
public boolean canGenerateReport()
{
return xmlPath.isFile();
}
- private void copyStaticResources()
- 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" };
- try
- {
- getLog().debug( "Copying static resources." );
- for ( int i = 0; i < resourceNames.length; i++ )
- {
- URL url = this.getClass().getClassLoader().getResource( pluginResourcesBase + "/" + resourceNames[i] );
- FileUtils.copyURLToFile( url, new File( getReportOutputDirectory(), resourceNames[i] ) );
- }
- }
- catch ( IOException e )
- {
- throw new MavenReportException( "Unable to copy static resources." );
- }
- }
-
public void executeReport( Locale locale )
throws MavenReportException
{
-
+
if ( !xmlPath.exists() )
{
getLog().warn( "changes.xml file " + xmlPath.getAbsolutePath() + " does not exist." );
@@ -309,7 +272,7 @@ public class ChangesMojo
report.setEscapeHTML ( escapeHTML );
// Create a case insensitive version of issueLinkTemplatePerSystem
- // We need something case insensitive to maintain backward compatibility
+ // We need something case insensitive to maintain backward compatibility
if ( issueLinkTemplatePerSystem == null )
{
caseInsensitiveIssueLinkTemplatePerSystem = new CaseInsensitiveMap();
@@ -337,7 +300,7 @@ public class ChangesMojo
logIssueLinkTemplatePerSystem( caseInsensitiveIssueLinkTemplatePerSystem );
report.setIssueLinksPerSystem( caseInsensitiveIssueLinkTemplatePerSystem );
-
+
report.setSystem( system );
report.setTeamlist ( teamlist );
@@ -345,7 +308,7 @@ public class ChangesMojo
report.setUrl( url );
report.setAddActionDate( addActionDate );
-
+
if ( StringUtils.isEmpty( url ) )
{
getLog().warn( "No issue management URL defined in POM. Links to your issues will not work correctly." );
@@ -357,6 +320,25 @@ public class ChangesMojo
copyStaticResources();
}
+ public String getDescription( Locale locale )
+ {
+ return getBundle( locale ).getString( "report.issues.description" );
+ }
+
+ public String getName( Locale locale )
+ {
+ return getBundle( locale ).getString( "report.issues.name" );
+ }
+
+ public String getOutputName()
+ {
+ return "changes-report";
+ }
+
+ /* --------------------------------------------------------------------- */
+ /* Private methods */
+ /* --------------------------------------------------------------------- */
+
/**
* Add the issue link template for the given issue management system,
* but only if it has not already been configured.
@@ -377,6 +359,42 @@ public class ChangesMojo
}
}
+ private void copyStaticResources()
+ 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" };
+ try
+ {
+ getLog().debug( "Copying static resources." );
+ for ( int i = 0; i < resourceNames.length; i++ )
+ {
+ URL url = this.getClass().getClassLoader().getResource( pluginResourcesBase + "/" + resourceNames[i] );
+ FileUtils.copyURLToFile( url, new File( getReportOutputDirectory(), resourceNames[i] ) );
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new MavenReportException( "Unable to copy static resources." );
+ }
+ }
+
+ private ResourceBundle getBundle( Locale locale )
+ {
+ return ResourceBundle.getBundle( "changes-report", locale, this.getClass().getClassLoader() );
+ }
+
+ protected String getTeamlist()
+ {
+ return teamlist;
+ }
+
private void logIssueLinkTemplatePerSystem( Map issueLinkTemplatePerSystem )
{
if ( getLog().isDebugEnabled() )
@@ -396,29 +414,4 @@ public class ChangesMojo
}
}
}
-
- public String getName( Locale locale )
- {
- return getBundle( locale ).getString( "report.issues.name" );
- }
-
- public String getDescription( Locale locale )
- {
- return getBundle( locale ).getString( "report.issues.description" );
- }
-
- public String getOutputName()
- {
- return "changes-report";
- }
-
- protected String getTeamlist()
- {
- return teamlist;
- }
-
- private ResourceBundle getBundle( Locale locale )
- {
- return ResourceBundle.getBundle( "changes-report", locale, this.getClass().getClassLoader() );
- }
}
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java?rev=1060111&r1=1060110&r2=1060111&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesValidatorMojo.java Mon Jan 17 22:14:03 2011
@@ -46,33 +46,31 @@ public class ChangesValidatorMojo
{
/**
- * The path of the <code>changes.xml</code> file that will be converted into an HTML report.
- *
- * @parameter expression="${changes.xmlPath}" default-value="src/changes/changes.xml"
+ * @component role="org.apache.maven.plugin.changes.schema.ChangesSchemaValidator" roleHint="default"
*/
- private File xmlPath;
-
+ private ChangesSchemaValidator changesSchemaValidator;
+
/**
* The changes xsd version.
*
* @parameter expression="${changes.xsdVersion}" default-value="1.0.0"
*/
private String changesXsdVersion;
-
- /**
- *
- * @component role="org.apache.maven.plugin.changes.schema.ChangesSchemaValidator" roleHint="default"
- *
- */
- private ChangesSchemaValidator changesSchemaValidator;
-
+
/**
* Mojo failure if validation failed. If not and validation failed only a warning will be logged.
*
* @parameter expression="${changes.validate.failed}" default-value="false"
- */
+ */
private boolean failOnError;
-
+
+ /**
+ * The path of the <code>changes.xml</code> file that will be converted into an HTML report.
+ *
+ * @parameter expression="${changes.xmlPath}" default-value="src/changes/changes.xml"
+ */
+ private File xmlPath;
+
/**
* @see org.apache.maven.plugin.Mojo#execute()
*/
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java?rev=1060111&r1=1060110&r2=1060111&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java Mon Jan 17 22:14:03 2011
@@ -69,39 +69,30 @@ public class JiraMojo
}
/**
- * Path to the JIRA XML file, which will be parsed.
- *
- * @parameter expression="${project.build.directory}/jira-results.xml"
- * @required
- * @readonly
- */
- private File jiraXmlPath;
-
- /**
- * The encoding used in the JIRA XML file. You only need to change this if
- * your JIRA server is returning responses in an encoding other than UTF-8.
- *
- * @parameter default-value="UTF-8" expression="${changes.jiraXmlEncoding}"
- * @since 2.4
- */
- private String jiraXmlEncoding;
-
- /**
- * Settings XML configuration.
+ * Sets the names of the columns that you want 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>Component</code>,
+ * <code>Created</code>, <code>Fix Version</code>, <code>Id</code>,
+ * <code>Key</code>, <code>Priority</code>, <code>Reporter</code>,
+ * <code>Resolution</code>, <code>Status</code>, <code>Summary</code>,
+ * <code>Type</code>, <code>Updated</code> and <code>Version</code>.
+ * </p>
*
- * @parameter expression="${settings}"
- * @required
- * @readonly
+ * @parameter default-value="Key,Summary,Status,Resolution,Assignee"
+ * @since 2.0
*/
- private Settings settings;
+ private String columnNames;
/**
- * Maximum number of entries to be fetched from JIRA.
- *
- * @parameter default-value=100
+ * Sets the component(s) that you want to limit your report to include.
+ * Multiple values can be separated by commas (such as 10011,10012).
+ * If this is set to empty - that means all components will be included.
*
+ * @parameter default-value=""
*/
- private int maxEntries;
+ private String component;
/**
* Defines the filter parameters to restrict which issues are retrieved
@@ -124,83 +115,98 @@ public class JiraMojo
private String fixVersionIds;
/**
- * Sets the status(es) that you want to fetch from JIRA.
- * Valid statuses are: <code>Open</code>, <code>In Progress</code>,
- * <code>Reopened</code>, <code>Resolved</code> and <code>Closed</code>.
- * Multiple values can be separated by commas.
- * <p>
- * <b>Note:</b> In versions 2.0-beta-3 and earlier this parameter had no
- * default value.
- * </p>
+ * The pattern used by dates in the JIRA XML-file. This is used to parse
+ * the Created and Updated fields.
*
- * @parameter default-value="Closed"
+ * @parameter default-value="EEE, d MMM yyyy HH:mm:ss Z"
+ * @since 2.4
*/
- private String statusIds;
+ private String jiraDatePattern;
/**
- * Sets the resolution(s) that you want to fetch from JIRA.
- * Valid resolutions are: <code>Unresolved</code>, <code>Fixed</code>,
- * <code>Won't Fix</code>, <code>Duplicate</code>, <code>Incomplete</code>
- * and <code>Cannot Reproduce</code>.
- * Multiple values can be separated by commas.
- * <p>
- * <b>Note:</b> In versions 2.0-beta-3 and earlier this parameter had no
- * default value.
- * </p>
+ * Defines the JIRA password for authentication into a private JIRA installation.
*
- * @parameter default-value="Fixed"
+ * @parameter default-value=""
*/
- private String resolutionIds;
+ private String jiraPassword;
/**
- * Sets the priority(s) that you want to limit your report to include.
- * Valid statuses are <code>Blocker</code>, <code>Critical</code>,
- * <code>Major</code>, <code>Minor</code> and <code>Trivial</code>.
- * Multiple values can be separated by commas.
- * If this is set to empty - that means all priorities will be included.
+ * Defines the JIRA username for authentication into a private JIRA installation.
*
* @parameter default-value=""
*/
- private String priorityIds;
+ private String jiraUser;
/**
- * Sets the component(s) that you want to limit your report to include.
- * Multiple values can be separated by commas (such as 10011,10012).
- * If this is set to empty - that means all components will be included.
+ * The encoding used in the JIRA XML file. You only need to change this if
+ * your JIRA server is returning responses in an encoding other than UTF-8.
*
- * @parameter default-value=""
+ * @parameter default-value="UTF-8" expression="${changes.jiraXmlEncoding}"
+ * @since 2.4
*/
- private String component;
+ private String jiraXmlEncoding;
/**
- * Sets the types(s) that you want to limit your report to include.
- * Valid types are: <code>Bug</code>, <code>New Feature</code>,
- * <code>Task</code>, <code>Improvement</code>, <code>Wish</code>,
- * <code>Test</code> and <code>Sub-task</code>.
+ * Path to the JIRA XML file, which will be parsed.
+ *
+ * @parameter expression="${project.build.directory}/jira-results.xml"
+ * @required
+ * @readonly
+ */
+ private File jiraXmlPath;
+
+ /**
+ * Maximum number of entries to be fetched from JIRA.
+ *
+ * @parameter default-value=100
+ *
+ */
+ private int maxEntries;
+
+ /**
+ * 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 default-value="false"
+ * @since 2.0
+ */
+ private boolean onlyCurrentVersion;
+
+ /**
+ * Sets the priority(s) that you want to limit your report to include.
+ * Valid statuses are <code>Blocker</code>, <code>Critical</code>,
+ * <code>Major</code>, <code>Minor</code> and <code>Trivial</code>.
* Multiple values can be separated by commas.
- * If this is set to empty - that means all types will be included.
+ * If this is set to empty - that means all priorities will be included.
*
* @parameter default-value=""
- * @since 2.0
*/
- private String typeIds;
+ private String priorityIds;
/**
- * Sets the names of the columns that you want in the report. The columns
- * will appear in the report in the same order as you specify them here.
+ * Sets the resolution(s) that you want to fetch from JIRA.
+ * Valid resolutions are: <code>Unresolved</code>, <code>Fixed</code>,
+ * <code>Won't Fix</code>, <code>Duplicate</code>, <code>Incomplete</code>
+ * and <code>Cannot Reproduce</code>.
* Multiple values can be separated by commas.
* <p>
- * Valid columns are: <code>Assignee</code>, <code>Component</code>,
- * <code>Created</code>, <code>Fix Version</code>, <code>Id</code>,
- * <code>Key</code>, <code>Priority</code>, <code>Reporter</code>,
- * <code>Resolution</code>, <code>Status</code>, <code>Summary</code>,
- * <code>Type</code>, <code>Updated</code> and <code>Version</code>.
+ * <b>Note:</b> In versions 2.0-beta-3 and earlier this parameter had no
+ * default value.
* </p>
*
- * @parameter default-value="Key,Summary,Status,Resolution,Assignee"
- * @since 2.0
+ * @parameter default-value="Fixed"
*/
- private String columnNames;
+ private String resolutionIds;
+
+ /**
+ * Settings XML configuration.
+ *
+ * @parameter expression="${settings}"
+ * @required
+ * @readonly
+ */
+ private Settings settings;
/**
* Sets the column names that you want to sort the report by. Add
@@ -210,7 +216,7 @@ public class JiraMojo
* the Fix Version in descending order and then by Type in
* ascending order. By default sorting is done in ascending order, but is
* possible to specify <code>ASC</code> for consistency. The previous
- * example would then become <code>Fix Version DESC, Type ASC</code>.
+ * example would then become <code>Fix Version DESC, Type ASC</code>.
* <p>
* Valid columns are: <code>Assignee</code>, <code>Component</code>,
* <code>Created</code>, <code>Fix Version</code>, <code>Id</code>,
@@ -225,25 +231,46 @@ public class JiraMojo
private String sortColumnNames;
/**
- * Defines the JIRA username for authentication into a private JIRA installation.
+ * Sets the status(es) that you want to fetch from JIRA.
+ * Valid statuses are: <code>Open</code>, <code>In Progress</code>,
+ * <code>Reopened</code>, <code>Resolved</code> and <code>Closed</code>.
+ * Multiple values can be separated by commas.
+ * <p>
+ * <b>Note:</b> In versions 2.0-beta-3 and earlier this parameter had no
+ * default value.
+ * </p>
*
- * @parameter default-value=""
+ * @parameter default-value="Closed"
*/
- private String jiraUser;
+ private String statusIds;
/**
- * Defines the JIRA password for authentication into a private JIRA installation.
+ * Sets the types(s) that you want to limit your report to include.
+ * Valid types are: <code>Bug</code>, <code>New Feature</code>,
+ * <code>Task</code>, <code>Improvement</code>, <code>Wish</code>,
+ * <code>Test</code> and <code>Sub-task</code>.
+ * Multiple values can be separated by commas.
+ * If this is set to empty - that means all types will be included.
*
* @parameter default-value=""
+ * @since 2.0
*/
- private String jiraPassword;
+ private String typeIds;
/**
- * Defines the http user for basic authentication into the JIRA webserver.
+ * 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-".
+ * </p>
*
* @parameter default-value=""
+ * @since 2.4
*/
- private String webUser;
+ private String versionPrefix;
/**
* Defines the http password for basic authentication into the JIRA webserver.
@@ -253,38 +280,15 @@ public class JiraMojo
private String webPassword;
/**
- * 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 default-value="false"
- * @since 2.0
- */
- private boolean onlyCurrentVersion;
-
- /**
- * The pattern used by dates in the JIRA XML-file. This is used to parse
- * the Created and Updated fields.
- *
- * @parameter default-value="EEE, d MMM yyyy HH:mm:ss Z"
- * @since 2.4
- */
- private String jiraDatePattern;
-
- /**
- * 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-".
- * </p>
+ * Defines the http user for basic authentication into the JIRA webserver.
*
* @parameter default-value=""
- * @since 2.4
*/
- private String versionPrefix;
+ private String webUser;
+
+ /* --------------------------------------------------------------------- */
+ /* Public methods */
+ /* --------------------------------------------------------------------- */
/**
* @see org.apache.maven.reporting.AbstractMavenReport#canGenerateReport()
@@ -348,14 +352,14 @@ public class JiraMojo
}
}
- public String getName( Locale locale )
+ public String getDescription( Locale locale )
{
- return getBundle( locale ).getString( "report.issues.name" );
+ return getBundle( locale ).getString( "report.issues.description" );
}
- public String getDescription( Locale locale )
+ public String getName( Locale locale )
{
- return getBundle( locale ).getString( "report.issues.description" );
+ return getBundle( locale ).getString( "report.issues.name" );
}
public String getOutputName()
@@ -363,6 +367,10 @@ public class JiraMojo
return "jira-report";
}
+ /* --------------------------------------------------------------------- */
+ /* Private methods */
+ /* --------------------------------------------------------------------- */
+
private ResourceBundle getBundle( Locale locale )
{
return ResourceBundle.getBundle( "jira-report", locale, this.getClass().getClassLoader() );
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java?rev=1060111&r1=1060110&r2=1060111&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java Mon Jan 17 22:14:03 2011
@@ -85,29 +85,6 @@ public class TracMojo
}
/**
- * Defines the Trac username for authentication into a private Trac
- * installation.
- *
- * @parameter default-value=""
- */
- private String tracUser;
-
- /**
- * Defines the Trac password for authentication into a private Trac
- * installation.
- *
- * @parameter default-value=""
- */
- private String tracPassword;
-
- /**
- * Defines the Trac query for searching ticket.
- *
- * @parameter default-value="order=id"
- */
- private String query;
-
- /**
* 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.
@@ -125,6 +102,33 @@ public class TracMojo
private String columnNames;
/**
+ * Defines the Trac query for searching ticket.
+ *
+ * @parameter default-value="order=id"
+ */
+ private String query;
+
+ /**
+ * Defines the Trac password for authentication into a private Trac
+ * installation.
+ *
+ * @parameter default-value=""
+ */
+ private String tracPassword;
+
+ /**
+ * Defines the Trac username for authentication into a private Trac
+ * installation.
+ *
+ * @parameter default-value=""
+ */
+ private String tracUser;
+
+ /* --------------------------------------------------------------------- */
+ /* Public methods */
+ /* --------------------------------------------------------------------- */
+
+ /**
* @see org.apache.maven.reporting.AbstractMavenReport#canGenerateReport()
*/
public boolean canGenerateReport()
@@ -181,14 +185,14 @@ public class TracMojo
}
}
- public String getName( Locale locale )
+ public String getDescription( Locale locale )
{
- return getBundle( locale ).getString( "report.issues.name" );
+ return getBundle( locale ).getString( "report.issues.description" );
}
- public String getDescription( Locale locale )
+ public String getName( Locale locale )
{
- return getBundle( locale ).getString( "report.issues.description" );
+ return getBundle( locale ).getString( "report.issues.name" );
}
public String getOutputName()
@@ -196,6 +200,10 @@ public class TracMojo
return "trac-report";
}
+ /* --------------------------------------------------------------------- */
+ /* Private methods */
+ /* --------------------------------------------------------------------- */
+
private ResourceBundle getBundle( Locale locale )
{
return ResourceBundle.getBundle( "trac-report", locale, this.getClass().getClassLoader() );