`
tylzhuang
  • 浏览: 54406 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

turbine2.3.2 源码编译和搭建web开发框架

阅读更多
1、 从 http://jakarta.apache.org/turbine/download.html 下载 turbine-2.3.2-src.tar.gz
2、 解压,进入turbine源码路径执行:
maven -g 获得所有必须的jar包
3、 安装编译turbine的插件
maven -DartifactId=maven-turbine-plugin -DgroupId=turbine -Dversion=1.3 plugin:download

4、 编译turbine源码,并打包执行:
maven
源码路径:  turbine-2.3.2\src\java
5、 在 C:\Documents and Settings\Administrator\.maven\cache\maven-turbine-plugin-1.3\plugin.properties 文件中增加tomcat安装路径:
maven.appserver.home = D:\tomcat-5.5.17
6、 进入turbine源码路径,创建新的web应用框架:
   maven -Dturbine.app.name=demoweb turbine:setup
7、 进入新产生的应用根目录,找到并修改setup.properties文件的以下部分:
torque.database =            mysql
#torque.database.driver =   org.gjt.mm.mysql.Driver 
torque.database.driver =   com.mysql.jdbc.Driver
torque.database.user = root
torque.database.password = root
torque.database.buildUrl = jdbc:mysql://localhost:3306/demoweb
#使用已经存在的数据库建立连接
torque.database.createUrl = jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8
   说明:该步骤在turbine-2.3.2根目录创建一个新的目录demoweb ,并拷贝基础文件
8、根据默认的schema生成建表脚本和om对象:
maven turbine:sql

9、建立应用的数据库,如果是正在使用的系统不能操作该步骤,防止将已经存在的数据库删除:
maven torque:create-db

10、执行sql建立表
maven torque:insert-sql

11、将应用发布到容器中:
maven turbine:deploy

12、访问 http://localhost:8080/demoweb ,可以看到turbine欢迎页面

说明:
1)步骤 9和10可以省略,可以直接使用 8 产生的sql脚本自己创建数据库和相关表,以及初始化数据
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics