Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArchUnit: Allow to customize default architecture styles #291

Open
stefanzilske opened this issue Nov 28, 2024 · 0 comments
Open

ArchUnit: Allow to customize default architecture styles #291

stefanzilske opened this issue Nov 28, 2024 · 0 comments

Comments

@stefanzilske
Copy link

stefanzilske commented Nov 28, 2024

Hey, I am using jMolecules and ArchUnit to verify my project's structure. I prefer to use jMolecules annotations in package-info.java files.

However, I would like customize the default layouts, e.g. LayeredStrict. I would like to allow API to access DOMAIN directly, but I don't want to use the simple Layered layout, which allows a lot more dependencies.

I cannot really customize that, but still use the jMolecules annotation because many things JMoleculesArchitectureRules are private or package protected and cannot really work around them.

For example, I cannot easily create my own ensureLayeredCustom() method, because I cannot access LayeredArchitecture::layeredArchitecture(StereotypeLookup lookup) - it is private.

I cannot weite my own l layeredArchitecture(StereotypeLookup lookup) methods, because I cannot access StereotypeLookup::forAnnotation(...) because it is protected.

So, tl;dr - my question is: Can I customize the allowed dependencies, but still use jMolecules annotations? I don't wan't to switch to defining packages in the ArchUnit test, that define the layers.

Cheers!
Stefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant