]
Koen Aers resolved GPD-286.
---------------------------
Resolution: Out of Date
support deployment of process archives to runtime
-------------------------------------------------
Key: GPD-286
URL:
https://issues.jboss.org/browse/GPD-286
Project: jBPM GPD
Issue Type: Task
Components: jpdl
Reporter: Koen Aers
Assignee: Koen Aers
Fix For: jBPM jPDL Designer 4.x
should be based on ant targets.
for each process file, an action "Create Deploy Target" will be exposed
Create Deploy Target will create a target in an ant build file. The generated target
should look like the one below.
I think we can assume a "build.xml" in the root as the build file. If not
present, the build file should be created. If the file already exists, the target for
deployment of the new process definition should be added to the existing build file.
Maybe an macrodef can be used.
It is assumed that the processes and process classes that are to be deployed as a
business archive are part of one src directory.
The jPDL process designer plugin should leverage the ant view to allow users to activate
the build. If a user decides to create a deploy target for a process definition, then the
ant view should be made visible and the build file should be added to the list of build
files if not already present. Ideally the build file would be expanded so that the
process deploy target is immediately visible.
<?xml version="1.0" encoding="UTF-8"?>
<project name="zzz" default="deploy.zzz">
<property name="database" value="hsqldb" />
<property name="jbpm.home" value="c:/Software/jbpm-4.1-SNAPSHOT"
/>
<target name="deploy.zzz">
<!-- compile src to target/classes -->
<path id="compile.classpath">
<fileset dir="${jbpm.home}">
<include name="jbpm.jar" />
</fileset>
<fileset dir="${jbpm.home}/lib" />
</path>
<mkdir dir="target/classes" />
<javac srcdir="src"
destdir="target/classes"
classpathref="compile.classpath" />
<copy todir="target/classes">
<fileset dir="src">
<exclude name="**/*.java" />
</fileset>
</copy>
<!-- package zzz.bar business archive containing classes and processes -->
<jar destfile="target/zzz.bar">
<fileset dir="target/classes" />
</jar>
<!-- create the jbpm configuration for deployment -->
<mkdir dir="target/deploycfg" />
<copy
file="${jbpm.home}/install/src/cfg/hibernate/jdbc/${database}.hibernate.cfg.xml"
tofile="target/deploycfg/jbpm.hibernate.cfg.xml"
overwrite="true">
<filterset
filtersfile="${jbpm.home}/install/jdbc/${database}.properties" />
</copy>
<copy
file="${jbpm.home}/install/src/cfg/jbpm/standalone.testsuite.jbpm.cfg.xml"
tofile="target/deploycfg/jbpm.cfg.xml"
overwrite="true" />
<!-- define the jbpm-deploy task in the proper classpath -->
<path id="deploy.classpath">
<pathelement location="target/classes" />
<pathelement location="target/deploycfg" />
<path refid="compile.classpath" />
</path>
<taskdef name="jbpm-deploy"
classname="org.jbpm.pvm.internal.ant.JbpmDeployTask"
classpathref="deploy.classpath" />
<!-- deploy the zzz business archive -->
<jbpm-deploy file="target/zzz.bar" />
</target>
</project>