{"id":37024075,"url":"https://github.com/oslomarketsolutions/pre-commit-maven-plugin","last_synced_at":"2026-01-14T02:54:21.655Z","repository":{"id":48299598,"uuid":"136346975","full_name":"oslomarketsolutions/pre-commit-maven-plugin","owner":"oslomarketsolutions","description":"A Maven plugin for the pre-commit framework","archived":false,"fork":false,"pushed_at":"2021-08-02T17:07:13.000Z","size":79,"stargazers_count":19,"open_issues_count":8,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-13T12:19:01.240Z","etag":null,"topics":["git","git-hooks","maven","maven-plugin","pre-commit"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oslomarketsolutions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-06T15:15:28.000Z","updated_at":"2025-02-21T08:15:12.000Z","dependencies_parsed_at":"2022-09-14T19:23:34.951Z","dependency_job_id":null,"html_url":"https://github.com/oslomarketsolutions/pre-commit-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/oslomarketsolutions/pre-commit-maven-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslomarketsolutions%2Fpre-commit-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslomarketsolutions%2Fpre-commit-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslomarketsolutions%2Fpre-commit-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslomarketsolutions%2Fpre-commit-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oslomarketsolutions","download_url":"https://codeload.github.com/oslomarketsolutions/pre-commit-maven-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslomarketsolutions%2Fpre-commit-maven-plugin/sbom","scorecard":{"id":713702,"data":{"date":"2025-08-11","repo":{"name":"github.com/oslomarketsolutions/pre-commit-maven-plugin","commit":"48bbae6998722a31caaab756a745da4fd3b70294"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"21 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-mvr2-9pj6-7w5j","Warn: Project is vulnerable to: GHSA-gwrp-pvrq-jmwv","Warn: Project is vulnerable to: GHSA-2qrg-x229-3v8q","Warn: Project is vulnerable to: GHSA-65fg-84f6-3jq3","Warn: Project is vulnerable to: GHSA-f7vh-qwp3-x37m","Warn: Project is vulnerable to: GHSA-fp5r-v3w9-4333","Warn: Project is vulnerable to: GHSA-w9p3-5cr8-m3jj","Warn: Project is vulnerable to: GHSA-4g9r-vxhx-9pgx","Warn: Project is vulnerable to: GHSA-7hfm-57qf-j43q","Warn: Project is vulnerable to: GHSA-crv7-7245-f45f","Warn: Project is vulnerable to: GHSA-h436-432x-8fvx","Warn: Project is vulnerable to: GHSA-hrmr-f5m6-m9pq","Warn: Project is vulnerable to: GHSA-mc84-pj99-q6hh","Warn: Project is vulnerable to: GHSA-xqfj-vm6h-2x34","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-7r82-7xv7-xcpj","Warn: Project is vulnerable to: GHSA-2f88-5hg8-9x2x","Warn: Project is vulnerable to: GHSA-g6ph-x5wf-g337","Warn: Project is vulnerable to: GHSA-jcwr-x25h-x5fh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T08:53:09.451Z","repository_id":48299598,"created_at":"2025-08-22T08:53:09.451Z","updated_at":"2025-08-22T08:53:09.451Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408795,"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":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["git","git-hooks","maven","maven-plugin","pre-commit"],"created_at":"2026-01-14T02:54:21.059Z","updated_at":"2026-01-14T02:54:21.632Z","avatar_url":"https://github.com/oslomarketsolutions.png","language":"Java","readme":"# pre-commit-maven-plugin\n\n\u003e A maven plugin for [the pre-commit framework][precommit]\n\n[pre-commit][precommit] is a framework for managing commit hooks in a\nGit repository. It makes working with commit hooks easier, but it has an\nissue. It requires that developers install a binary onto their system\nand manually installing the the hooks into their repo by running\n`pre-commit install --install-hooks`. We can do better than that!\n\nWhen compiling a maven project, this plugin will install the git hooks\nautomatically in the developer's Git project. One less thing to\nremember!\n\n## Usage\n\nFirst, follow the [setup instructions][setup] on pre-commit.com. A\n`.pre-commit-config.yaml` file in the root of the project is required\nfor the plugin to work.\n\nAdd the following to your `pom.xml` under build plugins:\n\n```xml\n\u003cplugin\u003e\n    \u003cgroupId\u003eno.oms.maven\u003c/groupId\u003e\n    \u003cartifactId\u003epre-commit-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003eLATEST_VERSION\u003c/version\u003e\n    \u003cinherited\u003efalse\u003c/inherited\u003e\n    \u003cconfiguration\u003e\n        \u003c!-- The version of pre-commit you would like to use --\u003e\n        \u003cprecommitVersion\u003ev1.10.1\u003c/precommitVersion\u003e\n    \u003c/configuration\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003edownload-binary\u003c/goal\u003e\n                \u003cgoal\u003egenerate-hooks\u003c/goal\u003e\n            \u003c/goals\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\nRemember to replace `LATEST_VERSION` with the version of the plugin you\nwould like to use, i.e. [the latest version][releases]. This will\nregister the plugin\n\n### Other hook types\n\nIf you're using other types of hooks than just precommit hooks, then you need to\npass an argument specifying which hooks you would like the plugin to install.\nThis is done by setting the `hookTypes` argument:\n\n```xml\n\u003chookTypes\u003e\n    \u003chookType\u003epreCommit\u003c/hookType\u003e\n    \u003chookType\u003eprePush\u003c/hookType\u003e\n    \u003chookType\u003ecommitMsg\u003c/hookType\u003e\n\u003c/hookTypes\u003e\n```\n\n### Options\n\n\u003e TODO\n\n### Skipping execution\n\nIf you need to skip parts of the plugin, you may do so using the\nfollowing system properties:\n\n|Goal    |Property                  |\n|--------|--------------------------|\n|download| -Dskip.downloadprecommit |\n|install | -Dskip.installprecommit  |\n\n### Gitignore\n\nAfter running the plugin, you will see a `precommit_files` directory in\nyour project. This is where the plugin stores the pre-commit files so\nthat they can be executed when generating the Git hooks.\n\nYou probably want to add this directory to your gitignore.\n\n## FAQ\n### Hooks are outdated\n\nIf you use `rev: master` or something similar, you may encounter situations\nwhere `pre-commit` does not want to run the correct version of the hooks because\nit has cached an earlier version.\n\nTo fix this, try deleting the cache directory at `~/.cache/pre-commit/`.\n\n## Developing\n\n### Releasing new versions\nEnsure you have access to [OSSRH][ossrh] and that your `~/.m2/settings.xml`\nincludes the following\n\n```\n\u003cserver\u003e\n  \u003cid\u003eossrh\u003c/id\u003e\n  \u003cusername\u003eyour_ossrh_username\u003c/username\u003e\n  \u003cpassword\u003eyour_ossrh_password\u003c/password\u003e\n\u003c/server\u003e\n```\n\nRun `mvn clean deploy -P release`\n\n[precommit]: https://pre-commit.com\n[setup]: https://pre-commit.com/#plugins\n[releases]: https://github.com/oslomarketsolutions/pre-commit-maven-plugin/releases\n[ossrh]: https://central.sonatype.org\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foslomarketsolutions%2Fpre-commit-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foslomarketsolutions%2Fpre-commit-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foslomarketsolutions%2Fpre-commit-maven-plugin/lists"}