-1

I have a multi module maven project. I want to use ArchUnit to assert certain things about test classes structure. For example, that all my TestUtil classes reside in a specific package. But when running tests for a module, I don't have access to another module's src/test files which means I have to write the same test for every module (The project has +20 modules). Is there a way to have all test classes from all modules in classpath?

I have seen answers like this one that try to build a fat jar including all test files and test-dependencies. But that specific answer was for a single module. I couldn't set that up in my project.

ParSal
  • 114
  • 3
  • 9
  • Sure, you could hack that into Maven by depending on `test`, but it's probably nicer to have the test in a shared source set somewhere, then run it in every project's test source set. – Jorn Aug 10 '23 at 07:35

0 Answers0