JBPM ANT
脚本详解
<target name="demo.setup"
depends="install.jboss,
install.jbpm.into.jboss, start.jboss"
description="installs jboss, installs jbpm into
jboss, starts jboss, creates the jBPM DB schema, deploys examples, loads example
identities, installs and starts eclipse">
<ant antfile="${jbpm.home}/db/build.xml"
target="create.jbpm.schema" />
<ant antfile="${jbpm.home}/examples/build.xml"
target="deploy.examples" />
<ant antfile="${jbpm.home}/db/build.xml"
target="load.example.identities" />
<ant antfile="${jbpm.home}/gpd/build.xml"
target="install.eclipse" />
<ant antfile="${jbpm.home}/gpd/build.xml"
target="start.eclipse" />
</target>
|
这是
demo.setup
的脚本。很明显的看出,
demo.setup
都做了些什么。
1、
安装
jboss
2、
将
jbpm
发布到
jboss
中
3、
启动
jboss
4、
执行
jbpm
建表脚本
5、
将
examples
发布到
jboss
中
6、
创建数据库初始化数据
7、
安装
eclipse
8、
启动
eclipse
现在我们分步看一下,都是如何执行这些步骤的
一、
安装
Jboss
<target name="install.jboss"
depends="log.properties,
get.jboss"
description="unzips jboss, downloads jboss to
$jboss.distro.dir} if its not available">
<unzip src="${jboss.distro.path}"
dest="${jboss.home}/.." />
<chmod perm="a+x" file="${jboss.home}/bin/run.sh"
os="Linux, Mac OS X" />
<chmod perm="a+x"
file="${jboss.home}/bin/shutdown.sh" os="Linux, Mac OS X" />
</target>
|
1
)他首先要获取
JBOSS,
依赖于这个任务
get.jboss
<condition
property="is.jboss.distro.available">
<available file="${jboss.distro.path}"
/>
</condition>
<target name="get.jboss"
unless="is.jboss.distro.available"
description="downloads jboss into
${jboss.distro.dir}">
<mkdir dir="${jboss.distro.dir}"
/>
<get src="${jboss.distro.url}"
dest="${jboss.distro.path}" />
</target>
|
这个意思是如果已经存在了
JBOSS
,这个任务就算完成了。如果不存在,他会从网站上下载一个。
2
)任务
get.jboss
完成,会将
JBOSS
文件解压,安装
JBOSS
算是完成了。
二、
将
jbpm
发布到
jboss中
<target
name="install.jbpm.into.jboss"
depends="log.properties"
description="installs jbpm into jboss">
<antcall
target="internal.install.jbpm.into.jboss.common" />
<antcall
target="internal.install.jbpm.into.jboss.500specifics" />
<antcall
target="internal.install.jbpm.into.jboss.db.${database}" />
</target>
|
这个脚本执行了三个任务
1)internal.install.jbpm.into.jboss.common
将一些
common
文件安装到
JBOSS
中
我们详细看一下,都安装了那些文件
<target
name="internal.install.jbpm.into.jboss.common">
<!-- copy static configuration files
-->
<copy todir="${jboss.server.config.dir}"
overwrite="true">
<fileset dir="${jbpm.home}/jboss/config.common"
/>
</copy>
<!-- copy the right hibernate configuration file
-->
<copy
file="${jbpm.home}/jboss/hibernate.cfg/${database}.hibernate.cfg.xml"
tofile="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar/jbpm.hibernate.cfg.xml"
overwrite="true" />
<!-- copy the right datasource configuration file
and replace the jdbc properties with
the values in the jdbc/${database}.properties
file -->
<copy
todir="${jboss.server.config.dir}/deploy/jbpm"
overwrite="true">
<filterset
filtersfile="${jbpm.home}/db/jdbc/${database}.properties" />
<fileset
dir="${jbpm.home}/jboss/datasources">
<include
name="jbpm-${database}-ds.xml"/>
</fileset>
</copy>
<copy todir="${jboss.server.config.dir}/lib"
overwrite="true">
<fileset dir="${jbpm.home}">
<include name="jbpm.jar" />
</fileset>
<fileset
dir="${jbpm.home}/lib">
<include
name="gwt-console-server-integration.jar" />
<include name="gwt-console-rpc.jar"
/>
</fileset>
</copy>
<copy
todir="${jboss.server.config.dir}/deploy/jbpm"
overwrite="true">
<fileset
dir="${jbpm.home}/lib">
<include name="gwt-console.war"
/>
<include name="gwt-console-server.war"
/>
</fileset>
</copy>
<copy
todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar"
overwrite="true">
<fileset
dir="${jbpm.home}/lib">
<include name="jbpm-console-integration.jar"
/>
<include name="jbpm-console-form-plugin.jar"
/>
<include name="freemarker.jar"
/>
<include name="livetribe-jsr223.jar"
/>
<include name="juel*.jar" />
</fileset>
</copy>
<copy
todir="${jboss.server.config.dir}/deployers/jbpm.deployer"
overwrite="true">
<fileset
dir="${jbpm.home}/lib">
<include
name="jbpm-spi.jar"/>
</fileset>
</copy>
<mkdir dir="${jboss.home}/docs/examples/jbpm"
/>
<copy todir="${jboss.home}/docs/examples/jbpm"
overwrite="true">
<fileset dir="${jbpm.home}/jboss/datasources"
/>
</copy>
</target>
|
1
、首先将
jboss/config.common
里面所有的内容拷贝
JBOSS
服务器中的
server\default
目录下。
2
、接着将对应数据库的
hibernate
配置文件更名后放置到
Jbpm
的工程跟目录下
使用
jdbc
properties
文件的内容,配置数据的的
ds.xml
文件
,并放置到
JBOSS
,
JBPM
工程的根目录下。
3
、将
JBPM.jar
、
gwt-console-server-integration.jar
、
gwt-console-rpc.jar
放置到
server\default\lib
目录下
4
、将两个
war
包
gwt-console.war
、
gwt-console-server.war
放置到
jbpm
的根目录下
5
、将
jbpm-console-integration.jar
、
jbpm-console-form-plugin.jar
、
freemarker.jar
、
livetribe-jsr223.jar
、
juel*.jar
放置到
default\deploy\jbpm\jbpm-service.sar
目录下
6
、将
jbpm-spi.jar
放置到
\server\default\deployers\jbpm.deployer
7
、将相关文档放置到文档目录
2)internal.install.jbpm.into.jboss.500specifics
安装
JBOSS5
的特殊配置
<target
name="internal.install.jbpm.into.jboss.500specifics"
if="jboss.version.5">
<!-- copy static configuration files
-->
<copy todir="${jboss.server.config.dir}"
overwrite="true">
<fileset dir="${jbpm.home}/jboss/config.jboss5"
/>
</copy>
<copy
todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar"
overwrite="true">
<fileset
dir="${jbpm.home}/lib">
<include
name="jbpm-spi.jar"/>
</fileset>
</copy>
<copy
todir="${jboss.server.config.dir}/deployers/jbpm.deployer"
overwrite="true">
<fileset
dir="${jbpm.home}/lib">
<include
name="jbpm-jboss5.jar"/>
</fileset>
</copy>
</target>
|
1
、将
jboss5
的配置文件拷贝到
Jboss
服务起的相关目录中
2
、将
jbpm-spi.jar
拷贝到
deploy/jbpm/jbpm-service.sar
目录中
3
、将
jbpm-jboss5.jar
拷贝到
deployers/jbpm.deployer
目录中
3)internal.install.jbpm.into.jboss.db.${database}
就是将对应的
JDBC
驱动拷贝到对应目录中
至此为止,
JBPM
算是发布完成了
三、
启动
Jboss
,启动后一直让他在后台运行
<target name="start.jboss"
depends="log.properties"
description="starts jboss and waits till
jboss is booted, then lets jboss run in the background">
<taskdef name="start-jboss"
classname="org.jbpm.pvm.internal.ant.StartJBossTask">
<classpath>
<fileset dir="${jbpm.home}">
<include name="jbpm.jar" />
</fileset>
</classpath>
</taskdef>
<start-jboss jbosshome="${jboss.home}"
/>
</target>
|
执行
jbpm
建表脚本
它首先调用一个
ant
脚本
db\build.xml .
执行
create.jbpm.schema
任务。
他仅仅是通过
JBDC
使用配置文件
db/jdbc/${database}.properties
配置的信息执行
db/schema.scripts/jbpm.${database}.create.sql
文件而已
四、
将
examples
发布到
jboss
中
同样也是通过调用
ant
脚本
examples/build.xml
。执行
deploy.examples
完成此功能。只是将所有
java
文件编译一下,用
jar
打成一个
bar
文件(为什么是
bar
文件?)发布任务是用
jbpm
扩张
ant
的
Class
org.jbpm.pvm.internal.ant.JbpmDeployTask
来完成的。
五、
这一步和第四步是一样的,不过
sql
文件换成
db/example.identities.sql
。功能是向数据库中增加初始化数据。
六、
剩下的两步就不讲了,只是安装
eclipse
而已,目前还没有发现什么用处,也没有给
eclipse
装
jbpm
的插件,不知道这个是用来干什么。应该可以改进一下,变成安装
eclipse
并安装
jbpm
插件
分享到:
相关推荐
jBPM工作流详解,jBPM工作流详解 jBPM工作流详解,jBPM工作流详解 jBPM工作流详解,jBPM工作流详解
生成基于Oracle的jBPM数据库脚本 1. 下载最新版本的 JBoss jBPM Starters kit。解压这个文件,假设解压目录为 "${jbpm.starters.kit}",它的下面应该有 jbpm, jbpm-bpel,jbpm-db,jbpm-designer,jbpm-server 五...
jbpm工作流详解
JBPM案例详解 全部源代码 JBPM案例详解 全部源代码 JBPM案例详解 全部源代码 JBPM案例详解 全部源代码
jbpm数据库表详解
jbpm一些常用脚本
JBPM文档(详解),JDPM工作流在IO系统一般都会选择用工作流,大家多去了解了解
jbpm实例详解,这是一个有关jbpm的例子以及解释,详细介绍了jbpm的基础开发实现。
JBPM采购申请系统——07_JBPM中的脚本语言.7z JBPM采购申请系统——07_JBPM中的脚本语言.7z JBPM采购申请系统——07_JBPM中的脚本语言.7z JBPM采购申请系统——07_JBPM中的脚本语言.7z JBPM采购申请系统——07_JBPM...
jbpm项目数据库脚本,项目框架:SSH+extjs+jbpm 项目地址:http://www.zuidaima.com/share/1989287537953792.htm
该内容完全和本人在CSDN博客上发布的JBPM案例详解内容配套,内容真实,希望对有需要的朋友有所帮助
详细讲解了JBPM工作流的概念以及使用,可以让大家更加轻松把jbpm工作流应用到自己的项目中。
该内容完全和本人在CSDN上发布的JBPM案例详解文章内容配套,内容真实。希望对大家有帮助
该内容完全和本人在CSDN博客上发布的JBPM案例详解内容配套,内容真实,希望对有需要的朋友有所帮助
JBPM4.4 mysql数据库创建脚本,修正ant create.jbpm.schema不能创建数据库的bug。
jbpm数据库表字段详解,字段详细说明,和表关系都有,希望大家有jbpm的学习资料多多交流。
该资源完全和本人在CSDN博客上发布的JBPM案例详解内容配套,内容真实,希望对有需要的朋友有帮助
该内容完全和本人在CSDN博客上发布的JBPM案例详解内容配套,内容真实,希望对有需要的朋友有所帮助
该内容完全和本人在CSDN博客上发布的JBPM案例详解内容配套,内容真实,希望对有需要的朋友有所帮助
该内容完全和本人在CSDN博客上发布的JBPM案例详解内容配套,内容真实,希望对有需要的朋友有所帮助