1。适用于Appfuse1.7/1.8.*(Struts+Spring+Hibernate) 需要用到的东西
JDK1.4.2_05,
ANT1.6.2,
Mysql4.1,
Tomcat5.0.28
拷贝appfuse lib/junit3.8.1/junit.jar 到 %ANT_HOME%/lib.
---------------------------------------------------------------------------
2.设置环境变量
ANT_HOME,
JAVA_HOME,
CATALINA_HOME,
MYSQL_HOME
Path中加入
%JAVA_HOME%bin;%ANT_HOME%bin;%CATALINA_HOME%bin;%MYSQL_HOME%bin;
---------------------------------------------------------------------------
3.运行Ant建立临时发布环境
先启动Mysql,建立数据库AppFuse
ant new -Dapp.name=YourAppName -Ddb.name=YourAppName
(我是用AppFuse 那么我的命令就是ant new -Dapp.name=AppFuse -Ddb.name=AppFuse)
YourAppName指你要建立的临时appfuse目录,与当前appfuse同级或可以设置路径
AppFuse也是我Mysql的数据库名,并且root用户的密码为空。
如果需要改变数据库可以修改build.properties文件中这部分的参数:
#database.jar=${postgresql.jar}
#database.type=postgresql
#database.name=myApp
#database.host=localhost
#database URL for creating other databases (doesn't work with pgsql)
#database.admin.url=jdbc:${database.type}://${database.host}/template1
#database.admin.username=postgres
#database.admin.password=postgres
#hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect