{"id":13458488,"url":"https://spotbugs.github.io/spotbugs-maven-plugin/","last_synced_at":"2025-03-24T15:31:28.178Z","repository":{"id":12982673,"uuid":"15661465","full_name":"spotbugs/spotbugs-maven-plugin","owner":"spotbugs","description":"Maven Mojo Plug-In to generate reports based on the SpotBugs Analyzer","archived":false,"fork":true,"pushed_at":"2024-04-13T11:39:21.000Z","size":6879,"stargazers_count":67,"open_issues_count":26,"forks_count":50,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-14T04:44:29.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://spotbugs.github.io/spotbugs-maven-plugin/","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"gleclaire/findbugs-maven-plugin","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spotbugs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-01-06T00:20:37.000Z","updated_at":"2024-04-14T04:44:29.654Z","dependencies_parsed_at":"2023-10-16T12:11:24.517Z","dependency_job_id":"7c310636-39a6-45e2-9ca0-a77b1c60b219","html_url":"https://github.com/spotbugs/spotbugs-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotbugs%2Fspotbugs-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotbugs%2Fspotbugs-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotbugs%2Fspotbugs-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotbugs%2Fspotbugs-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spotbugs","download_url":"https://codeload.github.com/spotbugs/spotbugs-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245298052,"owners_count":20592527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T09:00:53.050Z","updated_at":"2025-03-24T15:31:23.170Z","avatar_url":"https://github.com/spotbugs.png","language":"Groovy","funding_links":[],"categories":["References"],"sub_categories":["Do on your Jenkins controller machine"],"readme":"# Spotbugs Maven Plugin\n\n[![Java CI](https://github.com/spotbugs/spotbugs-maven-plugin/workflows/Java%20CI/badge.svg)](https://github.com/spotbugs/spotbugs-maven-plugin/actions?query=workflow%3A%22Java+CI%22)\n[![Java Integration Tests](https://github.com/spotbugs/spotbugs-maven-plugin/workflows/Java%20Integration%20Tests/badge.svg)](https://github.com/spotbugs/spotbugs-maven-plugin/actions?query=workflow%3A%22Java+Integration+Tests%22)\n[![Maven central](https://maven-badges.herokuapp.com/maven-central/com.github.spotbugs/spotbugs-maven-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.spotbugs/spotbugs-maven-plugin)\n[![Apache 2](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\n## Latest Snapshot ##\n\nPlease download latest snapshots from [here](https://oss.sonatype.org/content/repositories/snapshots/com/github/spotbugs/spotbugs-maven-plugin/)\n\nBuilding spotbugs-maven-plugin Requirements\n===========================================\n\nJava 11+ is required to build the project.  Java 8+ is required for spotbugs analysis.\n\nspotbugs-maven-plugin\n=====================\n\nMaven Mojo Plug-In to generate reports based on the SpotBugs Analyzer\n\nSee site page for [usage](https://spotbugs.github.io/spotbugs-maven-plugin/)\n\n## Special notice ##\n\nContinue to use 'FindBugsFilter' when needed as the spotbugs project has not yet renamed that to reflect project.\n\n## Usage ##\n\nThe [SpotBugs documentation](https://spotbugs.readthedocs.io/en/latest/maven.html) describes the pom.xml modifications and Maven goals.\n\n## Running Tests ##\n\nRun all tests\n```\nmvn -DtestSrc=remote -Prun-its clean install -D\"invoker.parallelThreads=8\"\n```\nSkip tests\n```\nmvn -DskipTests=true clean install\n```\nRun tests on spotbugs test source code that is local instead of from SpotBugs github repository\n```\nmvn -DtestSrc=local -DlocalTestSrc=/opt/spotBugs -Prun-its clean install -D\"invoker.parallelThreads=8\"\n```\n\nRun selected tests\n```\nmvn -DtestSrc=remote -Prun-its -Dinvoker.test=build-*,basic-1,check-nofail clean install -D\"invoker.parallelThreads=8\"\n```\n\nRun tests in debugger\n```\nmvn -Dmaven.surefire.debug=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE\" -Prun-its clean install\n```\n\nRun selected tests in debugger\n```\nmvn -Dmaven.surefire.debug=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE\" -Prun-its -Dinvoker.test=build-*,basic-1,check clean install\n```\n\nRun gui with a specific version \n```\nmvn com.github.spotbugs:spotbugs-maven-plugin:4.8.6.2:gui\n```\n\n## Creating new site examples ##\n\n```\nmvn -DtestSrc=remote -Prun-its clean install -D\"invoker.parallelThreads=8\"\n\nThen replace current src/site/resources entirely with any working example 'site' folder from there (Currently uses basic-1).  Also top files top level of the basic site folder 'spotbugs.xml' and 'spotbugsXml.xml'.\n```\n\n## Contributing ##\n\nRun integration tests\n```\nmvn clean install -P run-its -DtestSrc=remote\n```\n\n## Groovy ##\n\nThis plugin is written entirey in groovy.  It does have limitations when it comes to groovy in relation to java releases.  Every attempt is made to ensure fast releases to pick up groovy changes related to java.\n\nKnown issues\n\nThe security manager is turned off by default in jdk 18 and scheduled from removal in a future java release, therefore to use this plugin with jdk 18+, the security manager may need turned back on using ```JAVA_OPTS``` to ```-Djava.security.manager=allow```.  See [groovy](https://groovy-lang.org/releasenotes/groovy-4.0.html) for more details.\n\nIf using groovy with same group id (```org.codehaus.groovy 3.x``` or before or ```org.apache.groovy 4.x or above```), an error may occur if not on same version. To alleviate that, make sure groovy artifacts are defined in ```dependency management``` in order to force the loaded version correctly on your usage.\n\n\n## Eclipse m2e Integration ##\n\nThe plugin cycles controlled by Eclipse require compilation phase for m2e without further help.  This plugin runs verify and during site generation.  Therefore Eclipse m2e will show up but not do anything with this plugin alone.  In order to have proper execution within Ecipse m2e, use [m2e-code-quality](https://github.com/m2e-code-quality/m2e-code-quality) plugin for spotbugs.\n\n## Analysis Properties ##\n\nIs there some way to set the [Analysis Properties](https://spotbugs.readthedocs.io/en/stable/analysisprops.html) when using the maven plugin?\n\nAnalysis properties are passed as Java system properties, so they can be set in the \u003cjvmArgs\u003e configuration element.\n\nE.g. to set the findbugs.assertionmethods analyzer property:\n\n```\n\u003cplugin\u003e\n    \u003cgroupId\u003ecom.github.spotbugs\u003c/groupId\u003e\n    \u003cartifactId\u003espotbugs-maven-plugin\u003c/artifactId\u003e\n    \u003cconfiguration\u003e\n        \u003cjvmArgs\u003e-Dfindbugs.assertionmethods=org.apache.commons.lang3.Validate.notNull\u003c/jvmArgs\u003e\n    \u003c/configuration?\n\u003c/plugin\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/spotbugs.github.io%2Fspotbugs-maven-plugin%2F","html_url":"https://awesome.ecosyste.ms/projects/spotbugs.github.io%2Fspotbugs-maven-plugin%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/spotbugs.github.io%2Fspotbugs-maven-plugin%2F/lists"}