diff --git a/src/main/java/dev/webfx/mavenplugin/ExportMojo.java b/src/main/java/dev/webfx/mavenplugin/ExportMojo.java index 0c9b9bb..8732fb6 100644 --- a/src/main/java/dev/webfx/mavenplugin/ExportMojo.java +++ b/src/main/java/dev/webfx/mavenplugin/ExportMojo.java @@ -148,8 +148,9 @@ private static Document exportDocument(DevWebFxModuleFile webFxModuleFile) { ReusableStream usageCoverage = projectModule.getDirectivesUsageCoverage(); // First pass: searching all the if-uses-java-package and if-java-classes directives and collecting the packages or classes that require to find the usage LOGGER.accept("Collecting usages in directives"); - Set packagesListedInDirectives = new HashSet<>(); // To be populated - Set classesListedInDirectives = new HashSet<>(); // To be populated + // We initialise the packages and classes with those always used by the WebFX CLI (hardcoded in the code) + Set packagesListedInDirectives = new HashSet<>(List.of("java.time", "java.text", "java.lang.ref", "java.util.regex", "netscape.javascript")); + Set classesListedInDirectives = new HashSet<>(List.of("java.io.EOFException", "java.util.ServiceLoader", "java.util.Properties")); usageCoverage .forEach(pm -> collectJavaPackagesAndClassesListedInDirectives(pm, packagesListedInDirectives, classesListedInDirectives)); LOGGER.accept("- packages listed in directives: " + packagesListedInDirectives);