#21 implementation avoid cyclic dependencies#37
#21 implementation avoid cyclic dependencies#37hohwille merged 5 commits intodevonfw-sample:masterfrom
Conversation
hohwille
left a comment
There was a problem hiding this comment.
@NicolasVanBellen Thanks for your PR.
This is looking very good and seem functional.
However, I do have a question. Can you please comment.
If my guess does not work, we can still merge and rework later.
| @ArchTest | ||
| static final ArchRule no_cyclic_dependencies_are_allowed = | ||
| slices() | ||
| .matching("..archunit.(*)..") |
There was a problem hiding this comment.
here we encode our project specific namespace into the rule.
The first thing that projects will have to do after refactoring this sample to their own project namespace is to identify all these places and change them according to their project.
With StructuredPackage we have created a solution that is fully generic and should apply to all devonfw based Java projects no matter what their package namespace actually is.
I do not know how this ArchUnit patterns are working. Are they Java regular expressions?
As .. behaves differently from what I know about regex this looks more special.
However, I would simply try something like this instead:
.matching("..(*).(common|service|logic|dataaccess|batch|client")..")
There was a problem hiding this comment.
Your approach does work. I have adjusted it in the file and we will also adjust it in #29 as well.
hohwille
left a comment
There was a problem hiding this comment.
@NicolasVanBellen thanks for testing and rework. 👍
Now ready for merge.
No description provided.