5

Hi, I'm trying to find a way in IntelliJ to verify package structure of a project. Let's say that my project contains following packages

src/common

src/module/featureA

src/module/featureB

src/module/featureC

I want to avoid any dependencies between code located in feature packages. So if I remove featureA the project should still compile. If I find any functionality which is common for two or more features I move it to common package.

What I want to get is to be able to verify if:

  • there are no dependencies between classes in separate features
  • there are no dependencies from common to features
  • there are at least two dependencies from features to common

Can this be easily done by any of Analyze functions of IntelliJ. Or, maybe this check could be done using checktyle rules?

  • What kind of build tool do you use? If maven you can print dependency graphs. Under the `Analyze` menu option you find multiple options you can try out... – Ivonet Dec 10 '17 at 17:48
  • you can use maven sub-module to have such clear boundaries, but I understand that will cause some complexity managing various sub-modules – Ahmad Y. Saleh Jun 10 '18 at 09:38

0 Answers0