GithubHelp home page GithubHelp logo

Comments (9)

hazendaz avatar hazendaz commented on September 27, 2024 2

closing as this is already present in support.

See

    /**
     * Location where generated html will be created.
     *
     */
    @Parameter(defaultValue = '${project.reporting.outputDirectory}', required = true)
    File outputDirectory

from spotbugs-maven-plugin.

dylan-tao avatar dylan-tao commented on September 27, 2024

Describe the feature

maven build target file: spotbugs.html,support set htmlOutputDirectory, current: /target/spotbugs.html, but xml can customize the directory settings.

<configuration>
  <htmlOutputDirectory>${project.reporting.outputDirectory}</htmlOutputDirectory>
</configuration>

How is the progress now?

from spotbugs-maven-plugin.

hazendaz avatar hazendaz commented on September 27, 2024

Hi @dylan-tao. What is the need to do that? Can you explain what you are after here? Maybe contribute a PR once its understood if its necessary or not.

from spotbugs-maven-plugin.

dylan-tao avatar dylan-tao commented on September 27, 2024

To make it clearer for team members to view bug lists and statistics in HTML instead of XML. For example: PMD plug-ins can be customized, the report generated to the same directory, you can better manage code quality.

@jsotuyod make it clearer for team members to view bug lists and statistics in HTML instead of XML. For example: PMD plug-ins can be customized, the report generated to the same directory, you can better manage code quality.

from spotbugs-maven-plugin.

dylan-tao avatar dylan-tao commented on September 27, 2024

Hi @dylan-tao. What is the need to do that? Can you explain what you are after here? Maybe contribute a PR once its understood if its necessary or not.

please see here: mathieucarbou/license-maven-plugin#673

from spotbugs-maven-plugin.

hazendaz avatar hazendaz commented on September 27, 2024

@dylan-tao Can you offer up a pull request on this feature? I'm limited in time and it would be easier if you do that to get support out.

from spotbugs-maven-plugin.

dylan-tao avatar dylan-tao commented on September 27, 2024

closing as this is already present in support.

See

    /**
     * Location where generated html will be created.
     *
     */
    @Parameter(defaultValue = '${project.reporting.outputDirectory}', required = true)
    File outputDirectory

spotbugs config:

<configuration>
   <includeFilterFile>maven-archiver/spotbugs/official-include-ruleset.xml</includeFilterFile>
   <excludeFilterFiles>maven-archiver/spotbugs/official-exclude-ruleset.xml</excludeFilterFiles>
   <htmlOutput>true</htmlOutput>
   <outputDirectory>${project.reporting.outputDirectory}</outputDirectory>
   <xmlOutputDirectory>${project.report.cache.directory}</xmlOutputDirectory>
   <spotbugsXmlOutputDirectory>${project.report.cache.directory}</spotbugsXmlOutputDirectory>
   <spotbugsXmlOutputFilename>spotbugs-plugin-report.xml</spotbugsXmlOutputFilename>
 </configuration>

@hazendaz, When I set outputDirectory to generate html report will report an error. Theoretically, xml generation should be necessary, and it needs to be translated from xml to html. The following error will be reported:

[INFO] --- spotbugs-maven-plugin:4.8.2.0:spotbugs (spotbugs) @ beeico-base ---
[INFO] Fork Value is true
     [java] The following errors occurred during analysis:
     [java]   Could not generate HTML output
     [java]     java.lang.RuntimeException: Error while disabling XML external entities
     [java]       At edu.umd.cs.findbugs.xml.XMLUtil.buildTransformerFactory(XMLUtil.java:60)
     [java]       At edu.umd.cs.findbugs.HTMLBugReporter.finish(HTMLBugReporter.java:69)
     [java]       At edu.umd.cs.findbugs.BugReportDispatcher.lambda$forEach$13(BugReportDispatcher.java:124)

It is recommended to refer to PMD's settings to unify directory management: targetDirectory (xml generation directory) and rulesetsTargetDirectory (configuration rule file storage directory), and then html is generated under ${project.reporting.outputDirectory} by default

from spotbugs-maven-plugin.

hazendaz avatar hazendaz commented on September 27, 2024

Just quick circle back on this, your issue is likely a library mismatch and presumably you are using > java 9. The issue is not with the directory, its failing to prevent XXE due to missing library. That tends to lean on library mismatch since java 8. The actual code you are looking at is here https://github.com/spotbugs/spotbugs/blob/6fe5ba97f8769af2b264920fe07d8d3cace9242b/spotbugs/src/main/java/edu/umd/cs/findbugs/xml/XMLUtil.java#L53.

I don't understand your comments on PMD. That is an entirely different plugin.

from spotbugs-maven-plugin.

dylan-tao avatar dylan-tao commented on September 27, 2024

closing as this is already present in support.

See

    /**
     * Location where generated html will be created.
     *
     */
    @Parameter(defaultValue = '${project.reporting.outputDirectory}', required = true)
    File outputDirectory

please

closing as this is already present in support.

See

    /**
     * Location where generated html will be created.
     *
     */
    @Parameter(defaultValue = '${project.reporting.outputDirectory}', required = true)
    File outputDirectory

@hazendaz
version: 4.8.6.2
Please test, the configuration item has been invalid, the default generated report is wrong under target, it should be in the site directory, and the above ${project.reporting.outputDirectory} is invalid.

from spotbugs-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.