@@ -76,6 +76,9 @@ public class Documenter {
7676 private static final String INVALID_FILE_NAME_PATTERN = "Configured file name pattern does not include a '%s' placeholder for the module name!" ;
7777 private static final String DEFAULT_LOCATION = "spring-modulith-docs" ;
7878
79+ private static final String DEFAULT_COMPONENTS_FILE = "components.puml" ;
80+ private static final String DEFAULT_MODULE_COMPONENTS_FILE = "module-%s.puml" ;
81+
7982 static {
8083 DEPENDENCY_DESCRIPTIONS .put (DependencyType .EVENT_LISTENER , "listens to" );
8184 DEPENDENCY_DESCRIPTIONS .put (DependencyType .DEFAULT , "depends on" );
@@ -203,7 +206,7 @@ public Documenter writeModulesAsPlantUml(DiagramOptions options) {
203206
204207 Assert .notNull (options , "Options must not be null!" );
205208
206- Path file = recreateFile (options .getTargetFileName ().orElse ("components.uml" ));
209+ Path file = recreateFile (options .getTargetFileName ().orElse (DEFAULT_COMPONENTS_FILE ));
207210
208211 try (Writer writer = new FileWriter (file .toFile ())) {
209212 writer .write (createPlantUml (options ));
@@ -264,7 +267,7 @@ public Documenter writeModuleAsPlantUml(ApplicationModule module, DiagramOptions
264267
265268 addComponentsToView (module , view , options );
266269
267- var fileNamePattern = options .getTargetFileName ().orElse ("module-%s.uml" );
270+ var fileNamePattern = options .getTargetFileName ().orElse (DEFAULT_MODULE_COMPONENTS_FILE );
268271
269272 Assert .isTrue (fileNamePattern .contains ("%s" ), () -> String .format (INVALID_FILE_NAME_PATTERN , fileNamePattern ));
270273
0 commit comments