{"id":21492570,"url":"https://github.com/societe-generale/arch-unit-maven-plugin","last_synced_at":"2026-03-03T16:36:39.431Z","repository":{"id":45047258,"uuid":"171612396","full_name":"societe-generale/arch-unit-maven-plugin","owner":"societe-generale","description":"A maven wrapper around ArchUnit, to easily share and enforce architecture rules across projects","archived":false,"fork":false,"pushed_at":"2026-01-20T15:16:46.000Z","size":292,"stargazers_count":131,"open_issues_count":11,"forks_count":25,"subscribers_count":15,"default_branch":"main","last_synced_at":"2026-01-21T00:17:48.082Z","etag":null,"topics":[],"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/societe-generale.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-02-20T06:14:38.000Z","updated_at":"2026-01-20T15:16:50.000Z","dependencies_parsed_at":"2023-12-28T00:56:58.287Z","dependency_job_id":"be13a006-3cf7-48d7-81cb-c92c411dbd93","html_url":"https://github.com/societe-generale/arch-unit-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/societe-generale/arch-unit-maven-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/societe-generale%2Farch-unit-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/societe-generale%2Farch-unit-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/societe-generale%2Farch-unit-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/societe-generale%2Farch-unit-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/societe-generale","download_url":"https://codeload.github.com/societe-generale/arch-unit-maven-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/societe-generale%2Farch-unit-maven-plugin/sbom","scorecard":{"id":835583,"data":{"date":"2025-08-11","repo":{"name":"github.com/societe-generale/arch-unit-maven-plugin","commit":"52ca194a2f1259988eb73e47afb06cfa7d1fb777"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"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":"Code-Review","score":1,"reason":"Found 3/30 approved changesets -- score normalized to 1","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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_workflow.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/societe-generale/arch-unit-maven-plugin/build_workflow.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_workflow.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/societe-generale/arch-unit-maven-plugin/build_workflow.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_workflow.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/societe-generale/arch-unit-maven-plugin/build_workflow.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_workflow.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/societe-generale/arch-unit-maven-plugin/build_workflow.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release_workflow.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/societe-generale/arch-unit-maven-plugin/release_workflow.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release_workflow.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/societe-generale/arch-unit-maven-plugin/release_workflow.yml/master?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build_workflow.yml:1","Warn: no topLevel permission defined: .github/workflows/release_workflow.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.md: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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-78wr-2p64-hpwj","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v"],"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-23T18:56:28.107Z","repository_id":45047258,"created_at":"2025-08-23T18:56:28.107Z","updated_at":"2025-08-23T18:56:28.107Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30051995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T15:26:47.567Z","status":"ssl_error","status_checked_at":"2026-03-03T15:26:17.132Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":"2024-11-23T15:30:02.462Z","updated_at":"2026-03-03T16:36:39.422Z","avatar_url":"https://github.com/societe-generale.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# ArchUnit Maven plugin\n\n![Build Status](https://github.com/societe-generale/arch-unit-maven-plugin/actions/workflows/build_workflow.yml/badge.svg)\n[![codecov](https://codecov.io/github/societe-generale/arch-unit-maven-plugin/graph/badge.svg?token=XrRWdv5yfi)](https://codecov.io/github/societe-generale/arch-unit-maven-plugin)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.societegenerale.commons/arch-unit-maven-plugin/badge.svg?style=plastic)](https://maven-badges.herokuapp.com/maven-central/com.societegenerale.commons/arch-unit-maven-plugin)\n\n**ArchUnit Maven plugin** is a simple Maven wrapper\naround [ArchUnit](https://github.com/TNG/ArchUnit) that enables you to easily make sure that all\nyour projects follow the same architecture rules.\n\nArchUnit is an awesome tool to implement some tricky checks that other static analysis tools can't\nimplement at all : these checks run as unit tests, and guarantee that build will break if any\nviolation is introduced, giving developers very fast feedback on their work.\n\nNow, imagine you have 3 architecture rules, and you want 10 repositories to apply them... By\ndefault, you'll have no choice but copy/paste the rules (ie unit tests) in the 10 repositories. And\nif somebody removes one of these tests later, it may take months to realize it.\n\nArchUnit Maven plugin comes with a couple of rules out of the box (but you can add your own) : all\nyou need is a bit of Maven config in your root pom.xml to make sure the rules you want to enforce\nare actually run at every build ! it then becomes very easy to have a proper governance on dozens of\nrepositories.\n\nAnd if you want to have regular reporting on which projects are using ArchUnit Maven plugin, with\nwhich rules, you can use our [GitHub crawler](https://github.com/societe-generale/github-crawler)\n\n## How to use ArchUnit Maven plugin ?\n\nAdd below plugin in your root pom.xml : all available ```\u003crule\u003e``` are mentioned, so remove the ones\nyou don't need. If needed, specify in ```\u003cprojectPath\u003e``` property the path of the directory where\nthe rules will be asserted\n\n```xml\n\u003cplugin\u003e\n  \u003cgroupId\u003ecom.societegenerale.commons\u003c/groupId\u003e\n  \u003cartifactId\u003earch-unit-maven-plugin\u003c/artifactId\u003e\n  \u003cversion\u003e5.0.0\u003c/version\u003e\n  \u003cconfiguration\u003e\n    \u003cproperties\u003e\n      \u003carchunit.propertyName\u003epropertyValue\u003c/archunit.propertyName\u003e\n    \u003c/properties\u003e\n    \u003crules\u003e\n      \u003cpreConfiguredRules\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoStandardStreamRuleTest\u003c/rule\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoJunitAssertRuleTest\u003c/rule\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoJodaTimeRuleTest\u003c/rule\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoJavaUtilDateRuleTest\u003c/rule\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoPowerMockRuleTest\u003c/rule\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoPrefixForInterfacesRuleTest\u003c/rule\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoPublicFieldRuleTest\u003c/rule\u003e\n\n        \u003c!-- you may want to use one of the below rules, but not both at same time --\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoTestIgnoreRuleTest\u003c/rule\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoTestIgnoreWithoutCommentRuleTest\u003c/rule\u003e\n\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoInjectedFieldTest\u003c/rule\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoAutowiredFieldTest\u003c/rule\u003e\n      \u003c/preConfiguredRules\u003e\n    \u003c/rules\u003e\n  \u003c/configuration\u003e\n  \u003cexecutions\u003e\n    \u003cexecution\u003e\n      \u003cphase\u003etest\u003c/phase\u003e\n      \u003cgoals\u003e\n        \u003cgoal\u003earch-test\u003c/goal\u003e\n      \u003c/goals\u003e\n    \u003c/execution\u003e\n  \u003c/executions\u003e\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003c!-- \n           A version of the core jar is included by default, but don't hesitate \n           to upgrade to a later one if you need :\n           we will be able to add rules and behavior in arch-unit-build-plugin-core\n           without releasing a new version of arch-unit-maven-plugin\n       --\u003e\n      \u003cgroupId\u003ecom.societegenerale.commons\u003c/groupId\u003e\n      \u003cartifactId\u003earch-unit-build-plugin-core\u003c/artifactId\u003e\n      \u003cversion\u003eSOME_CORE_VERSION_GREATER_THAN_THE_PLUGIN\u003c/version\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n\u003c/plugin\u003e\n```\n\n## Dependency on arch-unit-build-plugin-core\n\nSince v2.3.0, a lot of the original code from this repository has been moved\nto [https://github.com/societe-generale/arch-unit-build-plugin-core](https://github.com/societe-generale/arch-unit-build-plugin-core) ,\nso that we can build a Maven or a Gradle plugin on top of a (\ncommon) [core logic](https://github.com/societe-generale/arch-unit-build-plugin-core/tree/arch_unit_build_plugin_core_2.3.0).\n\nTherefore, since then, this repository is greatly simplified as it contains only Maven specific code\nand the adapters between Maven world and arch-unit-build-plugin-core.\n\nThis Maven plugin ships with a default version of arch-unit-build-plugin-core, but if new rules are\nadded in arch-unit-build-plugin-core, you'll need to declare it as a dependency (as in the example\nabove) to benefit from them. As long as there's no major change in the core API that would force us\nto update the Maven plugin, we won't have to release a new version of the plugin.\n\n## Adding custom rules\n\n### Add a single rule, for a given project\n\nIf you need to add a rule that is specific to a project, just add a regular ArchUnit test, as\ndescribed on ArchUnit's homepage. You'll need to import yourself archUnit dependency, so please make\nsure to use the same version as in the plugin, otherwise there may be strange behaviors. ArchUnit\nMaven plugin will not be involved.\n\n### Add a rule, and share it across projects\n\nYou can share custom rules by packaging the respective classes containing the rules in a jar.\nSuch classes can either contain fields of type `ArchRule` or methods taking a single parameter of\ntype\n`JavaClasses` (compare JUnit support\nat https://www.archunit.org/userguide/html/000_Index.html#_junit_4_5_support).\nThe classes those rules will be checked against are configured within the plugin.\nAdd the jar containing your classes to your classpath (by mentioning it as a plugin's dependency for\ninstance),\nand then mention the ```\u003crule\u003e``` with its fully qualified name the ```\u003crules\u003e``` block,\nso that ArchUnit Maven plugin can instantiate it and run it.\n\nSo your config would become something like :\n\n```xml\n\u003cplugin\u003e\n  \u003cgroupId\u003ecom.societegenerale.commons\u003c/groupId\u003e\n  \u003cartifactId\u003earch-unit-maven-plugin\u003c/artifactId\u003e\n  \u003cversion\u003e5.0.0\u003c/version\u003e\n  \u003cconfiguration\u003e\n\n    \u003c!-- optional - you can avoid build fail if there is issue. True to avoid build failure, default is false --\u003e\n    \u003cnoFailOnError\u003etrue\u003c/noFailOnError\u003e\n\n    \u003c!-- optional - you can exclude classes that have a path containing any of the mentioned paths --\u003e\n    \u003cexcludedPaths\u003e\n      \u003cexcludedPath\u003emy/package/to/exclude\u003c/excludedPath\u003e\n    \u003c/excludedPaths\u003e\n\n    \u003crules\u003e\n      \u003c!-- using a rule available out of the box... --\u003e\n      \u003cpreConfiguredRules\u003e\n        \u003crule\u003ecom.societegenerale.commons.plugin.rules.NoJunitAssertRuleTest\u003c/rule\u003e\n      \u003c/preConfiguredRules\u003e\n      \u003c!-- ... and a custom one, coming from a dependency of the plugin --\u003e\n      \u003cconfigurableRules\u003e\n        \u003cconfigurableRule\u003e\n          \u003crule\u003ecom.tngtech.archunit.library.GeneralCodingRules\u003c/rule\u003e\n          \u003capplyOn\u003e\n            \u003cpackageName\u003ecom.myproject.mypackage\u003c/packageName\u003e\n            \u003c!-- scope can be \"main\" or \"test\" --\u003e\n            \u003cscope\u003emain\u003c/scope\u003e\n          \u003c/applyOn\u003e\n\n          \u003cchecks\u003e\n            \u003c!-- otherwise you can specify either field or method names here. If no checks block is defined, all are executed --\u003e\n            \u003ccheck\u003eNO_CLASSES_SHOULD_ACCESS_STANDARD_STREAMS\u003c/check\u003e\n          \u003c/checks\u003e\n        \u003c/configurableRule\u003e\n      \u003c/configurableRules\u003e\n    \u003c/rules\u003e\n  \u003c/configuration\u003e\n  \u003cexecutions\u003e\n    \u003cexecution\u003e\n      \u003cphase\u003etest\u003c/phase\u003e\n      \u003cgoals\u003e\n        \u003cgoal\u003earch-test\u003c/goal\u003e\n      \u003c/goals\u003e\n    \u003c/execution\u003e\n  \u003c/executions\u003e\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003c!-- dependency contains com.mycompany.rules.CustomArchRule --\u003e\n      \u003cgroupId\u003ecom.myCompany\u003c/groupId\u003e\n      \u003cartifactId\u003ecustom-quality-rules\u003c/artifactId\u003e\n      \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n\u003c/plugin\u003e\n```\n\n## Skipping rules\n\nIn case of adding **ArchUnit Maven plugin** to a legacy code base you might not be able to enforce\nall rules immediately.\nYou may add **ArchUnit Maven plugin** to a parent POM of your Maven artifacts and still be able to\nskip execution in child\nprojects by using the skip-configuration.\n\n### Skipping just one rule\n\nMost of the time you add a new rule to your **ArchUnit Maven plugin** (which might immediately be\navailable in all of\nyour artifacts) but the issues **ArchUnit** reveals using your rule may not be fixed as soon as you\nneed to release the\nnext version of your artifacts.\n\nTo skip a rule temporarily, configure it like\n\n```xml\n\u003cproperties\u003e\n  \u003carchunit.customrule.skip\u003efalse\u003c/archunit.customrule.skip\u003e\n\u003c/properties\u003e\n\u003c!-- and inside your plugin's configuration --\u003e\n\u003cconfigurableRule\u003e\n\u003crule\u003ecom.mycompany.rules.CustomArchRule\u003c/rule\u003e\n\u003cskip\u003e${archunit.customrule.skip}\u003c/skip\u003e\n\u003c!-- detailed configuration omitted --\u003e\n\u003c/configurableRule\u003e\n```\n\nand then your slow-to-be-fixed-artifacts my override the property\n`\u003carchunit.customrule.skip\u003etrue\u003c/archunit.customrule.skip\u003e`\n\n### Skipping the whole plugin\n\nIf even skipping certain rules doesn't fit your needs, configure to skip the whole plugin execution:\n\n```xml\n\u003cproperties\u003e\n  \u003carchunit.skip\u003efalse\u003c/archunit.skip\u003e\n\u003c/properties\u003e\n\u003c!-- and then inside the ArchUnit Maven plugin --\u003e\n\u003cconfiguration\u003e\n\u003cskip\u003e${archunit.skip}\u003c/skip\u003e\n\u003c/configuration\u003e\n```\n\nand then you can switch the parameter `archunit.skip` either on runtime (via `-Darchunit.skip=true`)\nor statically in child modules.\n\n## ArchUnit advanced configuration\n\nSince v2.2.0, you can benefit from ArchUnit advanced configuration, as the plugin can find\n`archunit.properties` file. More infos\nin [ArchUnit's user guide](https://www.archunit.org/userguide/html/000_Index.html#_advanced_configuration)\n\n### Using `archunit.properties` file\n\nArchUnit loads its\nconfiguration [once](https://github.com/TNG/ArchUnit/blob/3df2e7d26c6b18b1c2d383088a37ac0f45020f78/archunit/src/main/java/com/tngtech/archunit/ArchConfiguration.java#L57)\nusing the first `archunit.properties` file found as a resource in the classpath, then it's cached\nand reused.\nThis can cause surprises in multi-module Maven projects since the ArchUnit instance is in use takes\nits configuration from the first module it's used with, and doesn't get reconfigured for each module\nas might be expected.\n\nFor example, if you are packaging\na [freezing rule](https://www.archunit.org/userguide/html/000_Index.html#_freezing_arch_rules) for\nuse in a multi-module project,\nthe violation store location is configured once and isn't reconfigured for each module.\nAs a workaround the rule can be adapted to overwrite the configuration before triggering the\nfreezing rule, as described\nin [#37](https://github.com/societe-generale/arch-unit-maven-plugin/issues/37#issuecomment-792115469).\n\n### Using Maven `\u003cproperties\u003e` configuration\n\nSince v3.0.0, an alternative approach is to configure properties using the Maven plugin where\nproperties can be configured without writing to an `archunit.properties` file.\nThe plugin will reconfigure ArchUnit for each module, complete with standard maven property\nexpansion, before triggering the configured rules.\n\nFor example, if you are packaging\na [freezing rule](https://www.archunit.org/userguide/html/000_Index.html#_freezing_arch_rules) for\nuse in a multi-module project,\nyou can enable store creation and set the location relative to each module:\n\n```xml\n\u003cplugin\u003e\n  \u003cgroupId\u003ecom.societegenerale.commons\u003c/groupId\u003e\n  \u003cartifactId\u003earch-unit-maven-plugin\u003c/artifactId\u003e\n  \u003cconfiguration\u003e\n    \u003cproperties\u003e\n      \u003cfreeze.store.default.allowStoreCreation\u003etrue\u003c/freeze.store.default.allowStoreCreation\u003e\n      \u003cfreeze.store.default.path\u003e${project.basedir}/src/archunit/\u003c/freeze.store.default.path\u003e\n    \u003c/properties\u003e\n    \u003crules\u003e\n      ...\n    \u003c/rules\u003e\n  \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\nSee [here](https://github.com/societe-generale/arch-unit-maven-plugin/issues/37#issuecomment-792115469)\nfor a workaround : you need to overwrite the\nstore location value in the cached configuration before triggering the freezing rule.\n\n## Excluding paths\n\nSince v2.4.0, configuration can take an optional `excludedPaths` element. All classes that have a\nlocation that contains one the mentioned Strings\nwill be excluded from the ArchUnit checks : can be useful in case some classes are generated (\nLombok, Mapstruct, ..) and you have little or no control\non what gets generated.\n\nSee [ExclusionImportOption.java](https://github.com/societe-generale/arch-unit-build-plugin-core/blob/2a6f5d009b96a7921bf2de65fcc0aad85edc006a/src/main/java/com/societegenerale/commons/plugin/utils/ExclusionImportOption.java)\nfor details on the (very simple) logic.\n\nSince v2.8.0, we can exclude something like `generated-sources`, even if the code ends up in the\nsame package(S) as the regular code. See the\ndiscussion in https://github.com/societe-generale/arch-unit-maven-plugin/pull/44 for more details\n\n## Disable fallback for wrongly configured paths\n\nWhen no class files have been found using the configured paths, all folders of the current maven\nmodule are scanned for analysable classes. This could be a\nproblem in multi-modules projects when some modules do not contain analyzable code (e.g. for\npackaging of web applications), if you don't want to override the plugin config (by disabling it\nentirely) in some modules\n\nThis behavior can be disabled by setting the optional `fallbackToRootDirectory` element of the\nconfiguration to `false`.\n\n## Contribute !\n\nIf you want to make changes in the Maven specific behavior, don't hesitate to open on issue on this\nrepository and/or create a pull request.\n\nIf you don't want to package your rules separately and/or feel they could be useful to others, we\ncan make your rules part of\narch-unit-build-plugin-core, so that they can be used out of the box by anyone : don't hesitate to\nsend us a pull request ! have a look at\nthe [code](https://github.com/societe-generale/arch-unit-build-plugin-core/tree/arch_unit_build_plugin_core_2.3.0/src/main/java/com/societegenerale/commons/plugin/rules)\n, it's very easy to add one.\n\n## Official maintainers\n\n- [Paul Williams](https://github.com/paul58914080)\n- [Vincent Fuchs](https://github.com/vincent-fuchs)\n- [Arpit Garg](https://github.com/arpitgarg9168)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsociete-generale%2Farch-unit-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsociete-generale%2Farch-unit-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsociete-generale%2Farch-unit-maven-plugin/lists"}