Skip to content

Module dependency for common module #366

Description

@shreyy1234

I have 3 modules, in this one module name is common.
common
|- datatype
|- infrastructure
|- enums
|- Aggregates

common module has different packages. As this module in common its internal classes of internal packages should be easily accessible.
However using modulith, module. verify fails when I try to use an enum from this common module in any other module.
I can able to resolve this by adding package-info into each subpackage of common module e.g
@org.springframework.modulith.NamedInterface("datatype")
package com.common.datatype;

however, adding package-info into each package is not a clean solution. is there any other way where I could mention this is a shared module so the modularity test should not fail?
Already tried with but it did not work.
@Modulithic(sharedModules = "com.common")
public class Application {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions