Author: ryanzhang
Date: 2010-09-02 06:20:47 -0400 (Thu, 02 Sep 2010)
New Revision: 6644
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml
jbpm3/branches/jbpm-3.2-soa/modules/core/scripts/antrun-config.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build-common.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_database_sql.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_hibernate_conf.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_jsf_console.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_uninstaller.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_unneeded_docs.xml
Log:
Update soa-distribution patches and build process, including move soa profile out form
core module
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml 2010-09-02 10:02:50 UTC (rev 6643)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml 2010-09-02 10:20:47 UTC (rev 6644)
@@ -177,37 +177,6 @@
<!-- Profiles -->
<profiles>
- <!--
- Name: soa
- Desc: Customizations for the SOA build
- -->
- <profile>
- <id>soa</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>gen-config-soa</id>
- <phase>process-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="database" value="${database}"
/>
- <ant antfile="scripts/antrun-config.xml"
target="gen-hibernate-config" />
- <ant antfile="scripts/antrun-config.xml"
target="gen-jbpm-config-soa" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
<!--
Name: jdk14
Desc: Dependencies specific to JDK 1.4
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/scripts/antrun-config.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/scripts/antrun-config.xml 2010-09-02 10:02:50
UTC (rev 6643)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/scripts/antrun-config.xml 2010-09-02 10:20:47
UTC (rev 6644)
@@ -92,9 +92,5 @@
<copy
file="${project.build.directory}/classes/hibernate.cfg.${database}.xml"
tofile="${project.build.directory}/classes/hibernate.cfg.xml" />
</target>
-
- <target name="gen-jbpm-config-soa" description="generate jbpm
configuration for soa-p">
- <macro-disable section="Logging Service"
-
file="${project.build.directory}/classes/org/jbpm/default.jbpm.cfg.xml" />
- </target>
+
</project>
Modified: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build-common.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build-common.xml 2010-09-02
10:02:50 UTC (rev 6643)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build-common.xml 2010-09-02
10:20:47 UTC (rev 6644)
@@ -1,4 +1,7 @@
-<!-- Common routines for SOA builders -->
+<!-- Common routines for SOA builders
+ ++ $Id: build-common.xml 6165 2010-07-27 11:37:02Z rzhang(a)REDHAT.COM $
+ ++
+ -->
<project name="SOA common routines">
<taskdef name="groovy"
classname="org.codehaus.groovy.ant.Groovy"
classpath="${groovy.path}"/>
<!-- Routine build
@@ -8,19 +11,31 @@
<target name="soa.routine.build">
<groovy>
def ant=new AntBuilder()
+ <!-- pre-patch -->
+ f=new File(properties['module_base_dir'] + "/pre-patch")
+ if (f.exists()){
+ f.eachFileMatch(~/.*\.xml/){
+ println "patch:"+it
+ ant.ant(antfile:it, target:"apply.patch"){
+ property(name:"module_base_dir",
value:properties['module_base_dir'])
+ property(name:"groovy.path",
value:properties['groovy.path'])
+ }
+ }
+ }
+
<!-- build -->
ant.ant(antfile:"build.xml", dir:properties['module_base_dir'],
target:"build"){
property(name:"module_base_dir",
value:properties['module_base_dir'])
property(name:"project.version",
value:properties['project.version'])
}
<!-- post-patch -->
- println("hello, post-patch")
f=new File(properties['module_base_dir'] + "/post-patch")
if (f.exists()){
f.eachFileMatch(~/.*\.xml/){
println "patch:"+it
ant.ant(antfile:it, target:"apply.patch"){
property(name:"module_base_dir",
value:properties['module_base_dir'])
+ property(name:"groovy.path",
value:properties['groovy.path'])
}
}
}
@@ -34,6 +49,82 @@
</groovy>
</target>
+ <!-- Fetch URL to cache directory and do the checksum
+ ++ Call with parameters:
+ ++ base_url
+ ++ filename
+ ++ cache_dir
+ ++ username (optional)
+ ++ password (optional)
+ ++ md5_sum (optional)
+ -->
+ <target name="url.fetch">
+ <groovy>
+ def u_base_url=properties['base_url']
+ def u_filename=properties['filename']
+ def u_cache_dir=properties['cache_dir']
+ def u_username=properties['username']
+ def u_password=properties['password']
+
+ def u_cache_file="${u_cache_dir}/${u_filename}"
+ def u_cache_file_md5="${u_cache_dir}/${u_filename}.MD5"
+ def u_url_md5="${u_base_url}/${u_filename}.MD5"
+ def u_url_md5_l="${u_base_url}/${u_filename}.md5"
+ def u_url_md5_all="${u_base_url}/MD5SUM"
+
+ def ant=new AntBuilder()
+
+ if(properties['md5_sum'] != null &&
(properties['md5_sum'].toBoolean() == true))
+ do_md5_sum=true
+ else
+ do_md5_sum=false
+ if(!(new File(properties['cache_dir']).exists())){
+ ant.mkdir(dir:properties['cache_dir'])
+ }
+ if(do_md5_sum && !new
File("${u_cache_file_md5}").exists()){
+printf("username is %s\n", "${u_username}");
+ if ("${u_username}" == "null" || "${u_username}" ==
"") {
+ ant.get(src:"${u_url_md5_all}",
dest:"${u_cache_file_md5}", verbose:"no",
ignoreerrors:"yes")
+ ant.get(src:"${u_url_md5_l}",
dest:"${u_cache_file_md5}", verbose:"no",
ignoreerrors:"yes")
+ ant.get(src:"${u_url_md5}",
dest:"${u_cache_file_md5}", verbose:"no",
ignoreerrors:"yes")
+ } else {
+ ant.get(src:"${u_url_md5_all}",
dest:"${u_cache_file_md5}", verbose:"no",
username:"${u_username}", password:"${u_password}",
ignoreerrors:"yes")
+ ant.get(src:"${u_url_md5_l}",
dest:"${u_cache_file_md5}", verbose:"no",
username:"${u_username}", password:"${u_password}",
ignoreerrors:"yes")
+ ant.get(src:"${u_url_md5}",
dest:"${u_cache_file_md5}", verbose:"no",
username:"${u_username}", password:"${u_password}",
ignoreerrors:"yes")
+ }
+ }
+
+ if(!new File("${u_cache_file}").exists()){
+ if ("${u_username}" == "null" || "${u_username}" ==
"") {
+ ant.get(src:"${u_base_url}/${u_filename}",
dest:"${u_cache_file}", verbose:"no")
+printf("Null\n");
+ } else {
+ ant.get(src:"${u_base_url}/${u_filename}",
dest:"${u_cache_file}", verbose:"no",
username:"${u_username}", password:"${u_password}")
+printf("Full\n");
+ }
+ }
+
+ if (do_md5_sum) {
+ printf("Checksumming file : %s\n", u_filename)
+ def fmd5=new File("${u_cache_file_md5}")
+ def md5Value=""
+ fmd5.eachLine(){
+ if (it.contains("${u_filename}")) {
+ md5Value=(it.split())[0]
+ } else if (!it.contains(" ")) {
+ md5Value=it;
+ }
+ }
+ printf("Expecting checksum : %s\n", md5Value)
+ ant.checksum(file:"${u_cache_file}",
algorithm:"md5", property:"antmd5Value")
+ printf("Received checksum : %s\n",
ant.getProject().getProperty('antmd5Value'))
+ if(ant.getProject().getProperty('antmd5Value') != md5Value){
+ ant.fail(message:"${u_cache_file} checksum verification failed!")
+ }
+ }
+ </groovy>
+ </target>
+
<!-- Place version settings in run.jar
++ Call with parameters:
++ run_jar
Modified: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build.xml 2010-09-02 10:02:50 UTC
(rev 6643)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build.xml 2010-09-02 10:20:47 UTC
(rev 6644)
@@ -22,16 +22,17 @@
<arg
value="${module_base_dir}/../distribution/target/autosetup.xml"/>
</java>
- <copy todir="${module_base_dir}/target/work/jbpm-jpdl"
overwrite="true">
+ </target>
+
+ <target name="assemble">
+ <copy todir="${module_base_dir}/target/dist/jbpm-jpdl"
overwrite="true">
<fileset dir="${jbpm_install_path}"/>
</copy>
- <copy todir="${module_base_dir}/target/work/jbpm-jpdl/deploy"
overwrite="true">
+ <copy todir="${module_base_dir}/target/dist/jbpm-jpdl/deploy"
overwrite="true">
<fileset dir="${module_base_dir}/target/work/jboss"/>
</copy>
- </target>
- <target name="assemble">
<copy todir="${module_base_dir}/target/dist/jbpm-config"
overwrite="true">
<fileset dir="${jbpm_install_path}/lib">
<include name="jbpm-jpdl.jar"/>
@@ -43,10 +44,6 @@
</fileset>
</copy>
- <copy todir="${module_base_dir}/target/dist/jbpm-jpdl"
overwrite="true">
- <fileset dir="${module_base_dir}/target/work/jbpm-jpdl"/>
- </copy>
-
<copy todir="${module_base_dir}/target/dist/jbpm-sql"
overwrite="true">
<fileset dir="${jbpm_install_path}/database">
<include name="*.sql"/>
@@ -60,13 +57,12 @@
tofile="jbpm-jpdl-soa.${build_version}.zip"/>
<checksum
file="jbpm-jpdl-soa.${build_version}.zip"/>
-->
- <!-- unpack the javadocs -->
- <mkdir dir="${module_base_dir}/target/dist/javadocs"/>
- <unzip src="${jbpm_install_path}/docs/jbpm-enterprise-javadoc.jar"
- dest="${module_base_dir}/target/dist/javadocs/enterprise"/>
- <unzip src="${jbpm_install_path}/docs/jbpm-identity-javadoc.jar"
dest="${module_base_dir}/target/dist/javadocs/identity"/>
- <unzip src="${jbpm_install_path}/docs/jbpm-jpdl-javadoc.jar"
dest="${module_base_dir}/target/dist/javadocs/jbpm-jpdl"/>
+ <!-- unpack the javadocs -->
+ <copy todir="${module_base_dir}/target/dist/javadocs"
overwrite="true">
+ <fileset dir="${module_base_dir}/target/work/javadocs"
includes="**/*" />
+ </copy>
+
<zip
destfile="${module_base_dir}/target/${module_build_finalName}.zip" >
<zipfileset dir="${module_base_dir}/target/dist"
prefix="jbpm" includes="**/*" />
</zip>
Modified: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml 2010-09-02 10:02:50 UTC
(rev 6643)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml 2010-09-02 10:20:47 UTC
(rev 6644)
@@ -12,7 +12,7 @@
<modelVersion>4.0.0</modelVersion>
<name>jBPM3- Build distribution for SOA-P </name>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-soa</artifactId>
+ <artifactId>jbpm-soa-distribution</artifactId>
<packaging>pom</packaging>
<!-- Parent -->
@@ -79,9 +79,8 @@
<artifactItems>
<artifactItem>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jsf-console</artifactId>
- <version>3.2.10-SNAPSHOT</version>
- <classifier>soa</classifier>
+ <artifactId>jsf-console-soa-distribution</artifactId>
+ <version>${project.version}</version>
<type>war</type>
</artifactItem>
</artifactItems>
@@ -96,39 +95,11 @@
<version>1.3</version>
<dependencies>
<dependency>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jsf-console</artifactId>
- <version>3.2.10-SNAPSHOT</version>
- <classifier>soa</classifier>
- <type>war</type>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-nodeps</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-launcher</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-trax</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.7.0</version>
</dependency>
</dependencies>
-
<executions>
<execution>
<id>SOA-P build process</id>
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_database_sql.xml
===================================================================
---
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_database_sql.xml 2010-09-02
10:02:50 UTC (rev 6643)
+++
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_database_sql.xml 2010-09-02
10:20:47 UTC (rev 6644)
@@ -5,9 +5,6 @@
<fileset
dir="${module_base_dir}/target/work/jbpm-installed/database">
<include name="**/jbpm.jpdl.*.update322.sql"/>
</fileset>
- <fileset
dir="${module_base_dir}/target/work/jbpm-jpdl/database">
- <include name="**/jbpm.jpdl.*.update322.sql"/>
- </fileset>
</delete>
</target>
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_hibernate_conf.xml
===================================================================
---
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_hibernate_conf.xml 2010-09-02
10:02:50 UTC (rev 6643)
+++
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_hibernate_conf.xml 2010-09-02
10:20:47 UTC (rev 6644)
@@ -31,13 +31,5 @@
<property
name="hibernate.current_session_context_class">jta</property>]]></replacevalue>
</replace>
- <!-- jBPM framework version -->
- <!-- SOA-959 - set name of transaction -->
- <replace
file="${module_base_dir}/target/work/jbpm-jpdl/config/hibernate.cfg.xml">
- <replacetoken><![CDATA[JTA transaction properties (begin)
===]]></replacetoken>
- <replacevalue><![CDATA[JTA transaction properties (begin) ===
- <property
name="jta.UserTransaction">UserTransaction</property>
- <property
name="hibernate.current_session_context_class">jta</property>]]></replacevalue>
- </replace>
</target>
</project>
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_jsf_console.xml
===================================================================
---
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_jsf_console.xml 2010-09-02
10:02:50 UTC (rev 6643)
+++
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_jsf_console.xml 2010-09-02
10:20:47 UTC (rev 6644)
@@ -1,15 +1,14 @@
-<project name="overlay_jsf_console" default="apply.patch">
+<project name="overlay jsf console with SOA version"
default="apply.patch">
+ <property name="module_work_dir"
value="${module_base_dir}/target/work" />
<target name="apply.patch" >
- <delete>
- <fileset
dir="${module_base_dir}/target/work/jbpm-installed/lib">
- <include name="jsf-console.war"/>
- </fileset>
- </delete>
- <copy
tofile="${module_base_dir}/target/work/jbpm-installed/lib/jsf-console.war"
overwrite="yes" >
- <fileset dir="${module_base_dir}/target/dependency/">
- <include name="jsf-console*.war"/>
- </fileset>
+ <delete file="${module_work_dir}/jbpm-installed/lib/jsf-console.war"
/>
+ <copy tofile="${module_work_dir}/jbpm-installed/lib/jsf-console.war"
overwrite="true" >
+ <fileset dir="${module_base_dir}/target/dependency/"
includes="jsf-console*" />
</copy>
+
+ <delete
dir="${module_work_dir}/jboss/server/default/deploy/jbpm/jsf-console.war" />
+ <unwar src="${module_work_dir}/jbpm-installed/lib/jsf-console.war"
dest="${module_work_dir}/jboss/server/default/deploy/jbpm/jsf-console.war"
overwrite="true" />
+
</target>
</project>
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_uninstaller.xml
===================================================================
---
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_uninstaller.xml 2010-09-02
10:02:50 UTC (rev 6643)
+++
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_uninstaller.xml 2010-09-02
10:20:47 UTC (rev 6644)
@@ -1,7 +1,7 @@
<project name="remove_uninstall" default="apply.patch">
<target name="apply.patch" >
<!-- Remove redundant installer leftovers -->
- <delete
dir="${module_base_dir}/target/work/jbpm-jpdl/Uninstaller"/>
- <delete
file="${module_base_dir}/target/work/jbpm-jpdl/.installationinformation"/>
+ <delete
dir="${module_base_dir}/target/work/jbpm-installed/Uninstaller"/>
+ <delete
file="${module_base_dir}/target/work/jbpm-installed/.installationinformation"/>
</target>
</project>
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_unneeded_docs.xml
===================================================================
---
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_unneeded_docs.xml 2010-09-02
10:02:50 UTC (rev 6643)
+++
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_unneeded_docs.xml 2010-09-02
10:20:47 UTC (rev 6644)
@@ -1,7 +1,12 @@
<project name="patchname" default="apply.patch">
- <property name="package_root"
value="${module_base_dir}/target/work/jbpm-jpdl" />
+ <property name="package_root"
value="${module_base_dir}/target/work/jbpm-installed" />
<target name="apply.patch">
+ <unzip src="${package_root}/docs/jbpm-enterprise-javadoc.jar"
+ dest="${module_base_dir}/target/work/javadocs/enterprise"/>
+ <unzip src="${package_root}/docs/jbpm-identity-javadoc.jar"
dest="${module_base_dir}/target/work/javadocs/identity"/>
+ <unzip src="${package_root}/docs/jbpm-jpdl-javadoc.jar"
dest="${module_base_dir}/target/work/javadocs/jbpm-jpdl"/>
+
<!-- SOA-1585 -->
<delete dir="${package_root}/docs"/>