Prevent compile time dependency of APT on docs artifact #984
Labels
in: core
Core module meta model
in: documentation support
Documentation generation
type: bug
Something isn't working
Milestone
Spring Modulith 1.3.0 introduced an APT to extract Javadoc from an application for use in generated documentation. The artifact depends on
spring-modulith-docs
in compile scope to refer to types that define the file structure generated and subsequently consumed by the docs artifact. This causes both the documentation and its transitive core artifact to always be pulled into compile scope, subsequently leading to the inclusion of the docs artifact in the application JAR created by the Spring Boot build plugin.This actually causes GH-943 to be unreproducible on 1.3 as the core artifact is always pulled into compile scope by the core starter, despite being declared as a runtime dependency. We want to avoid that, in order to make the decision to depend on core in compile scope an explicit step.
Unfortunately, we cannot move the metadata types into the APT module as it also depends on a
BuildSystemUtils
type that we would need to move around.We should instead simply shade the three classes into the APT so that it's basically dependencyless and does not trigger additional libraries being included into the production application.
The text was updated successfully, but these errors were encountered: