-
Notifications
You must be signed in to change notification settings - Fork 170
Open
Labels
in: documentation supportDocumentation generationDocumentation generation
Description
Given
public class ModulithTest {
private final Logger log = LogManager.getLogger(this.getClass());
// this is not a test but rather a silly way to manually run documentation generation
@Test
void writeDocumentationSnippets() {
// hacky hack because the test is not run by the Spring Boot Test Runner
System.setProperty("spring.modulith.detection-strategy", "explicitly-annotated");
var modules = ApplicationModules.of(Application.class);
modules.forEach(module -> log.info("Module: {}", module));
new Documenter(modules).writeDocumentation();
}
}
When
@Module("Annotations")
@InfrastructureLayer
@NullMarked
package com.myorg.annotation;
import org.jmolecules.architecture.layered.InfrastructureLayer;
import org.jmolecules.ddd.annotation.Module;
import org.jspecify.annotations.NullMarked;
@NullMarked
@Module("Utilities")
@InfrastructureLayer
package com.myorg.tool;
import org.jmolecules.architecture.layered.InfrastructureLayer;
import org.jmolecules.ddd.annotation.Module;
import org.jspecify.annotations.NullMarked;
package com.myorg.annotation;
class A {
}
and there are no class in com.myorg.tool
outside of the package-info.java
Then
the component diagram is incorrectly generated without any components
@startuml
set separator none
title Application
top to bottom direction
!include <C4/C4>
!include <C4/C4_Context>
SHOW_LEGEND(true)
@enduml
removing com.myorg.tool
or adding a class that depends on the annotation package will generate the diagram correctly.
Version
modulith 1.4.3 java 21
Metadata
Metadata
Assignees
Labels
in: documentation supportDocumentation generationDocumentation generation