【问题标题】:play framework (java) list-modules got Not a valid commandplay framework (java) list-modules got Not a valid command
【发布时间】:2013-06-24 18:41:26
【问题描述】:

我从 play framework 开始,在学习模块时卡住了。 moduleslist-modules 命令都会抛出相同的错误消息(见下文)。也许我的版本需要升级,如果是,请解释一下。 欢迎任何帮助。

#错误

    [Cesars-Computer: email-server-play] $ play modules
    [info] Loading project definition from /path-to-play-app/email-server-play/project
    [info] Set current project to email-server-play (in build file:/path-to-play-app/email-server-play/)
    [error] Not a valid command: modules
    [error] Expected '/'
    [error] Expected ':'
    [error] Not a valid key: modules (similar: ivy-module, module-name, module-settings)
    [error] modules
    [error]        ^

    [Cesars-Computer: email-server-play] $ play list-modules
    [info] Loading project definition from /path-to-play-app/email-server-play/project
    [info] Set current project to email-server-play (in build file:/path-to-play-app/email-server-play/)
    [error] Not a valid command: list-modules
    [error] Expected '/'
    [error] Expected ':'
    [error] Not a valid key: list-modules (similar: ivy-module, classifiers-module)
    [error] list-modules
    [error]             ^

Play console 运行版本是 2.1.1.,但是当我调用 version 命令时,奇怪地显示版本 1.0-SNAPSHOT。

#一些附加信息

    [Cesars-Computer: email-server-play] $ play
    [info] Loading project definition from /path-to-play-app/email-server-play/project
    [info] Set current project to email-server-play (in build file:/path-to-play-app/email-server-play/)
           _            _
     _ __ | | __ _ _  _| |
    | '_ \| |/ _' | || |_|
    |  __/|_|\____|\__ (_)
    |_|            |__/

    play! 2.1.1 (using Java 1.7.0_11 and Scala 2.10.0), http://www.playframework.org

    > Type "help play" or "license" for more information.
    > Type "exit" or use Ctrl+D to leave this console.


    [email-server-play] $ version
    [info] 1.0-SNAPSHOT 

【问题讨论】:

    标签: java playframework playframework-2.1


    【解决方案1】:

    我认为您需要使用projects 列出所有模块。

    要处理给定的模块,请运行

    project my_module
    

    这是文档的链接: http://www.playframework.com/documentation/2.0/SBTSubProjects

    【讨论】:

    • 首先感谢您的回复。我不明白:模块和列表模块命令不应该以这种方式工作吗?我正在研究一个项目,我正在关注 Play Framework Cookbook 这本书,在这一部分,它告诉我寻找已安装的模块,显然这些命令应该在项目目录中工作。请告诉我他们是否为你工作?
    • 您使用的是 Play 1.x Cookbook 吗?这似乎是旧语法:playframework.com/documentation/1.2.3/modules
    • Strage 因为,netbeansify 也收到了相同的消息,虽然你显示的链接是一个强烈的指示,但我想知道:netbeansify 在你的机器上运行?无论如何,我会尝试另一本书,您是否推荐任何人,或其他学习方法?再次感谢!
    • 我还有 Play Framework Cookbook。在Downloading and installing the Play framework 部分下,它显示at the time of writing this recpe play 1.2 was the latest stable version。我推荐的书是Manning: Play for Java。您可以在 Play 官网找到这本书:playframework.com/documentation/2.1.1/Home
    • 我使用了 Eclipse。 Play 1.x 使用命令play eclipsify,新的Play 2.x 使用命令play eclipse
    猜你喜欢
    • 1970-01-01
    • 2019-04-08
    • 2018-03-29
    • 1970-01-01
    • 2019-07-07
    • 1970-01-01
    • 2013-03-02
    • 2017-04-01
    • 2019-01-08
    相关资源
    最近更新 更多