Skip to content

CDK modules as Java modules? #626

@tomas-pluskal

Description

@tomas-pluskal

Hi!
Currently, it is not possible to use CDK in modular (i.e., Java 9+ style) Java apps. The reason is

  • CDK jars don't contain module-info class, therefore when used as dependencies they are treated as "automatic modules" (a Java module is automatically created for each non-modular jar dependency).
  • Subsequent compilation fails because different CDK jars contain classes in the same package. This is called "split packages" and is illegal in modular Java apps.

Turning CDK modules into proper Java modules would take a bit of effort for refactoring and I understand that nobody has time to do that.. but it could make a nice Google Summer of Code project, for example?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions