Author: jcoleman(a)redhat.com
Date: 2010-12-01 09:34:59 -0500 (Wed, 01 Dec 2010)
New Revision: 6851
Removed:
jbpm3/branches/jbpm-3.2-soa/soa-distribution/build-common.xml
Log:
Remove build-common.xml. This comes from soa-common.
Deleted: jbpm3/branches/jbpm-3.2-soa/soa-distribution/build-common.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/soa-distribution/build-common.xml 2010-12-01 14:33:51 UTC
(rev 6850)
+++ jbpm3/branches/jbpm-3.2-soa/soa-distribution/build-common.xml 2010-12-01 14:34:59 UTC
(rev 6851)
@@ -1,191 +0,0 @@
-<!-- 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
- ++ Call with parameters:
- ++ module
- -->
- <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 -->
- 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'])
- }
- }
- }
-
- <!-- assemble-->
- ant.ant(antfile:"build.xml", dir:properties['module_base_dir'],
target:"assemble"){
- property(name:"module_base_dir",
value:properties['module_base_dir'])
- property(name:"module_build_finalName",
value:properties['module_build_finalName'])
- property(name:"project.version",
value:properties['project.version'])
- }
- </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
- ++ resource_dir
- ++ version.major
- ++ version.minor
- ++ version.revision
- ++ version.designation
- ++ build_version
- -->
- <target name="version.stamp" >
- <!-- See SOA-911 for "Implementation-Version:" details" -->
- <tstamp>
- <format property="build-day" pattern="MMMM d yyyy" />
- </tstamp>
- <property name="tmp_run_jar_dir"
location="${module_work_dir}/jar" />
- <mkdir dir="${tmp_run_jar_dir}" />
- <unzip src="${run_jar}" dest="${tmp_run_jar_dir}" />
- <delete file="${tmp_run_jar_dir}/org/jboss/version.properties" />
- <delete file="${tmp_run_jar_dir}/META-INF/MANIFEST.MF" />
- <delete file="${tmp_run_jar_dir}/MANIFEST.MF" />
-
- <copy todir="${module_work_dir}">
- <fileset dir="${resource_dir}"
includes="version.properties,MANIFEST.MF" />
- <filterset>
- <filter token="version.major" value="${version.major}" />
- <filter token="version.minor" value="${version.minor}" />
- <filter token="version.revision" value="${version.revision}"
/>
- <filter token="version.designation"
value="${version.designation}" />
- <filter token="build_version" value="${build_version}" />
- <filter token="cvstag" value="${build_version}_SOA" />
- <filter token="build-date" value="${DSTAMP}" />
- <filter token="build-time" value="${TSTAMP}" />
- <filter token="build-day" value="${build-day}" />
- <filter token="java.version" value="${java.version}" />
- <filter token="java.vendor" value="${java.vendor}" />
- <filter token="java.vm.specification.version"
value="${java.vm.specification.version}" />
- <filter token="java.vm.version" value="${java.vm.version}"
/>
- <filter token="java.vm.name" value="${java.vm.name}" />
- <filter token="java.vm.info" value="${java.vm.info}" />
- <filter token="java.specification.version"
value="${java.specification.version}" />
- <filter token="java.class.version"
value="${java.class.version}" />
- <filter token="os.name" value="${os.name}" />
- <filter token="os.arch" value="${os.arch}" />
- <filter token="os.version" value="${os.version}" />
- </filterset>
- </copy>
-
- <move file="${module_work_dir}/version.properties"
todir="${tmp_run_jar_dir}/org/jboss" />
- <jar destfile="${module_work_dir}/run.jar"
basedir="${tmp_run_jar_dir}"
- manifest="${module_work_dir}/MANIFEST.MF" />
-
- <!-- now produce one for the standalone -->
- <replace file="${module_work_dir}/MANIFEST.MF/" token="SOA"
- value="SOA_STANDALONE" />
- <replace file="${tmp_run_jar_dir}/org/jboss/version.properties"
- token="SOA" value="SOA_STANDALONE" />
- <jar destfile="${module_work_dir}/standalone-run.jar"
basedir="${tmp_run_jar_dir}"
- manifest="${module_work_dir}/MANIFEST.MF" />
-
- <delete dir="${tmp_run_jar_dir}" />
- <delete file="${module_work_dir}/MANIFEST.MF" />
- </target>
-</project>