所需环境
JDK1.6+,Ant1.7+
本文实验环境
JDK1.8.0_51,Ant1.9.6
1. 解压instller-full:jbpm-6.2.0.Final-installer-full\jbpm-installer
2. 将eclipse-java-kepler-SR2-win32.zip拷贝到跟目录lib下:jbpm-6.2.0.Final-installer-full\jbpm-installer\lib——默认不存在此文件不拷贝的话后续运行时会自动下载,可以不拷贝。
3. 将mysql-connector-java-5.1.18.jar拷贝到jbpm-6.2.0.Final-installer-full\jbpm-installer\db的driver下——不拷贝会自动下载
4. jbpm-6.2.0.Final-installer-full\jbpm-installer\db\jbpm-persistence-JPA2.xml修改
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
替换为
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
5. 修改build.xml中-Dorg.kie.demo=true改为-Dorg.kie.demo=false
# default is H2
# H2.version=1.3.168
# db.name=h2
# db.driver.jar.name=${db.name}.jar
# db.driver.download.url=http://repo1.maven.org/maven2/com/h2database/h2/${H2.version}/h2-${H2.version}.jar
#mysql
db.name=mysql
db.driver.module.prefix=com/mysql
db.driver.jar.name=mysql-connector-java-5.1.18.jar
db.driver.download.url=https://repository.jboss.org/nexus/service/local/repositories/central/content/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar
7. jbpm-6.2.0.Final-installer-full\jbpm-installer\db\mysql_module.xml修改
resource-root path="mysql-connector-java.jar"/>
为
resource-root path="mysql-connector-java-5.1.18.jar"/>
8. jbpm-6.2.0.Final-installer-full\jbpm-installer\standalone-full-wildfly-8.1.0.Final.xml
8.1将下面内容
<datasource jta="true" jndi-name="java:jboss/datasources/jbpmDS" pool-name="H2DS" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:h2:tcp://localhost/~/jbpm-db;MVCC=TRUE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
</security>
</datasource>
改为
<datasource jta="true" jndi-name="java:jboss/datasources/jbpmDS" pool-name="MySQLDS" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/jbpm</connection-url>
<driver>mysql</driver>
<security>
<user-name>jbpm</user-name>
<password>jbpm</password>
</security>
</datasource>
8.2 在下面位置
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
加入
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
9. jbpm-6.2.0.Final-installer-full\jbpm-installer\standalone-wildfly-8.1.0.Final.xml
在此文件中重复8.1和8.2
10. jbpm-6.2.0.Final-installer-full\jbpm-installer\build.xml
将下面中start或stop h2的内容去掉
<!-- Start Demo -->
<target name="start.demo" depends="start.h2,start.jboss,start.eclipse" />
<!-- Start Demo (Eclipse) -->
<target name="start.demo.eclipse" depends="start.h2,start.eclipse" />
<!-- Start Demo (No Eclipse)-->
<target name="start.demo.noeclipse" depends="start.h2,start.jboss" />
<!-- Stop Demo -->
<target name="stop.demo" depends="stop.h2,stop.jboss" />
<target name="stop.demo.eclipse" depends="stop.h2" />
结果
<!-- Start Demo -->
<target name="start.demo" depends="start.jboss,start.eclipse" />
<!-- Start Demo (Eclipse) -->
<target name="start.demo.eclipse" depends="start.eclipse" />
<!-- Start Demo (No Eclipse)-->
<target name="start.demo.noeclipse" depends="start.jboss" />
<!-- Stop Demo -->
<target name="stop.demo" depends="stop.jboss" />
<target name="stop.demo.eclipse" depends="" />
11. cmd --》 cd jbpm-6.2.0.Final-installer-full\jbpm-installer
ant install.demo
12. 设置jboss_home
jbpm-6.2.0.Final-installer-full\jbpm-installer\wildfly-8.1.0.Final
13. ant start.demo
参考链接
1. jbpm6.2 installer官方地址
http://sourceforge.net/projects/jbpm/files/jBPM%206/jbpm-6.2.0.Final/
2. 官方安装说明地址
http://docs.jboss.org/jbpm/v6.2/userguide/jBPMInstaller.html
版权声明:本文为博主原创文章,未经博主允许不得转载。