play framework(java)list-modules got not a valid命令

时间:2013-06-24 18:41:26

标签: java playframework playframework-2.1

我从Play框架开始,在学习模块时遇到困难。 命令 modules list-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]             ^

播放控制台运行版本为2.1.1。但奇怪的是显示版本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 

1 个答案:

答案 0 :(得分:1)

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

要处理给定模块,请运行

project my_module

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