2525import java .io .IOException ;
2626import java .io .OutputStream ;
2727import java .util .ArrayList ;
28- import java .util .Calendar ;
2928import java .util .List ;
3029import java .util .Locale ;
3130import java .util .Map ;
5150import org .apache .maven .plugins .checkstyle .exec .CheckstyleExecutorException ;
5251import org .apache .maven .plugins .checkstyle .exec .CheckstyleExecutorRequest ;
5352import org .apache .maven .plugins .checkstyle .exec .CheckstyleResults ;
54- import org .apache .maven .plugins .checkstyle .rss .CheckstyleRssGenerator ;
55- import org .apache .maven .plugins .checkstyle .rss .CheckstyleRssGeneratorRequest ;
5653import org .apache .maven .reporting .AbstractMavenReport ;
5754import org .apache .maven .reporting .MavenReportException ;
5855import org .codehaus .plexus .configuration .PlexusConfiguration ;
6764 *
6865 */
6966public abstract class AbstractCheckstyleReport extends AbstractMavenReport {
70- public static final String PLUGIN_RESOURCES = "org/apache/maven/plugins/checkstyle" ;
71-
7267 protected static final String JAVA_FILES = "**\\ /*.java" ;
7368
7469 private static final String DEFAULT_CONFIG_LOCATION = "sun_checks.xml" ;
@@ -342,15 +337,6 @@ public abstract class AbstractCheckstyleReport extends AbstractMavenReport {
342337 @ Parameter (property = "checkstyle.enable.files.summary" , defaultValue = "true" )
343338 private boolean enableFilesSummary ;
344339
345- /**
346- * Specifies if the RSS should be enabled or not.
347- *
348- * @deprecated This feature will be removed in a future version.
349- */
350- @ Parameter (property = "checkstyle.enable.rss" , defaultValue = "false" )
351- @ Deprecated
352- private boolean enableRSS ;
353-
354340 /**
355341 * The Plugin Descriptor
356342 */
@@ -446,15 +432,6 @@ public abstract class AbstractCheckstyleReport extends AbstractMavenReport {
446432 @ Component
447433 protected ResourceManager locator ;
448434
449- /**
450- * CheckstyleRssGenerator.
451- *
452- * @since 2.4
453- */
454- @ Component (role = CheckstyleRssGenerator .class , hint = "default" )
455- @ Deprecated
456- protected CheckstyleRssGenerator checkstyleRssGenerator ;
457-
458435 /**
459436 * @since 2.5
460437 */
@@ -519,14 +496,7 @@ public void executeReport(Locale locale) throws MavenReportException {
519496 CheckstyleResults results = checkstyleExecutor .executeCheckstyle (request );
520497
521498 ResourceBundle bundle = getBundle (locale );
522- generateReportStatics ();
523499 generateMainReport (results , bundle , effectiveConfigLocation );
524- if (enableRSS ) {
525- CheckstyleRssGeneratorRequest checkstyleRssGeneratorRequest =
526- new CheckstyleRssGeneratorRequest (this .project , this .getCopyright (), outputDirectory , getLog ());
527- checkstyleRssGenerator .generateRSS (results , checkstyleRssGeneratorRequest );
528- }
529-
530500 } catch (CheckstyleException e ) {
531501 throw new MavenReportException ("Failed during checkstyle configuration" , e );
532502 } catch (CheckstyleExecutorException e ) {
@@ -647,32 +617,6 @@ protected DefaultLogger getConsoleListener() throws MavenReportException {
647617 return consoleListener ;
648618 }
649619
650- private void generateReportStatics () throws MavenReportException {
651- ReportResource rresource = new ReportResource (PLUGIN_RESOURCES , outputDirectory );
652- try {
653- rresource .copy ("images/rss.png" );
654- } catch (IOException e ) {
655- throw new MavenReportException ("Unable to copy static resources." , e );
656- }
657- }
658-
659- private String getCopyright () {
660- String copyright ;
661- int currentYear = Calendar .getInstance ().get (Calendar .YEAR );
662- if (StringUtils .isNotEmpty (project .getInceptionYear ())
663- && !String .valueOf (currentYear ).equals (project .getInceptionYear ())) {
664- copyright = project .getInceptionYear () + " - " + currentYear ;
665- } else {
666- copyright = String .valueOf (currentYear );
667- }
668-
669- if ((project .getOrganization () != null )
670- && StringUtils .isNotEmpty (project .getOrganization ().getName ())) {
671- copyright = copyright + " " + project .getOrganization ().getName ();
672- }
673- return copyright ;
674- }
675-
676620 private void generateMainReport (CheckstyleResults results , ResourceBundle bundle , String configLocation ) {
677621 CheckstyleReportGenerator generator =
678622 new CheckstyleReportGenerator (getSink (), bundle , project .getBasedir (), siteTool , configLocation );
@@ -681,7 +625,6 @@ private void generateMainReport(CheckstyleResults results, ResourceBundle bundle
681625 generator .setEnableRulesSummary (enableRulesSummary );
682626 generator .setEnableSeveritySummary (enableSeveritySummary );
683627 generator .setEnableFilesSummary (enableFilesSummary );
684- generator .setEnableRSS (enableRSS );
685628 generator .setCheckstyleConfig (results .getConfiguration ());
686629 if (linkXRef ) {
687630 initializeXrefLocation (generator );
0 commit comments