Closed sysmat closed 11 months ago
Can you be more specific on what "break" means? Do you have a minimal reproducible example?
mvn test
produce error[ERROR] TestEngine with ID 'archunit' failed to discover tests
jmolecules-archunit
then test work@sysmat @odrotbohm Same problem here (with Java 17).
Unfortunately, jmolecules-archunit 1.6.0 is not compatible with ArchUnit 1.0 or later. You have do downgrade to ArchUnit 0.23.1 to get JMoleculesDddRules and JMoleculesArchitectureRules find certain classes/methods at (test) runtime.
I think there were some API changes in ArchUnit after 0.23.1 which may cause these problems.
This also means you cannot use Java 20/21, as the ASM lib bundled with ArchUnit 0.23.1 cannot read bytecode from these new versions. But your Java 8 config should work.
I'm not sure that I follow. There's not jmolecules-archunit
in 1.6. Integrations are still in 0.x. Please make sure you use the BOM. The latest version (2023.1.0) pulls in jMolecules Integrations 0.17. The ArchUnit integration of that is in turn built against ArchUnit 1.1.
Oh... I was using integrations 1.6.0 from https://mvnrepository.com/artifact/org.jmolecules.integrations/jmolecules-archunit Will try the BOM.
Yeah, that was released by accident at some point and we unfortunately cannot get it out of Maven Central. :(
The BOM works like charm, also with ArchUnit 1.1.0 and Java 21. Thanks for the quick help!
@sysmat This should fix your problem, too. Either use the BOM (or, for a quick check, use jmolecules-archunit 0.17.0 explicitely).
layeredArchitecture().consideringAllDependencies()