2013-06-24 50 views
2

我從玩框架開始,在學習模塊時就卡住了。 兩個命令模塊列表模塊引發相同的錯誤消息(見下文)。也許我的版本需要升級,如果是這樣,請解釋一下。 任何幫助將受到歡迎。玩框架(java)list-modules got沒有一個有效的命令

#錯誤

[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版本,快照,當我打電話version命令。

#一些額外的信息

[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

我認爲你需要使用projects列出所有的模塊。

給定的模塊上運行,運行

project my_module 

下面是對文件的鏈接: http://www.playframework.com/documentation/2.0/SBTSubProjects

+0

首先,感謝您的回覆。我不明白:模塊和列表模塊命令不是以這種方式工作?我正在開發一個項目,我正在關注Play Framework Cookbook這本書,並且在這部分中,它告訴我要查找已安裝的模塊,顯然這些命令可以在項目目錄中工作。請告訴我他們是否爲你工作? –

+0

您是否在使用Play 1.x食譜?看起來這是舊的語法:http://www.playframework.com/documentation/1.2.3/modules – Mingyu

+0

Strage因爲,也netbeansify得到相同的消息,雖然你顯示的鏈接是一個強烈的跡象,我想知道:netbeansify在你的機器上運行?無論如何,我會嘗試另一本書,你推薦任何人,或其他學習方法?再次感謝! –