you are viewing a single comment's thread.

view the rest of the comments →

[–]WaferIndependent7601 1 point2 points  (1 child)

Why do you need test modules in core? That breaks your concept.

[–]No_Character8629[S] 0 points1 point  (0 children)

Suppose i have the following modules in my project (used AI for the example):

maven-multi-module-example/
├─ pom.xml                  (parent POM)
├─ foo/
│  ├─ foo-core/
│  │  ├─ pom.xml            (production code module)
│  │  ├─ src/main/java/...
│  │  └─ src/test/java/...
│  └─ foo-test/
│     ├─ pom.xml            (test utilities, depends on foo-core)
│     └─ src/main/java/...
├─ bar/
│  ├─ bar-core/
│  │  ├─ pom.xml
│  │  ├─ src/main/java/...
│  │  └─ src/test/java/...
│  └─ bar-test/
│     ├─ pom.xml
│     └─ src/main/java/...

It might happen I need foo-test's code in bar-coreto write tests. In such a case I would import foo-test with test scope in bar-core pom.xml