`
lance4t
  • 浏览: 12347 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

使用maven创建一个简单的liftweb网站样例

阅读更多
国际惯例了,什么框架啊技术啊入门教程都是helloworld,万年不朽啊。。。
废话少说,系统装好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):

这里选择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: :

直接回车,等待maven下载依赖包,看到
引用
[INFO] BUILD SUCCESSFUL

就是成功了,这时候当前目录下面就有个一个maven管理的项目helloworld了,
下一步进入这个项目目录,启动jetty容器
引用
>cd helloworld

\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

eclipse装好插件,可以直接引入这个项目,来作为实际项目的架构模板,eclipse插件问题,另开一篇说
1
1
分享到:
评论
1 楼 leisure 2009-09-09  
不错学习了

相关推荐

Global site tag (gtag.js) - Google Analytics