[gatein-commits] gatein SVN: r7256 - epp/portal/branches/EPP_5_2_Branch/distribution/mead-tools.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Aug 30 14:30:05 EDT 2011


Author: hfnukal
Date: 2011-08-30 14:30:04 -0400 (Tue, 30 Aug 2011)
New Revision: 7256

Modified:
   epp/portal/branches/EPP_5_2_Branch/distribution/mead-tools/build.xml
   epp/portal/branches/EPP_5_2_Branch/distribution/mead-tools/pom.xml
Log:
JBEPP-1091 Add scratch switch and brew exec

Modified: epp/portal/branches/EPP_5_2_Branch/distribution/mead-tools/build.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/mead-tools/build.xml	2011-08-30 17:09:58 UTC (rev 7255)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/mead-tools/build.xml	2011-08-30 18:30:04 UTC (rev 7256)
@@ -16,13 +16,14 @@
     </ant>
     
     execute
-    mvn package -P mead-all [-Dbrew.exec [-Dbrew.not.wait]]
+    mvn package -P mead-all [-Dbrew.exec [-Dbrew.not.wait]] [-Dbrew.not.scratch]
     
     brew.exec - will execute Brew bild. Brew binary must be installed om build mashine.
     brew.no.wait - If not declared, build waits until task is done and synchronized
+    brew.not.scratch - Performs scratch build unless specified. This prevents from unwanted execution.
     
     -->
-    <target name="mead-build" depends="patch,profiles,properties">
+    <target name="mead-build" depends="patch,profiles,properties,brew-build-scratch-no,brew-build-scratch-yes">
         
         <property name="svnurl">${mead.svn.base}/${mead.svn.repo}/${mead.svn.path}</property>
 
@@ -51,11 +52,11 @@
         <property name="mead.profiles">${mead.build.profiles}</property>
     
         <echo></echo>
-        <echo>brew mead-build ${mead.target} 'svn+${mead.svn.base}/${mead.svn.repo}?${mead.svn.path}#${svn.revision}' ${mead.patch} ${mead.profiles} ${mead.properties}</echo>
+        <echo>brew mead-build ${mead.target} 'svn+${mead.svn.base}/${mead.svn.repo}?${mead.svn.path}#${svn.revision}' ${mead.patch} ${mead.profiles} ${mead.properties} ${brew.build.scratch}</echo>
         <echo></echo>
 <echo file="${brew.commands.file}" append="true">
 # Name: ${project.name}
-brew mead-build ${mead.target} 'svn+${mead.svn.base}/${mead.svn.repo}?${mead.svn.path}#${svn.revision}' ${mead.patch} ${mead.profiles} ${mead.properties}
+brew mead-build ${mead.target} 'svn+${mead.svn.base}/${mead.svn.repo}?${mead.svn.path}#${svn.revision}' ${mead.patch} ${mead.profiles} ${mead.properties} ${brew.build.scratch}
 
 </echo>
         
@@ -156,20 +157,21 @@
     <target name="brew-build-exec" if="brew.exec">
                                         
                                 <!-- Exceute MEAD buid -->
-<!--                                <exec executable="brew" output="${ant.build.dir}/task.properties" failonerror="true" failifexecutionfails="">
-                                    <arg value="mead-build"/>
+                                <exec executable="brew" output="${ant.build.dir}/task.properties" failonerror="true" failifexecutionfails="">
+                                    <arg value="maven-build"/>
                                     <arg value="${mead.target}"/>
-                                    <arg value="'svn+${svn.base}/${svn.repo}?${svn.path}#${svn.revision}'" />
-                                    <arg line="${mead.patch} ${mead.profiles} ${mead.properties}" />
-                                </exec>-->
-        <echo file="${ant.build.dir}/task.properties">
-Created task: 3399568
-Task info: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=3399568
-Watching tasks (this may be safely interrupted)...
-3399568 maven (jboss-epp-5-nosign, /repos/gatein:components/wsrp/tags/2.0.1-EPP511-CR01:6602): free
-3399568 maven (jboss-epp-5-nosign, /repos/gatein:components/wsrp/tags/2.0.1-EPP511-CR01:6602): free -> open (x86-003.build.bos.redhat.com)
-  3399569 buildMaven (jboss-epp-5-build): open (x86-006.build.bos.redhat.com)
-        </echo>
+                                    <arg value="svn+${mead.svn.base}/${mead.svn.repo}?${mead.svn.path}#${svn.revision}" />
+                                    <arg line="${mead.patch} ${mead.profiles} ${mead.properties} ${brew.build.scratch}" />
+                                </exec>
+        <!-- FOR TESTING -->
+        <!--<echo file="${ant.build.dir}/task.properties">-->
+<!--Created task: 3399568-->
+<!--Task info: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=3399568-->
+<!--Watching tasks (this may be safely interrupted)...-->
+<!--3399568 maven (jboss-epp-5-nosign, /repos/gatein:components/wsrp/tags/2.0.1-EPP511-CR01:6602): free-->
+<!--3399568 maven (jboss-epp-5-nosign, /repos/gatein:components/wsrp/tags/2.0.1-EPP511-CR01:6602): free -> open (x86-003.build.bos.redhat.com)-->
+  <!--3399569 buildMaven (jboss-epp-5-build): open (x86-006.build.bos.redhat.com)-->
+        <!--</echo>-->
         
         <loadfile property="mead.task.id" srcFile="${ant.build.dir}/task.properties">
             <filterchain>
