[jbpm-commits] JBoss JBPM SVN: r6293 - in jbpm4/trunk: modules/pvm/src/main/java/org/jbpm/pvm/internal/ant and 3 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue May 4 00:20:26 EDT 2010
Author: alex.guizar at jboss.com
Date: 2010-05-04 00:20:24 -0400 (Tue, 04 May 2010)
New Revision: 6293
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java
jbpm4/trunk/modules/test-cactus/pom.xml
jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties
jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
Log:
pass jboss bind address to test-cactus module
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 02:05:34 UTC (rev 6292)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 04:20:24 UTC (rev 6293)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jbpm.install">
-
+
<!-- DEVELOPER SPECIFIC CONFIGURATIONS -->
<property file="${user.home}/.jbpm4/build.properties" />
@@ -25,40 +25,46 @@
<property name="jdbc.properties.dir" value="${jbpm.home}/install/jdbc" />
<property file="${jdbc.properties.dir}/${database}.properties" />
-
- <property name="examples.file" value="${jbpm.home}/examples/target/examples.jar"/>
-
+
+ <property name="examples.file" value="${jbpm.home}/examples/target/examples.jar" />
+
<property name="tomcat.version" value="6.0.20" />
<property name="tomcat.parent.dir" value="${jbpm.home}" />
<property name="tomcat.home" value="${tomcat.parent.dir}/apache-tomcat-${tomcat.version}" />
<property name="tomcat.filename" value="apache-tomcat-${tomcat.version}.zip" />
<property name="tomcat.distro.dir" value="downloads" />
- <property name="tomcat.distro.url" value="http://www.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/${tomcat.filename}" />
+ <property name="tomcat.distro.url"
+ value="http://www.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/${tomcat.filename}" />
<property name="tomcat.distro.path" value="${tomcat.distro.dir}/${tomcat.filename}" />
<property name="tomcat.lib.dir" value="${tomcat.home}/lib" />
<property name="tomcat.webapps.dir" value="${tomcat.home}/webapps" />
-
- <property name="hsqldb.server.install.dir" value="${jbpm.home}/hsqldb-server"/>
+
+ <property name="hsqldb.server.install.dir" value="${jbpm.home}/hsqldb-server" />
<property name="hsqldb.server.source.dir" value="${jbpm.home}/install/src/hsqldb-server" />
<property name="jboss.version" value="5.0.0.GA" />
<property name="jboss.parent.dir" value="${jbpm.home}" />
<property name="jboss.home" value="${jboss.parent.dir}/jboss-${jboss.version}" />
+ <property name="jboss.bind.address" value="localhost" />
<property name="jboss.filename" value="jboss-${jboss.version}.zip" />
<property name="jboss.distro.dir" value="downloads" />
- <property name="jboss.distro.url" value="http://downloads.sourceforge.net/jboss/${jboss.filename}" />
+ <property name="jboss.distro.url"
+ value="http://downloads.sourceforge.net/jboss/${jboss.filename}" />
<property name="jboss.distro.path" value="${jboss.distro.dir}/${jboss.filename}" />
<property name="jboss.server.configuration" value="default" />
- <property name="jboss.server.config.dir" value="${jboss.home}/server/${jboss.server.configuration}" />
- <property name="jboss.server.data.dir" value="${jboss.home}/server/${jboss.server.configuration}/data" />
- <property name="jboss.server.deploy.dir" value="${jboss.home}/server/${jboss.server.configuration}/deploy" />
+ <property name="jboss.server.config.dir"
+ value="${jboss.home}/server/${jboss.server.configuration}" />
+ <property name="jboss.server.data.dir"
+ value="${jboss.home}/server/${jboss.server.configuration}/data" />
+ <property name="jboss.server.deploy.dir"
+ value="${jboss.home}/server/${jboss.server.configuration}/deploy" />
<property name="signavio.war.file.name" value="jbpmeditor.war" />
<property name="signavio.src.dir" value="${jbpm.home}/install/src/signavio" />
- <property name="signavio.tmp.dir" value="${jbpm.home}/install/generated/signavio-war" />
+ <property name="signavio.tmp.dir" value="${jbpm.home}/install/generated/signavio-war" />
<property name="signavio.repo.dir.name" value="signavio-repository" />
-
- <!-- GENERAL CONDITIONS -->
+
+ <!-- GENERAL CONDITIONS -->
<condition property="is.jboss.distro.available">
<available file="${jboss.distro.path}" />
</condition>
@@ -75,27 +81,27 @@
<condition property="is.hsqldb">
<equals arg1="${database}" arg2="hsqldb" />
</condition>
-
+
<!-- OS CONDITIONS -->
<condition property="is.windows">
- <os family="windows"/>
+ <os family="windows" />
</condition>
<condition property="is.not.windows">
<not>
<isset property="is.windows" />
</not>
</condition>
-
- <condition property="is.mac">
- <os family="mac" />
- </condition>
+ <condition property="is.mac">
+ <os family="mac" />
+ </condition>
+
<condition property="is.jboss.500">
- <equals arg1="${jboss.version}" arg2="5.0.0.GA"/>
+ <equals arg1="${jboss.version}" arg2="5.0.0.GA" />
</condition>
<condition property="is.jboss.510">
- <equals arg1="${jboss.version}" arg2="5.1.0.GA"/>
+ <equals arg1="${jboss.version}" arg2="5.1.0.GA" />
</condition>
<!-- ECLIPSE RELATED CONDITIONS -->
@@ -126,7 +132,7 @@
</condition>
<condition property="eclipse.tarfilename" value="eclipse-jee-galileo-linux-gtk-x86_64.tar">
<and>
- <contains string="${os.name}" casesensitive="false" substring="linux" />
+ <contains string="${os.name}" casesensitive="false" substring="linux" />
<contains string="${os.arch}" casesensitive="false" substring="64" />
</and>
</condition>
@@ -136,14 +142,15 @@
<contains string="${os.arch}" casesensitive="false" substring="64" />
</and>
</condition>
- <property name="eclipse.distro.url" value="http://mirror.cc.vt.edu/pub/eclipse/technology/epp/downloads/release/galileo/R/${eclipse.filename}" />
- <property name="eclipse.distro.dir" value="downloads" />
+ <property name="eclipse.distro.url"
+ value="http://mirror.cc.vt.edu/pub/eclipse/technology/epp/downloads/release/galileo/R/${eclipse.filename}" />
+ <property name="eclipse.distro.dir" value="downloads" />
<property name="eclipse.parent.dir" value="${jbpm.home}" />
<property name="eclipse.distro.path" value="${eclipse.distro.dir}/${eclipse.filename}" />
<!-- ### DEMO SETUP JBOSS ##################################################### -->
- <target name="demo.setup.jboss"
- depends="install.jboss, install.jbpm.into.jboss"
+ <target name="demo.setup.jboss"
+ depends="install.jboss, install.jbpm.into.jboss"
description="installs jboss, installs jbpm into jboss, starts jboss, creates the jBPM DB schema, deploys examples, loads example identities, installs and starts eclipse">
<antcall target="internal.enable.jboss.debug.jboss500" />
<antcall target="internal.enable.jboss.debug.jboss510" />
@@ -158,56 +165,56 @@
</target>
<!-- ### DEMO TEARDOWN JBOSS ##################################################### -->
- <target name="demo.teardown.jboss"
- description="drops the jbpm db schema and stops jboss">
+ <target name="demo.teardown.jboss" description="drops the jbpm db schema and stops jboss">
<ant antfile="${jbpm.home}/db/build.xml" target="drop.jbpm.schema" />
<antcall target="stop.jboss" />
</target>
-
+
<!-- ### CLEAN CONFIGURATION DIR ########################################### -->
<target name="clean.cfg.dir" description="Deletes the ${cfg.dest.dir}">
<delete dir="${cfg.dest.dir}" />
</target>
-
+
<!-- ### CREATE CONFIGURATION ########################################### -->
<target name="create.cfg" description="Creates a configuration in ${cfg.dest.dir}">
<mkdir dir="${cfg.dest.dir}" />
- <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
+ <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
file="${install.src.dir}/cfg/jbpm/${tx}.jbpm.cfg.xml"
overwrite="true" />
- <copy tofile="${cfg.dest.dir}/jbpm.hibernate.cfg.xml"
+ <copy tofile="${cfg.dest.dir}/jbpm.hibernate.cfg.xml"
file="${install.src.dir}/cfg/hibernate/${hibernate.connection.type}/${database}.hibernate.cfg.xml"
overwrite="true">
<filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
</copy>
- <copy todir="${cfg.dest.dir}"
- overwrite="true">
+ <copy todir="${cfg.dest.dir}" overwrite="true">
<fileset dir="${install.src.dir}/cfg/logging/${logging}" />
</copy>
- <copy tofile="${cfg.dest.dir}/jbpm.mail.properties"
- file="${install.src.dir}/cfg/mail/jbpm.mail.${mail.cfg}.properties"
+ <copy tofile="${cfg.dest.dir}/jbpm.mail.properties"
+ file="${install.src.dir}/cfg/mail/jbpm.mail.${mail.cfg}.properties"
overwrite="true">
<filterset>
<filter token="mail.smtp.host" value="${mail.smtp.host}" />
</filterset>
</copy>
-
- <!-- If the target environment uses Spring, also copy the applicationContext.xml file-->
- <condition property="is.spring.environment">
- <or>
- <equals arg1="${tx}" arg2="spring" />
- <equals arg1="${tx}" arg2="spring.testsuite" />
- </or>
- </condition>
- <antcall target="internal.copy.spring.applicationContext" />
-
+
+ <!-- If the target environment uses Spring, also copy the applicationContext.xml file-->
+ <condition property="is.spring.environment">
+ <or>
+ <equals arg1="${tx}" arg2="spring" />
+ <equals arg1="${tx}" arg2="spring.testsuite" />
+ </or>
+ </condition>
+ <antcall target="internal.copy.spring.applicationContext" />
+
</target>
-
- <target name="internal.copy.spring.applicationContext" if="is.spring.environment">
- <copy todir="${cfg.dest.dir}" overwrite="true" file="${install.src.dir}/cfg/spring/applicationContext.xml">
+
+ <target name="internal.copy.spring.applicationContext" if="is.spring.environment">
+ <copy todir="${cfg.dest.dir}"
+ overwrite="true"
+ file="${install.src.dir}/cfg/spring/applicationContext.xml">
<filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
</copy>
- </target>
+ </target>
<!-- ### CREATE USER WEBAPP ########################################## -->
<target name="create.user.webapp"
@@ -217,7 +224,7 @@
<mkdir dir="${jbpm.home}/install/generated/user-webapp/WEB-INF/classes" />
<mkdir dir="${jbpm.home}/install/generated/user-webapp/WEB-INF/lib" />
<copy todir="${jbpm.home}/install/generated/user-webapp">
- <fileset dir="${install.src.dir}/user-webapp"/>
+ <fileset dir="${install.src.dir}/user-webapp" />
</copy>
<copy todir="${jbpm.home}/install/generated/user-webapp/WEB-INF/classes">
<fileset dir="${cfg.dest.dir}">
@@ -253,51 +260,50 @@
<include name="slf4j-jdk14.jar" />
</fileset>
</copy>
-
+
<!-- copy database driver -->
- <property name="database.driver.destination.dir" value="${jbpm.home}/install/generated/user-webapp/WEB-INF/lib" />
+ <property name="database.driver.destination.dir"
+ value="${jbpm.home}/install/generated/user-webapp/WEB-INF/lib" />
<property name="is.tomcat" value="true" />
<antcall target="internal.copy.database.driver" />
</target>
<!-- ### REINSTALL JBOSS ################################################ -->
- <target name="reinstall.jboss"
- depends="delete.jboss, install.jboss"
+ <target name="reinstall.jboss"
+ depends="delete.jboss, install.jboss"
description="Deletes the previous jboss installation and re-installs jboss" />
- <target name="reinstall.jboss.and.jbpm"
- depends="delete.jboss, install.jboss, install.jbpm.into.jboss"
+ <target name="reinstall.jboss.and.jbpm"
+ depends="delete.jboss, install.jboss, install.jbpm.into.jboss"
description="Deletes the previous jboss installation and re-installs jboss and installs jbpm in it" />
<!-- ### DELETE JBOSS ################################################### -->
- <target name="delete.jboss"
- description="Deletes jboss installation">
+ <target name="delete.jboss" description="Deletes jboss installation">
<delete dir="${jboss.home}" />
</target>
<!-- ### INSTALL JBOSS ################################################## -->
- <target name="install.jboss"
+ <target name="install.jboss"
depends="get.jboss"
description="Downloads jboss to ${jboss.distro.dir} if its not available and then unzips jboss">
<unzip src="${jboss.distro.path}" dest="${jboss.parent.dir}" />
<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>
-
+
<!-- ### GET JBOSS ###################################################### -->
- <target name="get.jboss"
+ <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>
-
+
<!-- ### INSTALL JBPM INTO JBOSS ######################### -->
- <target name="install.jbpm.into.jboss"
- description="Installs jBPM into JBoss">
+ <target name="install.jbpm.into.jboss" description="Installs jBPM into JBoss">
<!-- copy static configuration files -->
<copy todir="${jboss.server.config.dir}" overwrite="true">
- <fileset dir="${jbpm.home}/install/src/jboss/config" />
+ <fileset dir="${jbpm.home}/install/src/jboss/config" />
</copy>
<!-- copy the right hibernate configuration file -->
@@ -310,21 +316,21 @@
<copy todir="${jboss.server.config.dir}/deploy/jbpm" overwrite="true">
<filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
<fileset dir="${jbpm.home}/install/src/jboss/datasources">
- <include name="jbpm-${database}-ds.xml"/>
+ <include name="jbpm-${database}-ds.xml" />
</fileset>
</copy>
- <!-- unzip console.war -->
- <mkdir dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war"/>
+ <!-- unzip console.war -->
+ <mkdir dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war" />
<unzip src="${jbpm.home}/lib/gwt-console-jbpm.war"
- dest="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war"/>
+ dest="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war" />
<copy todir="${jboss.server.config.dir}/deploy/jbpm" overwrite="true">
- <fileset dir="${jbpm.home}/lib">
+ <fileset dir="${jbpm.home}/lib">
<include name="gwt-console-server-jbpm.war" />
</fileset>
</copy>
-
+
<copy todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" overwrite="true">
<fileset dir="${jbpm.home}">
<include name="jbpm.jar" />
@@ -343,7 +349,7 @@
<include name="jbpm-jboss.jar" />
<include name="jbpm-console-integration.jar" />
<include name="jbpm-console-form-plugin.jar" />
- <include name="jbpm-console-graphView-plugin.jar"/>
+ <include name="jbpm-console-graphView-plugin.jar" />
<include name="joda-time.jar" />
<include name="juel*.jar" />
<include name="livetribe-jsr223.jar" />
@@ -351,19 +357,19 @@
</fileset>
</copy>
- <!-- move console libs -->
- <move todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" verbose="true">
- <fileset dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war/WEB-INF/lib">
- <include name="*.jar"/>
- </fileset>
- </move>
+ <!-- move console libs -->
+ <move todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" verbose="true">
+ <fileset dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war/WEB-INF/lib">
+ <include name="*.jar" />
+ </fileset>
+ </move>
- <!-- move errai config -->
- <move todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" verbose="true">
- <fileset dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war/WEB-INF/classes">
- <include name="ErraiService.properties"/>
- </fileset>
- </move>
+ <!-- move errai config -->
+ <move todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" verbose="true">
+ <fileset dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war/WEB-INF/classes">
+ <include name="ErraiService.properties" />
+ </fileset>
+ </move>
<copy todir="${jboss.home}/common/lib" overwrite="true">
<fileset dir="${jbpm.home}/lib">
@@ -377,89 +383,93 @@
</copy>
<!-- reporting -->
- <property name="birt.dir" value="${jboss.server.data.dir}/birt"/>
- <mkdir dir="${birt.dir}"/>
- <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}"/>
- <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}"/>
+ <property name="birt.dir" value="${jboss.server.data.dir}/birt" />
+ <mkdir dir="${birt.dir}" />
+ <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}" />
+ <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}" />
- <property name="database.driver.destination.dir" value="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" />
+ <property name="database.driver.destination.dir"
+ value="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" />
<antcall target="internal.copy.database.driver" />
-
- <!-- Signavio -->
- <antcall target="install.signavio.into.jboss" />
+
+ <!-- Signavio -->
+ <antcall target="install.signavio.into.jboss" />
</target>
-
- <!-- ### INSTALL EXAMPLES INTO JBOSS ################################################ -->
+
+ <!-- ### INSTALL EXAMPLES INTO JBOSS ################################################ -->
<target name="install.examples.into.jboss">
- <ant antfile="${jbpm.home}/examples/build.xml" target="create.and.deploy.examples" />
- <mkdir dir="${jboss.server.config.dir}/deploy/jbpm/userlibs" />
- <copy file="${examples.file}"
- todir="${jboss.server.config.dir}/deploy/jbpm/userlibs"
- overwrite="true" />
+ <ant antfile="${jbpm.home}/examples/build.xml" target="create.and.deploy.examples" />
+ <mkdir dir="${jboss.server.config.dir}/deploy/jbpm/userlibs" />
+ <copy file="${examples.file}"
+ todir="${jboss.server.config.dir}/deploy/jbpm/userlibs"
+ overwrite="true" />
</target>
<!-- ### START JBOSS ################################################### -->
- <target name="start.jboss"
+ <target name="start.jboss"
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}" />
+ <exec executable="${jboss.home}/bin/run.bat"
+ os="Windows Vista, Windows XP,Windows 2000,Windows 98">
+ <arg value="-c" />
+ <arg value="${jboss.bind.address}" />
+ </exec>
+ <exec executable="${jboss.home}/bin/run.sh" os="Linux, Unix, Mac">
+ <arg value="-c" />
+ <arg value="${jboss.bind.address}" />
+ </exec>
+ <waitfor maxwait="5" maxwaitunit="minute" checkevery="30" checkeveryunit="second">
+ <socket server="${jboss.bind.address}" port="8080" />
+ </waitfor>
</target>
<!-- ### STOP JBOSS ################################################### -->
- <target name="stop.jboss"
+ <target name="stop.jboss"
description="signals jboss to stop, but doesn't wait till its finished">
- <exec executable="${jboss.home}/bin/shutdown.bat" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
- <arg line="-S"/>
+ <exec executable="${jboss.home}/bin/shutdown.bat"
+ os="Windows Vista, Windows XP,Windows 2000,Windows 98">
+ <arg line="-S" />
</exec>
<exec executable="${jboss.home}/bin/shutdown.sh" os="Linux, Unix, Mac">
- <arg line="-S"/>
+ <arg line="-S" />
</exec>
</target>
-
- <!-- ### DEMO SETUP TOMCAT ################################################ -->
- <target name="demo.setup.tomcat"
+
+ <!-- ### DEMO SETUP TOMCAT ################################################ -->
+ <target name="demo.setup.tomcat"
depends="delete.tomcat, install.tomcat, install.jbpm.into.tomcat"
description="installs tomcat, installs jbpm into tomcat, starts tomcat, creates the jBPM DB schema, deploys examples, loads example identities, installs and starts eclipse">
- <antcall target="install.hsqldb.server" />
- <antcall target="start.hsqldb.server" />
- <antcall target="create.jbpm.schema" />
- <antcall target="install.examples.into.tomcat" />
- <antcall target="load.example.identities" />
- <antcall target="start.tomcat" />
- <antcall target="install.eclipse" />
- <antcall target="start.eclipse" />
- </target>
+ <antcall target="install.hsqldb.server" />
+ <antcall target="start.hsqldb.server" />
+ <antcall target="create.jbpm.schema" />
+ <antcall target="install.examples.into.tomcat" />
+ <antcall target="load.example.identities" />
+ <antcall target="start.tomcat" />
+ <antcall target="install.eclipse" />
+ <antcall target="start.eclipse" />
+ </target>
- <!-- ### DEMO TEARDOWN TOMCAT ################################################ -->
- <target name="demo.teardown.tomcat"
+ <!-- ### DEMO TEARDOWN TOMCAT ################################################ -->
+ <target name="demo.teardown.tomcat"
depends="stop.tomcat, stop.hsqldb.server"
description="stops tomcat and then the hsqldb server if needed">
</target>
<!-- ### REINSTALL TOMCAT ################################################ -->
- <target name="reinstall.tomcat"
- depends="delete.tomcat, install.tomcat"
+ <target name="reinstall.tomcat"
+ depends="delete.tomcat, install.tomcat"
description="Deletes the previous tomcat installation and re-installs tomcat" />
- <target name="reinstall.tomcat.and.jbpm"
- depends="delete.tomcat, install.tomcat, install.jbpm.into.tomcat"
+ <target name="reinstall.tomcat.and.jbpm"
+ depends="delete.tomcat, install.tomcat, install.jbpm.into.tomcat"
description="Deletes the previous tomcat installation and re-installs tomcat and installs jbpm in it" />
<!-- ### DELETE TOMCAT ################################################### -->
- <target name="delete.tomcat"
- description="Deletes tomcat installation">
+ <target name="delete.tomcat" description="Deletes tomcat installation">
<delete dir="${tomcat.home}" />
</target>
<!-- ### INSTALL TOMCAT ################################################## -->
- <target name="install.tomcat"
+ <target name="install.tomcat"
depends="get.tomcat"
description="Downloads tomcat to ${tomcat.distro.dir} if its not available and then unzips tomcat">
<unzip src="${tomcat.distro.path}" dest="${tomcat.parent.dir}" />
@@ -473,9 +483,9 @@
</fileset>
</chmod>
</target>
-
+
<!-- ### GET TOMCAT ###################################################### -->
- <target name="get.tomcat"
+ <target name="get.tomcat"
unless="is.tomcat.distro.available"
description="Downloads tomcat into ${tomcat.distro.dir} if it is not available">
<mkdir dir="${tomcat.distro.dir}" />
@@ -484,15 +494,15 @@
<!-- ### INSTALL JBPM INTO TOMCAT ####################################### -->
<target name="install.jbpm.into.tomcat"
- depends="create.cfg"
- description="Installs jBPM into tomcat">
-
+ depends="create.cfg"
+ description="Installs jBPM into tomcat">
+
<property name="is.tomcat" value="true" />
<!-- create the jbpm configuration jar file and drop in /lib -->
<jar destfile="${tomcat.home}/lib/jbpm.cfg.jar">
<fileset dir="${jbpm.home}/install/generated/cfg">
- <exclude name="logging.properties"/>
+ <exclude name="logging.properties" />
</fileset>
</jar>
@@ -534,7 +544,7 @@
<include name="gwt-console-rpc.jar" />
<include name="jbpm-console-integration.jar" />
<include name="jbpm-console-form-plugin.jar" />
- <include name="jbpm-console-graphView-plugin.jar"/>
+ <include name="jbpm-console-graphView-plugin.jar" />
</fileset>
</copy>
@@ -545,88 +555,88 @@
<include name="gwt-console-server-jbpm.war" />
</fileset>
</copy>
-
+
<!-- Copy Signavio war into /webapps -->
<antcall target="install.signavio.into.tomcat" />
-
-
+
<!-- Rename wars (the context root is configured by WEB-INF/jboss-web.xml,
which is neglected by Tomcat -->
- <move file="${tomcat.home}/webapps/gwt-console-jbpm.war" tofile="${tomcat.home}/webapps/jbpm-console.war" />
- <move file="${tomcat.home}/webapps/gwt-console-server-jbpm.war" tofile="${tomcat.home}/webapps/gwt-console-server.war" />
-
+ <move file="${tomcat.home}/webapps/gwt-console-jbpm.war"
+ tofile="${tomcat.home}/webapps/jbpm-console.war" />
+ <move file="${tomcat.home}/webapps/gwt-console-server-jbpm.war"
+ tofile="${tomcat.home}/webapps/gwt-console-server.war" />
+
<!-- reporting -->
- <property name="birt.dir" value="${tomcat.home}/birt"/>
- <mkdir dir="${birt.dir}"/>
- <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}"/>
- <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}"/>
+ <property name="birt.dir" value="${tomcat.home}/birt" />
+ <mkdir dir="${birt.dir}" />
+ <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}" />
+ <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}" />
<!-- copy database driver -->
<property name="database.driver.destination.dir" value="${tomcat.home}/lib" />
<antcall target="internal.copy.database.driver" />
-
+
<!-- tweak the tomcat server config for the security domain -->
<copy file="${install.src.dir}/tomcat/server.xml"
- tofile="${tomcat.home}/conf/server.xml"
+ tofile="${tomcat.home}/conf/server.xml"
overwrite="true">
- <filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
+ <filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
</copy>
</target>
-
- <!-- ### INSTALL EXAMPLES INTO TOMCAT ################################################ -->
- <target name="install.examples.into.tomcat"
- description="deploys all the example processes">
+
+ <!-- ### INSTALL EXAMPLES INTO TOMCAT ################################################ -->
+ <target name="install.examples.into.tomcat" description="deploys all the example processes">
<ant antfile="${jbpm.home}/examples/build.xml" target="create.and.deploy.examples" />
- <copy file="${examples.file}"
- todir="${tomcat.home}/lib"
- overwrite="true" />
+ <copy file="${examples.file}" todir="${tomcat.home}/lib" overwrite="true" />
</target>
-
- <!-- ### INSTALL HSQLDB SERVER ################################################ -->
+
+ <!-- ### INSTALL HSQLDB SERVER ################################################ -->
<target name="install.hsqldb.server" if="is.hsqldb">
- <delete dir="${hsqldb.server.install.dir}" /> <!-- Also deletes old data -->
- <mkdir dir="${hsqldb.server.install.dir}"/>
+ <delete dir="${hsqldb.server.install.dir}" />
+ <!-- Also deletes old data -->
+ <mkdir dir="${hsqldb.server.install.dir}" />
<copy file="${jbpm.home}/lib/hsqldb.jar" todir="${hsqldb.server.install.dir}" />
<copy todir="${hsqldb.server.install.dir}">
<fileset dir="${hsqldb.server.source.dir}" />
</copy>
<chmod perm="a+x" os="Linux, Mac OS X">
<fileset dir="${hsqldb.server.install.dir}">
- <include name="*.sh"/>
+ <include name="*.sh" />
</fileset>
</chmod>
</target>
-
+
<!-- ### START HSQLDB SERVER ################################################ -->
<target name="start.hsqldb.server" if="is.hsqldb">
- <taskdef name="start-hsqldb-server" classname="org.jbpm.pvm.internal.ant.StartHsqldbServerTask">
+ <taskdef name="start-hsqldb-server"
+ classname="org.jbpm.pvm.internal.ant.StartHsqldbServerTask">
<classpath>
<fileset dir="${jbpm.home}">
- <include name="jbpm.jar"/>
+ <include name="jbpm.jar" />
</fileset>
</classpath>
</taskdef>
<start-hsqldb-server hsqldbServerHome="${hsqldb.server.install.dir}" />
</target>
-
+
<!-- ### SHUTDOWN HSQLDB SERVER ################################################ -->
<target name="stop.hsqldb.server" if="is.hsqldb">
- <sql driver="${jdbc.driver}"
- password="${jdbc.password}"
- url="${jdbc.url}"
- userid="${jdbc.username}"
- autocommit="true"
- src="${hsqldb.server.install.dir}/shutdown.sql">
+ <sql driver="${jdbc.driver}"
+ password="${jdbc.password}"
+ url="${jdbc.url}"
+ userid="${jdbc.username}"
+ autocommit="true"
+ src="${hsqldb.server.install.dir}/shutdown.sql">
<classpath>
<fileset dir="${hsqldb.server.install.dir}">
- <include name="hsqldb.jar"/>
+ <include name="hsqldb.jar" />
</fileset>
</classpath>
</sql>
</target>
-
+
<!-- ### START TOMCAT ################################################### -->
- <target name="start.tomcat"
+ <target name="start.tomcat"
description="Starts Tomcat and waits till it is booted, then lets Tomcat run in the background">
<taskdef name="start-tomcat" classname="org.jbpm.pvm.internal.ant.StartTomcatTask">
<classpath>
@@ -639,26 +649,26 @@
</target>
<!-- ### STOP TOMCAT ################################################### -->
- <target name="stop.tomcat"
+ <target name="stop.tomcat"
description="Signals Tomcat to stop, but doesn't wait till its finished">
<exec executable="${tomcat.home}/bin/catalina.bat"
dir="${tomcat.home}/bin"
os="Windows Vista, Windows XP,Windows 2000,Windows 98">
- <arg line="stop"/>
+ <arg line="stop" />
</exec>
- <exec executable="${tomcat.home}/bin/catalina.sh"
+ <exec executable="${tomcat.home}/bin/catalina.sh"
dir="${tomcat.home}/bin"
os="Linux, Unix, Mac">
- <arg line="stop"/>
+ <arg line="stop" />
</exec>
</target>
-
+
<!-- ### CREATE JBPM SCHEMA ############################################# -->
- <target name="create.jbpm.schema"
+ <target name="create.jbpm.schema"
depends="create.cfg"
description="creates the jbpm tables in the database">
<echo message="creating jbpm schema..." />
- <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
+ <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
file="${install.src.dir}/cfg/jbpm/standalone.testsuite.jbpm.cfg.xml"
overwrite="true" />
<java classname="org.jbpm.db.Create" fork="true">
@@ -667,10 +677,10 @@
<pathelement location="${jbpm.home}/install/generated/cfg" />
<pathelement location="${jbpm.home}/install/src/db" />
<fileset dir="${jbpm.home}">
- <include name="jbpm.jar"/>
+ <include name="jbpm.jar" />
</fileset>
<fileset dir="${jbpm.home}/lib">
- <include name="*.jar"/>
+ <include name="*.jar" />
</fileset>
</classpath>
</java>
@@ -678,30 +688,29 @@
<!-- ### UPGRADE JBPM SCHEMA ############################################# -->
<target name="upgrade.jbpm.schema"
- depends="create.cfg"
+ depends="create.cfg"
description="Upgrades the jBPM tables in the database to the current version">
<echo message="upgrading jbpm schema..." />
- <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
+ <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
file="${install.src.dir}/cfg/jbpm/standalone.testsuite.jbpm.cfg.xml"
overwrite="true" />
<java classname="org.jbpm.db.Upgrade" fork="true">
- <arg line="${database}" />
+ <arg line="${database}" />
<classpath>
- <pathelement location="${jbpm.home}/install/generated/cfg" />
+ <pathelement location="${jbpm.home}/install/generated/cfg" />
<pathelement location="${jbpm.home}/install/src/db" />
<fileset dir="${jbpm.home}">
- <include name="jbpm.jar"/>
+ <include name="jbpm.jar" />
</fileset>
<fileset dir="${jbpm.home}/lib">
- <include name="*.jar"/>
+ <include name="*.jar" />
</fileset>
</classpath>
</java>
</target>
<!-- ### DROP JBPM SCHEMA ############################################### -->
- <target name="drop.jbpm.schema"
- description="drops the jbpm tables from the database">
+ <target name="drop.jbpm.schema" description="drops the jbpm tables from the database">
<echo message="dropping jbpm schema in db ${jdbc.url}" />
<sql driver="${jdbc.driver}"
url="${jdbc.url}"
@@ -711,7 +720,7 @@
src="${jbpm.home}/install/src/db/drop/jbpm.${database}.drop.sql">
<classpath>
<fileset dir="${jbpm.home}/lib">
- <include name="*.jar"/>
+ <include name="*.jar" />
</fileset>
</classpath>
</sql>
@@ -726,41 +735,40 @@
userid="${jdbc.username}"
password="${jdbc.password}"
onerror="continue">
- <transaction src="${jbpm.home}/install/src/demo/example.identities.sql"/>
+ <transaction src="${jbpm.home}/install/src/demo/example.identities.sql" />
<classpath>
<fileset dir="${jbpm.home}/lib">
- <include name="*.jar"/>
+ <include name="*.jar" />
</fileset>
</classpath>
</sql>
</target>
-
+
<!-- ### START HSQLDB DATABASE MGR ##################################### -->
- <target name="hsqldb.databasemanager"
- description="start the hsqldb database manager">
+ <target name="hsqldb.databasemanager" description="start the hsqldb database manager">
<java classname="org.hsqldb.util.DatabaseManager" fork="true">
- <arg line="-url jdbc:hsqldb:hsql://localhost:1701"/>
+ <arg line="-url jdbc:hsqldb:hsql://localhost:1701" />
<classpath>
<fileset dir="${jbpm.home}/lib">
- <include name="hsqldb.jar"/>
+ <include name="hsqldb.jar" />
</fileset>
</classpath>
</java>
</target>
<!-- ### INSTALL ECLIPSE ################################################ -->
- <target name="install.eclipse"
+ <target name="install.eclipse"
depends="get.eclipse"
description="unzips eclipse, downloads eclipse if it is not available in ${eclipse.distro.dir}">
<antcall target="internal.install.eclipse.windows" />
<antcall target="internal.install.eclipse.non.windows" />
</target>
-
+
<!-- ### GET ECLIPSE ##################################################### -->
<condition property="is.eclipse.distro.available">
<available file="${eclipse.distro.path}" />
</condition>
- <target name="get.eclipse"
+ <target name="get.eclipse"
unless="is.eclipse.distro.available"
description="downloads eclipse to ${eclipse.distro.dir}">
<mkdir dir="${eclipse.distro.dir}" />
@@ -768,8 +776,7 @@
</target>
<!-- ### START ECLIPSE ################################################## -->
- <target name="start.eclipse"
- description="starts eclipse">
+ <target name="start.eclipse" description="starts eclipse">
<!-- Windows -->
<exec executable="cmd" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
<arg line="/C start "${jbpm.home}/eclipse/eclipse.exe" "-data" "${jbpm.home}/workspace"" />
@@ -777,52 +784,61 @@
<!-- Unix -->
<chmod perm="+x">
<fileset dir="${jbpm.home}/eclipse">
- <filename name="eclipse"/>
+ <filename name="eclipse" />
</fileset>
- <fileset dir="${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/"> <!-- Path is different for OS X -->
- <filename name="eclipse"/>
- </fileset>
+ <fileset dir="${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/"> <!-- Path is different for OS X -->
+ <filename name="eclipse" />
+ </fileset>
</chmod>
<exec executable="/bin/bash" os="Linux">
<arg line="-c "${jbpm.home}/eclipse/eclipse" "-data" "${jbpm.home}/workspace"" />
</exec>
- <exec executable="/bin/bash" os="Mac OS X">
- <arg line="-c "${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/eclipse" "-data" "${jbpm.home}/workspace"" />
+ <exec executable="/bin/bash" os="Mac OS X">
+ <arg line="-c "${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/eclipse" "-data" "${jbpm.home}/workspace"" />
</exec>
</target>
- <target name="install.signavio.into.jboss" depends="internal.set.signavio.repo.dir" description="installs signavio into jboss">
+ <target name="install.signavio.into.jboss"
+ depends="internal.set.signavio.repo.dir"
+ description="installs signavio into jboss">
<!-- Current version of Signavio needs to be unpacked in /deploy to work correctly -->
- <unzip src="${signavio.src.dir}/${signavio.war.file.name}" dest="${jboss.server.deploy.dir}/${signavio.war.file.name}" />
+ <unzip src="${signavio.src.dir}/${signavio.war.file.name}"
+ dest="${jboss.server.deploy.dir}/${signavio.war.file.name}" />
</target>
- <target name="install.signavio.into.tomcat" depends="internal.set.signavio.repo.dir" description="installs signavio into tomcat">
- <copy file="${signavio.src.dir}/${signavio.war.file.name}" todir="${tomcat.webapps.dir}"/>
+ <target name="install.signavio.into.tomcat"
+ depends="internal.set.signavio.repo.dir"
+ description="installs signavio into tomcat">
+ <copy file="${signavio.src.dir}/${signavio.war.file.name}" todir="${tomcat.webapps.dir}" />
</target>
-
+
<!-- ######################## -->
<!-- ### INTERNAL TARGETS ### -->
<!-- ######################## -->
- <target name="enable.jboss.debug"
+ <target name="enable.jboss.debug"
depends="internal.enable.jboss.debug.jboss500, internal.enable.jboss.debug.jboss510" />
<target name="internal.enable.jboss.debug.jboss500" if="is.jboss.500">
<echo message="enabling debug on ${jboss.home}" />
- <replace file="${jboss.home}/bin/run.bat"
+ <replace file="${jboss.home}/bin/run.bat"
token="rem set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"
value="set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n" />
<echo message="copying customized log file to ${jboss.server.config.dir}/conf" />
- <copy file="${jbpm.home}/install/src/jboss/log/jboss-log4j.xml" todir="${jboss.server.config.dir}/conf" overwrite="true" />
+ <copy file="${jbpm.home}/install/src/jboss/log/jboss-log4j.xml"
+ todir="${jboss.server.config.dir}/conf"
+ overwrite="true" />
</target>
- <target name="internal.enable.jboss.debug.jboss510" if="is.jboss.510">
+ <target name="internal.enable.jboss.debug.jboss510" if="is.jboss.510">
<echo message="enabling debug on ${jboss.home}" />
- <replace file="${jboss.home}/bin/run.conf.bat"
+ <replace file="${jboss.home}/bin/run.conf.bat"
token="rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n""
- value="set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n""/>
+ value="set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"" />
<echo message="copying customized log file to ${jboss.server.config.dir}/conf" />
- <copy file="${jbpm.home}/install/src/jboss/log/jboss-log4j.xml" todir="${jboss.server.config.dir}/conf" overwrite="true" />
+ <copy file="${jbpm.home}/install/src/jboss/log/jboss-log4j.xml"
+ todir="${jboss.server.config.dir}/conf"
+ overwrite="true" />
</target>
<target name="internal.copy.database.driver">
@@ -846,47 +862,58 @@
</condition>
<antcall target="internal.copy.database.driver.if.needed" />
</target>
-
+
<target name="internal.copy.database.driver.if.needed" if="database.driver">
- <available file="${jbpm.home}/lib/${database.driver}" property="database.driver.jar.available" />
- <fail message="please download the ${database} driver jar and put it in the ${jbpm.home}/lib directory" unless="database.driver.jar.available" />
+ <available file="${jbpm.home}/lib/${database.driver}"
+ property="database.driver.jar.available" />
+ <fail message="please download the ${database} driver jar and put it in the ${jbpm.home}/lib directory"
+ unless="database.driver.jar.available" />
<echo message="Copying database driver ${database.driver} to ${database.driver.destination.dir}" />
- <copy file="${jbpm.home}/lib/${database.driver}" todir="${database.driver.destination.dir}" />
+ <copy file="${jbpm.home}/lib/${database.driver}"
+ todir="${database.driver.destination.dir}" />
</target>
<target name="internal.set.signavio.repo.dir">
<mkdir dir="${jbpm.home}/${signavio.repo.dir.name}" />
-
+
<!-- unzip the signavio war -->
<delete dir="${signavio.tmp.dir}" />
<mkdir dir="${signavio.tmp.dir}" />
- <unzip src="${jbpm.home}/install/src/signavio/${signavio.war.file.name}" dest="${signavio.tmp.dir}" />
-
- <!-- Replace Windows backslash with forward slash (see JBPM-2540) -->
- <pathconvert property="signavio.repo.path" targetos="unix">
- <map from="${basedir}/" to='' />
- <map from="${basedir}\\" to='' />
- <path location="${jbpm.home}/${signavio.repo.dir.name}"/>
- </pathconvert>
-
+ <unzip src="${jbpm.home}/install/src/signavio/${signavio.war.file.name}"
+ dest="${signavio.tmp.dir}" />
+
+ <!-- Replace Windows backslash with forward slash (see JBPM-2540) -->
+ <pathconvert property="signavio.repo.path" targetos="unix">
+ <map from="${basedir}/" to='' />
+ <map from="${basedir}\\" to='' />
+ <path location="${jbpm.home}/${signavio.repo.dir.name}" />
+ </pathconvert>
+
<!-- replace the repo dir in he unzipped WEB-INF/web.xml -->
- <replaceregexp file="${signavio.tmp.dir}/WEB-INF/web.xml" flags="s"
+ <replaceregexp file="${signavio.tmp.dir}/WEB-INF/web.xml"
+ flags="s"
match="<param-name>fileSystemRootDirectory</param-name>.*?<param-value>.*?</param-value>"
- replace="<param-name>fileSystemRootDirectory</param-name><param-value>${signavio.repo.path}</param-value>"/>
-
+ replace="<param-name>fileSystemRootDirectory</param-name><param-value>${signavio.repo.path}</param-value>" />
+
<!-- zip it up again and copy it back to the signavio src dir-->
- <zip destfile="${signavio.tmp.dir}/${signavio.war.file.name}" basedir="${signavio.tmp.dir}" />
- <copy file="${signavio.tmp.dir}/${signavio.war.file.name}" todir="${signavio.src.dir}" overwrite="true"/>
+ <zip destfile="${signavio.tmp.dir}/${signavio.war.file.name}"
+ basedir="${signavio.tmp.dir}" />
+ <copy file="${signavio.tmp.dir}/${signavio.war.file.name}"
+ todir="${signavio.src.dir}"
+ overwrite="true" />
</target>
<target name="internal.install.eclipse.windows" if="is.windows">
- <unzip src="${eclipse.distro.dir}/${eclipse.filename}" dest="${jbpm.home}" overwrite="true" />
+ <unzip src="${eclipse.distro.dir}/${eclipse.filename}"
+ dest="${jbpm.home}"
+ overwrite="true" />
</target>
<target name="internal.install.eclipse.non.windows" if="is.not.windows">
<gunzip src="${eclipse.distro.dir}/${eclipse.filename}" dest="${eclipse.distro.dir}" />
- <untar src="${eclipse.distro.dir}/${eclipse.tarfilename}" dest="${jbpm.home}" overwrite="true" />
- <delete file="${eclipse.distro.dir}/${eclipse.tarfilename}"/>
+ <untar src="${eclipse.distro.dir}/${eclipse.tarfilename}"
+ dest="${jbpm.home}"
+ overwrite="true" />
+ <delete file="${eclipse.distro.dir}/${eclipse.tarfilename}" />
</target>
-
</project>
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java 2010-05-04 02:05:34 UTC (rev 6292)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java 2010-05-04 04:20:24 UTC (rev 6293)
@@ -21,56 +21,70 @@
*/
package org.jbpm.pvm.internal.ant;
+import java.util.ArrayList;
+import java.util.List;
+
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
public class StartJBossTask extends Task {
-
+
private static final String END_MESSAGE = " Started in ";
-
- String configuration = null;
- String jbosshome = null;
+ String configuration;
+ String jbosshome;
+ String bindaddress;
+
public void execute() throws BuildException {
- try {
- // get some environment variableInstances
- String fileSeparator = System.getProperty( "file.separator" );
- String os = getProject().getProperty( "os.name" ).toLowerCase();
-
- // build the command string
- String[] command = null;
- if ( os.indexOf( "windows" ) != -1 ) {
- command = new String[]{getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.bat"};
- } else if ( os.indexOf( "linux" ) != -1 || os.indexOf( "mac" ) != -1) {
- command = new String[]{getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.sh"};
- } else {
- throw new BuildException( "os '" + os + "' not supported in the startjboss task." );
- }
-
- if (configuration!=null) {
- command = new String[]{command[0], "-c "+configuration};
- }
+ // get some environment variableInstances
+ String fileSeparator = System.getProperty("file.separator");
+ String os = getProject().getProperty("os.name").toLowerCase();
+ // build the command string
+ String program;
+ if (os.indexOf("windows") != -1) {
+ program = getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.bat";
+ }
+ else if (os.indexOf("linux") != -1 || os.indexOf("mac") != -1) {
+ program = getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.sh";
+ }
+ else {
+ throw new BuildException("os '" + os + "' not supported in the startjboss task.");
+ }
- // launch the command and wait till the END_MESSAGE appears
- Thread launcher = new Launcher(this, command, END_MESSAGE, null);
- launcher.start();
+ List<String> command = new ArrayList<String>();
+ command.add(program);
+
+ if (configuration != null) {
+ command.add("-c");
+ command.add(configuration);
+ }
+
+ if (bindaddress != null) {
+ command.add("-b");
+ command.add(bindaddress);
+ }
+
+ // launch the command and wait till the END_MESSAGE appears
+ Thread launcher = new Launcher(this, command.toArray(new String[0]), END_MESSAGE, null);
+ launcher.start();
+ try {
launcher.join();
-
- } catch (Exception e) {
+ }
+ catch (InterruptedException e) {
e.printStackTrace();
}
}
-
+
String getJBossHome() {
- if (jbosshome!=null) {
+ if (jbosshome != null) {
return jbosshome;
}
- String jbossHomeSysProp = getProject().getProperty( "jboss.home" );
- if (jbossHomeSysProp!=null) {
+ String jbossHomeSysProp = getProject().getProperty("jboss.home");
+ if (jbossHomeSysProp != null) {
return jbossHomeSysProp;
}
- throw new BuildException("startjboss couldn't figure out which jboss to start: attribute jbosshome not specified and property jboss.home was not set");
+ throw new BuildException("jboss home not specified");
}
public void setConfiguration(String configuration) {
@@ -79,4 +93,8 @@
public void setJbosshome(String jbosshome) {
this.jbosshome = jbosshome;
}
+
+ public void setBindaddress(String bindaddress) {
+ this.bindaddress = bindaddress;
+ }
}
Modified: jbpm4/trunk/modules/test-cactus/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-cactus/pom.xml 2010-05-04 02:05:34 UTC (rev 6292)
+++ jbpm4/trunk/modules/test-cactus/pom.xml 2010-05-04 04:20:24 UTC (rev 6293)
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- ====================================================================== -->
-<!-- -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at http://www.gnu.org. -->
-<!-- -->
-<!-- ====================================================================== -->
+ <!-- ====================================================================== -->
+ <!-- -->
+ <!-- JBoss, the OpenSource J2EE webOS -->
+ <!-- -->
+ <!-- Distributable under LGPL license. -->
+ <!-- See terms of license at http://www.gnu.org. -->
+ <!-- -->
+ <!-- ====================================================================== -->
-<!-- $Id: pom.xml 5319 2009-07-17 10:03:46Z tom.baeyens at jboss.com $ -->
+ <!-- $Id: pom.xml 5319 2009-07-17 10:03:46Z tom.baeyens at jboss.com $ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>jBPM 4 - Test Cactus</name>
@@ -29,31 +29,38 @@
</parent>
<dependencies>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-bpmn</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-examples</artifactId>
- <classifier>tests</classifier>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-test-db</artifactId>
- <classifier>tests</classifier>
- </dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.core</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-bpmn</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <classifier>tests</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-test-db</artifactId>
+ <classifier>tests</classifier>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.core</artifactId>
+ </dependency>
</dependencies>
<build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
@@ -75,7 +82,7 @@
</configuration>
</execution>
</executions>
- </plugin>
+ </plugin>
</plugins>
</build>
@@ -87,24 +94,24 @@
</properties>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy.libs</id>
- <phase>package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy.libs</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
<outputDirectory>target/jbpm.test.webapp.libs</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- </artifactItem>
+ <artifactItems>
<artifactItem>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ </artifactItem>
+ <artifactItem>
<groupId>cactus</groupId>
<artifactId>cactus.core</artifactId>
</artifactItem>
@@ -127,9 +134,9 @@
<version>1.1</version>
</artifactItem>
<artifactItem>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-examples</artifactId>
- <classifier>tests</classifier>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <classifier>tests</classifier>
</artifactItem>
<artifactItem>
<groupId>org.jbpm.jbpm4</groupId>
@@ -148,15 +155,15 @@
<groupId>org.subethamail</groupId>
<artifactId>subethasmtp-smtp</artifactId>
</artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
-
+
<profile>
<id>enterprise</id>
<properties>
@@ -164,24 +171,24 @@
</properties>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy.libs</id>
- <phase>package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy.libs</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
<outputDirectory>target/jbpm.test.webapp.libs</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- </artifactItem>
+ <artifactItems>
<artifactItem>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ </artifactItem>
+ <artifactItem>
<groupId>cactus</groupId>
<artifactId>cactus.core</artifactId>
</artifactItem>
@@ -204,9 +211,9 @@
<version>1.1</version>
</artifactItem>
<artifactItem>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-examples</artifactId>
- <classifier>tests</classifier>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <classifier>tests</classifier>
</artifactItem>
<artifactItem>
<groupId>org.jbpm.jbpm4</groupId>
@@ -225,15 +232,15 @@
<groupId>org.subethamail</groupId>
<artifactId>subethasmtp-smtp</artifactId>
</artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
-
+
<profile>
<id>runtest</id>
<dependencies>
@@ -252,55 +259,55 @@
<artifactId>jbpm-test-db</artifactId>
<classifier>tests</classifier>
</dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.core</artifactId>
- </dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.integration.shared.api</artifactId>
- </dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.integration.ant</artifactId>
- </dependency>
- <dependency>
- <groupId>aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>runtime</scope>
- </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.integration.shared.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.integration.ant</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-cactus-test-suite</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="test_classpath" refid="maven.test.classpath"/>
- <echo message="${test_classpath}" />
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-cactus-test-suite</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="test_classpath" refid="maven.test.classpath" />
+ <echo message="${test_classpath}" />
<delete>
<fileset dir=".">
<include name="src/test/java/org/jbpm/test/AllIntegrationTests.java*" />
</fileset>
</delete>
- <java classname="org.jbpm.cactustool.CactusTestGenerator">
- <classpath path="${test_classpath}"/>
- <arg line="src/test/java ../examples/src/test/java ../test-db/src/test/java" />
- </java>
- </tasks>
- </configuration>
- </execution>
+ <java classname="org.jbpm.cactustool.CactusTestGenerator">
+ <classpath path="${test_classpath}" />
+ <arg line="src/test/java ../examples/src/test/java ../test-db/src/test/java" />
+ </java>
+ </tasks>
+ </configuration>
+ </execution>
<execution>
<id>remove-generated-cactus-test</id>
<phase>package</phase>
@@ -317,16 +324,16 @@
</tasks>
</configuration>
</execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>org/jbpm/test/AllIntegrationTests.java</include>
- </includes>
- </configuration>
- </plugin>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org/jbpm/test/AllIntegrationTests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
Modified: jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties 2010-05-04 02:05:34 UTC (rev 6292)
+++ jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties 2010-05-04 04:20:24 UTC (rev 6293)
@@ -1 +1 @@
-cactus.contextURL=http://localhost:8080/jbpm-test-webapp
+cactus.contextURL=http\://@jboss.bind.address@\:8080/jbpm-test-webapp
Modified: jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2010-05-04 02:05:34 UTC (rev 6292)
+++ jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2010-05-04 04:20:24 UTC (rev 6293)
@@ -2,19 +2,18 @@
#
# runs the jboss integration test suite
-MAVEN_OPTS="-Xms1024M -Xmx1024M"
-ANT_PROPERTIES="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss"
-echo ANT_PROPERTIES=${ANT_PROPERTIES}
+MAVEN_OPTS="-Xms256M -Xmx1024M"
+ANT_PROPERTIES="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR"
-echo just in case the previous run didnt complete ok, we stop jboss
-ant -f modules/distro/src/main/files/install/build.xml $ANT_PROPERTIES reinstall.jboss
+# just in case the previous run didnt complete ok, we stop jboss
ant -f modules/distro/src/main/files/install/build.xml $ANT_PROPERTIES stop.jboss
+ant -f modules/distro/src/main/files/install/build.xml $ANT_PROPERTIES reinstall.jboss
mvn -U -Pdistro,integration clean install
ant -f qa/build.xml $ANT_PROPERTIES testsuite.jboss.setup
cd modules/test-cactus
-mvn -Pruntest test
+mvn -Pruntest -Djboss.bind.address=$JBOSS_BINDADDR test
cd ../..
ant -f qa/build.xml $ANT_PROPERTIES testsuite.jboss.teardown
More information about the jbpm-commits
mailing list