playframework / play1

Play framework
https://www.playframework.com/documentation/1.4.x/home
Other
1.58k stars 683 forks source link

Play Framework Module Configuration Issue: Detection of Plugins Absent in addModule Method #1486

Open robertellam opened 3 months ago

robertellam commented 3 months ago

I'm currently encountering an issue with Play not recognizing a plugin within one of my modules. It seems that Play only detects the plugin if I place my play.plugins file directly in the module, under the app directory.

Upon examining the addModule method in Play.java, I noticed that there's no provision for handling the module's configuration directory (conf). This absence raises questions about the inclusion of the conf directory for modules.

Code Snippet:

public static void addModule(VirtualFile appRoot, String name, File path) {
    VirtualFile root = VirtualFile.open(path);
    modules.put(name, root);
    if (root.child("app").exists()) {
        javaPath.add(root.child("app"));
    }
    if (root.child("app/views").exists() || (usePrecompiled
            && appRoot.child("precompiled/templates/from_module_" + name + "/app/views").exists())) {
        templatesPath.add(root.child("app/views"));
    }
    // Missing handling for the 'conf' directory
    roots.add(root);
    if (!name.startsWith("_")) {
        Logger.info("Module %s is available (%s)", name, path.getAbsolutePath());
    }
}

Issue: The absence of inclusion of the module's conf directory in the addModule method raises questions about its intended handling. Specifically, I'm curious why the conf directory for modules isn't considered within this method. Is there a particular reason for this?

Expected Clarification: Could someone shed light on why the module's conf directory is excluded from the addModule method? This omission has prompted inquiries, especially regarding the detection and usage of certain module configurations, such as the play.plugins file. Could anyone assist me in understanding how I should properly utilize the play.plugins file within a module?