Activiti+ant安装和配置

前提:JBK、Tomcat和Eclispe已经安装好
ANT安装

1、下载ant,并解压到C:\apache-ant-1.8.2 
   http://ant.apache.org/bindownload.cgi

2、配置环境变量  
  •   ANT_HOME:C:\apache-ant-1.8.2 (这里为你自己解压缩的目录)
  •   PATH:%ANT_HOME%\bin(这个设置是为了方便在dos环境下操作)

3、检测是否安装成功



Activiti安装

1、下载activiti-5.5.zip,并解压到D:\activiti-5.5  
   http://www.activiti.org/download.html

2、运行脚本,设置 Activiti 环境
  •   打开DOS窗口,cd到setup目录。
  • 输入 ant demo.start,然后按 enter 键。
  • 脚本完成后,会在浏览器内启动所有的 Activiti 的 web 应用。以 kermit/kermit 登陆。

Activiti+ant安装和配置_第1张图片

引用
注意:在执行ant demo.start时,如果更换数据库,比如mysql(默认是H2),需要更新如下文件

1.build.properties
 
# The db property should refer to the type of database that 
# you want to use. Currently h2, MySQL(mysql),
# Postgres SQL(postgres) and Oracle 10g (oracle) is supported.
#
# SQL Server(mssql) is also supported, but is an EXPERIMENTAL feature.
# IBM DB2(db2) is also supported, but is an EXPERIMENTAL feature.
#
# When using oracle, follow the instructions described in the userguide, chapter
# Configuration > Changing the database > Using Oracle in the demo setup
db=mysql

# The tx property refers to the transaction environment
# you want to use.  Choose from {standalone}
tx=standalone

# Specify the version of Tomcat that you want to use.
# We only tested with the given Tomcat version but in 
# theory any tomcat 6.0.x version should do fine.
tomcat.version=6.0.32

# If you have tomcat already downloaded, point the 
# downloads.dir property to that directly.  If tomcat is 
# not found in the downloads.dir, it will be automatically 
# downloaded there.
# The downloads directory should be outside of /target/
# to avoid re-downloading after a clean
downloads.dir=../../downloads

# Remove this property or set it to disabled if you're not using Activiti Cycle
feature.cycle=enabled

# Remove this property or set it to disabled if you're not using Activiti Modeler
feature.modeler=enabled

  修改数据库类型为mysql
  打开文件“setup\build.properties”修改db=mysql(默认为h2)

2、build.mysql.properties
db=mysql
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://IP地址:3306/activiti?autoReconnect=true
jdbc.username=所用数据库的用户名
jdbc.password=所用数据库的密码


遇见问题

1、执行“ant demo.start”之前,需要创建数据库,否则会出现下边的问题:
Activiti+ant安装和配置_第2张图片

2、执行“ant demo.start”完毕之后,自带的web应用访问不了,如下图:
Activiti+ant安装和配置_第3张图片

原因:activiti-modeler-5.5.war不会自动发布,导致访问不了

你可能感兴趣的:(Activiti)