spring-projects / spring-modulith

Modular applications with Spring Boot
https://spring.io/projects/spring-modulith
Apache License 2.0
813 stars 140 forks source link

Add option to disable automatic jMolecules ArchUnit rule verification #828

Open xenoterracide opened 1 month ago

xenoterracide commented 1 month ago

Due to what appears to be a bug in archunit I'm looking at possibly writing this integration testing manually but the documentation doesn't seem to imply that I can disable this if I provide archunit.

Spring Modulith optionally integrates with the jMolecules ArchUnit library and, if present, automatically triggers its Domain-Driven Design verification rules described here.

not certain if this is a missing feature or simply a need to document.

odrotbohm commented 1 month ago

Can you elaborate on what the actual problem is? You have the jMolecules ArchUnit rules on the test classpath but do not want to execute them?

xenoterracide commented 1 month ago

I'm encountering a bug (their's not yours) and I'm trying to work around it. Either by customizing the rules executed, or disabling them all together and then writing my own archunit test.

This is the bug.

https://github.com/xmolecules/jmolecules-integrations/issues/259

xenoterracide commented 1 month ago

I think that this should be remediated on similar principals to spring boots autoconfiguration. You can let spring boot be auto-configured until you start telling it not to, or you start overriding it. This is the same case. Right now my workaround will probably be another JvmTestSuite so I can choose which rules to enforce.