自動安裝(ant start.demo)太慢,所以手動安裝。
- 下載jbpm-5.2.0.Final-installer-full.zip,解壓到某個目錄,例如d:\jbpm
- 打開根目錄下的install.html,找到Manually installing the different components這一節。下面的操作均參照這節的介紹。
- Getting JBoss AS。上面那個壓縮包內已經包含了JBoss AS 7.02。進到lib下,找到jboss-as-7.0.2.Final.zip,並把它解壓到根目錄(即和lib同級)。If you already have it installed somewhere else, in install/build.properties, change the jboss.home property to the location of your JBoss AS installation.
- Getting Eclipse。修改build.properties中Eclipse的路徑,例如eclipse.home=G:/eclipse。注意是/而不是\。
-
在命令行里轉到根目錄,運行
ant install.guvnor.into.jboss
ant install.designer.into.jboss
ant install.jBPM-gwt-console.into.jboss
ant install.jBPM-eclipse.into.eclipse
ant install.drools-eclipse.into.eclipse
但通過試驗發現,后面兩條命令運行失敗。通過研究build.xml,我們需要把最后兩條命令改成一條:ant install.droolsjbpm-eclipse.into.eclipse。也可以不運行這條命令,而是手動安裝Eclipse的插件:進到lib文件夾下,把org.drools.updatesite-5.3.1.Final-assembly.zip包內的plugins和features復制到Eclipse目錄下即可。
-
啟動
ant start.h2
ant start.jboss
ant start.human.task
ant start.eclipse (當然可以自己去打開Eclipse)
測試是否啟動成功,可以用瀏覽器打開:http://localhost:8080/jbpm-console,用"krisv" / "krisv"作為帳號密碼,看能不能進去。
-
停止
ant stop.h2
ant stop.jboss
手動安裝Eclipse插件
配置Eclipse插件
-
啟動Eclipse,進入菜單Window/Preferences,此時應能看到jBpm節點,展開它:
-
把在右邊點擊Add按鈕,添加路徑d:\jbpm\lib\jbpm-5.1.0.Final-bin,命名為jbpm-5.1,如下圖:
-
在Eclipse中新建一個jbpm的項目,如下圖:
-
Run as java project,可以看到輸出hello world