@@ -181,33 +183,45 @@
             </filterchain>
         </loadfile>
 
-        <echo>Task ID: "${mead.task.id}"</echo>
+        <echo>Task ID: "${mead.task.id}" go to https://brewweb.devel.redhat.com/taskinfo?taskID=${mead.task.id}</echo>
 
         
         <antcall target="brew-build-wait"/>
 
     </target>
+    <target name="brew-build-scratch-no" if="brew.not.scratch">
+        <property name="brew.build.scratch"> </property>
+    </target>
+    <target name="brew-build-scratch-yes" unless="brew.not.scratch">
+        <property name="brew.build.scratch">--scratch</property>
+    </target>
     <target name="brew-build-wait" unless="brew.not.wait">
         <echo>Task ID: "${mead.task.id}"</echo>
 
+        <!-- Wait until task ends to get build ID -->
+        <exec executable="brew" output="${ant.build.dir}/taskwatch.properties" failonerror="true" failifexecutionfails="">
+            <arg value="watch-task"/>
+            <arg value="${mead.task.id}"/>
+        </exec>
+
+        <!-- Parse taskinfo to get build ID -->
+        <exec executable="brew" output="${ant.build.dir}/taskinfo.properties" failonerror="true" failifexecutionfails="">
+            <arg value="taskinfo"/>
+            <arg value="${mead.task.id}"/>
+        </exec>
+        <!-- FOR TESTING -->
+        <!--<echo file="${ant.build.dir}/taskinfo.properties">-->
+<!--Task: 3375489-->
+<!--Type: maven-->
+<!--Owner: hfnukal-->
+<!--State: closed-->
+<!--Created: Wed Jun  8 01:39:18 2011-->
+<!--Started: Wed Jun  8 01:39:20 2011-->
+<!--Finished: Wed Jun  8 02:26:24 2011-->
+<!--Host: x86-007.build.bos.redhat.com-->
+<!--Build: org.exoplatform.portal-exo.portal.parent-5.1.1_epp_DEV02-1 (166768)-->
+        <!--</echo>-->
         
-                                    <!-- Parse taskinfo to get build ID -->
-<!--                                <exec executable="brew" output="${ant.build.dir}/taskinfo.properties">
-                                    <arg value="taskinfo"/>
-                                    <arg value="${task.id}"/>
-                                </exec>-->
-        <echo file="${ant.build.dir}/taskinfo.properties">
-Task: 3375489
-Type: maven
-Owner: hfnukal
-State: closed
-Created: Wed Jun  8 01:39:18 2011
-Started: Wed Jun  8 01:39:20 2011
-Finished: Wed Jun  8 02:26:24 2011
-Host: x86-007.build.bos.redhat.com
-Build: org.exoplatform.portal-exo.portal.parent-5.1.1_epp_DEV02-1 (166768)
-        </echo>
-        
         <loadfile property="mead.build.id" srcFile="${ant.build.dir}/taskinfo.properties">
             <filterchain>
                 <linecontains>

Modified: epp/portal/branches/EPP_5_2_Branch/distribution/mead-tools/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/mead-tools/pom.xml	2011-08-30 17:09:58 UTC (rev 7255)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/mead-tools/pom.xml	2011-08-30 18:30:04 UTC (rev 7256)
@@ -21,7 +21,7 @@
         It tries to get as much info from globally defined properties, but some editing od SVN paths is still necessary.
 
         You can run with:
-        mvn package -P "profile"  [-Dbrew.exec [-Dbrew.not.wait]]
+        mvn package -P mead-all [-Dbrew.exec [-Dbrew.not.wait]] [-Dbrew.not.scratch]
 
         Where:
         profile - component name or names or mead-all which builds all profiles.
@@ -29,6 +29,7 @@
         Commands will be generated on console output and into $brew.commands.file property with default value "target/brew.commands"
         brew.exec - will execute Brew build. Brew binary must be installed on build machine.
         brew.no.wait - If not declared, build waits until task is done and synchronized
+        brew.not.scratch - Performs scratch build unless specified. This prevents from unwanted execution.
     </description>
  
     <properties>



More information about the gatein-commits mailing list