Uploaded image for project: 'Apache Rat'
  1. Apache Rat
  2. RAT-86

License insertion doesn't work with just the -a and/or -a -f options.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7
    • 0.8
    • None
    • None
    • Mac OSX, java -version
      java version "1.6.0_22"
      Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
      Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

    Description

      This bug applies to the SVN checkout. org.apache.rat.Report's command line processing logic seems flawed: if you want to insert a license header in your files (-a or -a -f), and unless you specify a stylesheet with the -s option, the report creation goes through report.styleReport(), which throws away any previously specified configuration settings:

      pubic void styleReport(..) {
      ...
      final ReportConfiguration configuration = new ReportConfiguration();
      ...
      }

      I assume you want something somewhat like

      public void styleReport(PrintStream out, ReportConfiguration pConfiguration) throws Exception {
      final IReportable base = getDirectory(out);
      if (base != null)

      { InputStream style = Defaults.getDefaultStyleSheet(); pConfiguration.setHeaderMatcher(Defaults.createDefaultMatcher()); report(out, base, style, pConfiguration); }

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            marpierc Marlon Pierce
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: