{"id":37017121,"url":"https://github.com/codemonstur/maven-check-license","last_synced_at":"2026-01-14T01:57:38.559Z","repository":{"id":257437529,"uuid":"856819767","full_name":"codemonstur/maven-check-license","owner":"codemonstur","description":"A maven plugin for checking if licenses of dependencies are acceptable","archived":false,"fork":false,"pushed_at":"2025-07-11T13:14:40.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T15:28:42.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codemonstur.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-13T09:10:43.000Z","updated_at":"2025-07-11T13:14:43.000Z","dependencies_parsed_at":"2025-07-11T14:29:21.805Z","dependency_job_id":null,"html_url":"https://github.com/codemonstur/maven-check-license","commit_stats":null,"previous_names":["codemonstur/maven-check-license"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/codemonstur/maven-check-license","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonstur%2Fmaven-check-license","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonstur%2Fmaven-check-license/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonstur%2Fmaven-check-license/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonstur%2Fmaven-check-license/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemonstur","download_url":"https://codeload.github.com/codemonstur/maven-check-license/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemonstur%2Fmaven-check-license/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"ssl_error","status_checked_at":"2026-01-14T01:40:32.775Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-14T01:57:38.014Z","updated_at":"2026-01-14T01:57:38.553Z","avatar_url":"https://github.com/codemonstur.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![GitHub Release](https://img.shields.io/github/release/codemonstur/maven-check-license.svg)](https://github.com/codemonstur/maven-check-license/releases)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.codemonstur/maven-check-license/badge.svg)](http://mvnrepository.com/artifact/com.github.codemonstur/maven-check-license)\n[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)\n\n## Maven-check-license\n\nA maven plugin that checks which licenses are used by project dependencies.\n\nBy default, the plugin will fail the build for any license that is not matched by any configured rule.\nThe purpose of the plugin is to prevent accidentally agreeing to licenses that are unacceptable.\nFor example, you may not want to include GPL licensed code.\n\nIn addition to the list of rules there are also two other lists that can be configured: exclusions, and ignored.\nThe exclusions list will remove any listed GAV from consideration, any matching artifact will not be checked at all.\nThe ignored list will move any violation to a separate 'Ignored' list. They will be reported but not be counted as \nviolations.\n\nThe plugin will run during the `validate` phase.\n\n### Example pom configuration\n\n1. Add this code to the pom:\n```\n\u003cplugin\u003e\n    \u003cgroupId\u003ecom.github.codemonstur\u003c/groupId\u003e\n    \u003cartifactId\u003emaven-check-license\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.0\u003c/version\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\u003cgoals\u003e\u003cgoal\u003echeck\u003c/goal\u003e\u003c/goals\u003e\u003c/execution\u003e\n    \u003c/executions\u003e\n    \u003cconfiguration\u003e\n        \u003cenabled\u003etrue\u003c/enabled\u003e \u003c!-- default: true --\u003e\n        \u003cprintViolations\u003etrue\u003c/printViolations\u003e \u003c!-- default: true --\u003e\n        \u003cprintIgnored\u003etrue\u003c/printIgnored\u003e \u003c!-- default: true --\u003e\n        \u003cprintCompliant\u003efalse\u003c/printCompliant\u003e \u003c!-- default: false --\u003e\n        \u003cfailBuildOnViolation\u003etrue\u003c/failBuildOnViolation\u003e \u003c!-- default: true --\u003e\n        \u003ccheckCodeDependencies\u003etrue\u003c/checkCodeDependencies\u003e \u003c!-- default: true --\u003e\n        \u003ccheckPluginDependencies\u003efalse\u003c/checkPluginDependencies\u003e \u003c!-- default: false --\u003e\n        \u003cincludeCompileDependencies\u003etrue\u003c/includeCompileDependencies\u003e \u003c!-- default: true --\u003e\n        \u003cincludeRuntimeDependencies\u003etrue\u003c/includeRuntimeDependencies\u003e \u003c!-- default: true --\u003e\n        \u003cincludeProvidedDependencies\u003efalse\u003c/includeProvidedDependencies\u003e \u003c!-- default: false --\u003e\n        \u003cincludeTestDependencies\u003efalse\u003c/includeTestDependencies\u003e \u003c!-- default: false --\u003e\n        \u003cstrategy\u003epassOnMatch\u003c/strategy\u003e \u003c!-- default: passOnMatch, values: [ passOnMatch, failOnMatch ] --\u003e\n\n        \u003crules\u003e \u003c!-- default: empty list --\u003e\n            \u003crule\u003eurl:equal:http://www.opensource.org/licenses/bsd-license.php\u003c/rule\u003e\n            \u003crule\u003eurl:equal:http://opensource.org/licenses/BSD-3-Clause\u003c/rule\u003e\n            \u003crule\u003eurl:regex:(http|https)://(www.)?opensource.org/licenses/(MIT|mit-license.php)\u003c/rule\u003e\n            \u003crule\u003ename:equal:The MIT License\u003c/rule\u003e\n            \u003crule\u003ename:regex:(The )?Apache(\\s|-)(Software )?(License |License, )?(Version |version )?2\\.0\u003c/rule\u003e\n        \u003c/rules\u003e\n        \n        \u003cexclusions\u003e \u003c!-- default: empty list --\u003e\n            \u003cexclude\u003egroupId:artifactId:version\u003c/exclude\u003e\n        \u003c/exclusions\u003e\n        \n        \u003cignored\u003e \u003c!-- default: empty list --\u003e\n            \u003cignore\u003egroupId:artifactId:version\u003c/ignore\u003e\n        \u003c/ignored\u003e\n    \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n2. Run `mvn validate`\n\n### Configuration settings\n\nThe following settings can be used for the plugin:\n\n| config name                 | default value | description                                                                                                      |\n|-----------------------------|---------------|------------------------------------------------------------------------------------------------------------------|\n| enabled                     | true          | Turns the plugin on or off                                                                                       |\n| printViolations             | true          | If true will print a warning in the log for each dependency that failed the rules                                |\n| printIgnored                | true          | If true will print a warning in the log for each dependency that failed the rules but was ignored as a violation |\n| printCompliant              | false         | If true will print an info message for each dependency that passed the rules                                     |\n| failBuildOnViolation        | true          | If true will cause the build to fail if any dependency violates the rules                                        |\n| checkCodeDependencies       | true          | If true will include all code dependencies in the pom, including transitive dependencies                         |\n| checkPluginDependencies     | false         | If true will include all plugin dependencies in the pom                                                          |\n| includeCompileDependencies  | true          | If true will include all dependencies with the compile scope                                                     |\n| includeRuntimeDependencies  | true          | If true will include all dependencies with the runtime scope                                                     |\n| includeProvidedDependencies | false         | If true will include all dependencies with the provided scope                                                    |\n| includeTestDependencies     | false         | If true will include all dependencies with the test scope                                                        |\n| strategy                    | passOnMatch   | passOnMatch makes the rules behave like a whitelist, failOnMatch makes the rules behave like a blacklist         |\n| rules                       | []            | The list of rules. Use the tag `\u003crule\u003e` and follow the rule format below                                         |\n| exclusions                  | []            | The list of excluded artifacts. Use the tag `\u003cexclude\u003e` and write the GAV separated by colons                    |\n| ignored                     | []            | The list of ignored artifacts. Use the tag `\u003cignore\u003e` and write the GAV separated by colons                      |\n\n### Rule format\n\nA rule in the configuration looks like this:\n\n    \u003cfield\u003e:\u003ctype\u003e:\u003cvalue\u003e\n\nThe field can be one of `name` or `url`, which will make the plugin compare either the name or url field of the license.\n\nThe type can be one of `equal` or `regex`, which will make the plugin either compare for a direct equality match or a regular expression match.\n\nThe value is either the string to match with or the regular expression to match with depending on what was chosen for the type.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemonstur%2Fmaven-check-license","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemonstur%2Fmaven-check-license","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemonstur%2Fmaven-check-license/lists"}