Uploaded image for project: 'Maven Project Info Reports Plugin'
  1. Maven Project Info Reports Plugin
  2. MPIR-178

some reports have inconsistent line ending style

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.2
    • None
    • dependencies, team
    • None
    • Windows

    Description

      Some of the reports generated by the plugin have inconsistent line ending style. I have marked dependency and team-list components as affected by probably other components can produce inconsistent line endings too.

      I am working on Windows so it is (somewhat) expected that files generated by the plugin will have the CRLF line ending, but some files will have a mixed line ending style due to different reasons.

      The plugin should enforce consistent line ending style in the output files. It is possible that this issue is not caused by the plugin itself but "inherited" from some of its dependencies that handle generic maven reporting functionality, in this case please move the issue to the appropriate maven component.

      Examples:

      team-list.html
      The following code fragment near the end of the file seems to always have the LF line endings:

      <script type="text/javascript">
      function offsetDate(id, offset) {
          var now = new Date();
          var nowTime = now.getTime();
          var localOffset = now.getTimezoneOffset();
          var developerTime = nowTime + ( offset * 60 * 60 * 1000 )+ ( localOffset * 60 * 1000 );
          var developerDate = new Date(developerTime);
      
          document.getElementById(id).innerHTML = developerDate;
      }
      
      function init(){
      }
      
      window.onLoad = init();
      </script>
      

      This code is probably copied to the resulting report page from some string literal with hard-coded line ending.

      dependencies.html
      The dependency report contains a dependency tree that has an "I" icon that unhides a description of a particular dependency. The description text is obtained from somewhere (the dependency pom?) and copied to the dependencies.html as is, including its line ending style.

      For example, org.antlr:stringtemplate:jar:3.2 and antlr:antlr:jar:2.7.7 dependencies have a description that uses LF line endings. When these artifacts are required either directly or indirectly then the project's dependencies.html will contain both CRLF for generated code and LF for copy-pasted descriptions.
      Check the http://maven-svn-wagon.googlecode.com/svn/site/dependencies.html, lines 450-464 for the specific example.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              oleg.estekhin Oleg Estekhin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: