Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
robertellam opened this issue Apr 4, 2024 · 0 comments

Comments

@robertellam
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant