關鍵字: maven helloworld scala liftweb
國際慣例了,什麼框架啊技術啊入門教程都是helloworld,萬年不朽啊。。。
廢話少說,系統裝好maven2,連上互聯網,命令行進入到想要創建項目代碼的目錄
使用maven2的archetype插件命令:
出現選項
這裏選擇2,然後輸入自定義的POM信息
直接回車,等待maven下載依賴包,看到
就是成功了,這時候當前目錄下面就有個一個maven管理的項目helloworld了,
下一步進入這個項目目錄,啓動jetty容器
jetty啓動成功後,打開瀏覽器訪問
大功告成!
廢話少說,系統裝好maven2,連上互聯網,命令行進入到想要創建項目代碼的目錄
使用maven2的archetype插件命令:
引用
mvn archetype:generate -DarchetypeCatalog="http://scala-tools.org/"
出現選項
引用
Choose archetype:
1: http://scala-tools.org/ -> scala-archetype-simple (A simple scala project)
2: http://scala-tools.org/ -> lift-archetype-blank (A blank/empty liftweb project)
3: http://scala-tools.org/ -> lift-archetype-basic (A basic liftweb project (with DB, css, ...))
Choose a number: (1/2/3):
1: http://scala-tools.org/ -> scala-archetype-simple (A simple scala project)
2: http://scala-tools.org/ -> lift-archetype-blank (A blank/empty liftweb project)
3: http://scala-tools.org/ -> lift-archetype-basic (A basic liftweb project (with DB, css, ...))
Choose a number: (1/2/3):
這裏選擇2,然後輸入自定義的POM信息
引用
Choose a number: (1/2/3): 2
Define value for groupId: : net.liftweb
Define value for artifactId: : helloworld
Define value for version: 1.0-SNAPSHOT: :
Define value for package: net.liftweb: :
Confirm properties configuration:
groupId: net.liftweb
artifactId: helloworld
version: 1.0-SNAPSHOT
package: net.liftweb
Y: :
Define value for groupId: : net.liftweb
Define value for artifactId: : helloworld
Define value for version: 1.0-SNAPSHOT: :
Define value for package: net.liftweb: :
Confirm properties configuration:
groupId: net.liftweb
artifactId: helloworld
version: 1.0-SNAPSHOT
package: net.liftweb
Y: :
直接回車,等待maven下載依賴包,看到
引用
[INFO] BUILD SUCCESSFUL
就是成功了,這時候當前目錄下面就有個一個maven管理的項目helloworld了,
下一步進入這個項目目錄,啓動jetty容器
引用
>cd helloworld
\helloworld>mvn jetty:run
\helloworld>mvn jetty:run
jetty啓動成功後,打開瀏覽器訪問
引用
http://localhost:8080/
大功告成!
引用
Welcome to your project!
Welcome to helloworld at Mon Aug 10 02:11:10 CST 2009
* Home
Welcome to helloworld at Mon Aug 10 02:11:10 CST 2009
* Home