Author: nickboldt
Date: 2010-05-05 18:41:27 -0400 (Wed, 05 May 2010)
New Revision: 21929
Added:
branches/modular_build/drools/build.xml
Modified:
branches/modular_build/build/build.xml
branches/modular_build/site/category.JBDS.xml
branches/modular_build/site/category.JBossTools.xml
Log:
JBDS-486 add Drools as sourced from
http://hudson.qa.jboss.com/hudson/job/drools/lastStableBuild/artifact/tru...
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-05 22:05:36 UTC (rev 21928)
+++ branches/modular_build/build/build.xml 2010-05-05 22:41:27 UTC (rev 21929)
@@ -410,7 +410,7 @@
</testsuite>
</echo>
<property name="no.tests.run" value="true" />
- <property name="no.builds.run" value="true" />
+ <property name="no.overall" value="true" />
</then>
<else>
<echo level="warning">The following components' sources have
changed and will be built:
@@ -448,12 +448,15 @@
<for param="COMPONENT" list="${COMPONENTS.to.build}"
delimiter=",
">
<sequential>
- <now level="warning">Build @{COMPONENT}</now>
- <!-- If poms already exist, DO NOT OVERWRITE unless
overwrite.existing.pom.xml=true -->
- <ant antfile="genpom.xml" target="run"
dir="${WORKINGDIR}">
- <property name="COMPONENT" value="@{COMPONENT}" />
- </ant>
-
+ <if>
+ <equals arg1="@{COMPONENT}" arg2="site" />
+ <then>
+ <now level="warning">Build overall update @{COMPONENT}</now>
+ </then>
+ <else>
+ <now level="warning">Build @{COMPONENT} component</now>
+ </else>
+ </if>
<!-- optional extra instructions to do before a maven build -->
<if>
<available file="${WORKINGDIR}/(a){COMPONENT}/build.xml"
type="file" />
@@ -465,6 +468,11 @@
</then>
</if>
+ <!-- If poms already exist, DO NOT OVERWRITE unless
-Doverwrite.existing.pom.xml=true -->
+ <ant antfile="genpom.xml" target="run"
dir="${WORKINGDIR}">
+ <property name="COMPONENT" value="@{COMPONENT}" />
+ </ant>
+
<antcall target="mvn">
<param name="COMPONENT" value="@{COMPONENT}" />
</antcall>
@@ -664,9 +672,9 @@
</target>
<!-- Used to build the overall update site for all components; requires a custom
site.xml (generated from category.*.xml) and previously checked in pom.xml -->
- <target name="create.overall.update.site" depends="init">
+ <target name="create.overall.update.site" depends="init"
unless="no.overall">
<if>
- <isset property="no.builds.run" />
+ <isset property="no.overall" />
<then>
<echo>All components up to date: nothing to do!
To force a build of unchanged components, use
-Dbuild.if.sources.unchanged=true</echo>
@@ -674,8 +682,7 @@
<else>
<property name="update.site.path" value="site" />
- <!-- Clean up from last time, then fetch fresh sources (checkout or update)
-->
- <delete dir="${WORKINGDIR}/${update.site.path}/target"
quiet="true" />
+ <!-- Fetch fresh sources (checkout or update) -->
<antcall target="get.sources">
<param name="COMPONENT" value="site" />
</antcall>
@@ -715,6 +722,9 @@
<target name="build.update.site">
<property name="update.site.path" value="site" />
+ <!-- without deleting previous target dir, update sites may end up missing all
plugins and features! -->
+ <delete dir="${WORKINGDIR}/${update.site.path}/target"
includeemptydirs="true" quiet="true" />
+
<if>
<equals arg1="${update.site.path}" arg2="site" />
<then>
@@ -922,6 +932,66 @@
<var name="artifactJar" unset="true" />
</target>
+ <!-- unpack previously built & jarred plugin jars -->
+ <target name="unjarPlugins">
+ <for param="artifactJar">
+ <path>
+ <fileset dir="${WORKINGDIR}/${COMPONENT}/plugins/"
includes="*.jar" />
+ </path>
+ <sequential>
+ <antcallback target="get.artifact.id"
return="artifact.id">
+ <property name="artifactJar" value="@{artifactJar}" />
+ <property name="regexp.path"
value=".+/plugins/([^/]+.+\.jar)" />
+ </antcallback>
+ <unzip src="@{artifactJar}"
dest="${WORKINGDIR}/${COMPONENT}/plugins/${artifact.id}"
overwrite="true" />
+ <var name="artifact.id" unset="true" />
+ </sequential>
+ </for>
+ </target>
+
+ <!-- for a given ${COMPONENT} dir, switch all plugin/feature manifests from .SNAPSHOT
to .qualifier -->
+ <target name="snapshot2qualifier">
+ <property name="COMPONENT" value="" />
+ <for param="artifactManifest">
+ <path>
+ <fileset dir="${WORKINGDIR}/${COMPONENT}"
+ excludes="**/target/**"
+ includes="**/plugins/**/**/MANIFEST.MF,
**/features/**/feature.xml"
+ />
+ </path>
+ <sequential>
+ <loadfile property="artifact.file"
srcfile="@{artifactManifest}">
+ <filterchain>
+ <replaceregex pattern="([0-9]+).SNAPSHOT"
replace="\1.qualifier" />
+ </filterchain>
+ </loadfile>
+ <echo file="@{artifactManifest}" message="${artifact.file}"
/>
+ <var name="artifact.file" unset="true" />
+ </sequential>
+ </for>
+ </target>
+
+ <!-- include a build.properties file if one not provided -->
+ <target name="genBuildProperties">
+ <for param="artifactDir">
+ <path>
+ <dirset dir="${WORKINGDIR}/${COMPONENT}/features/" />
+ <dirset dir="${WORKINGDIR}/${COMPONENT}/plugins/" />
+ </path>
+ <sequential>
+ <if>
+ <not>
+ <available file="(a){artifactDir}/build.properties"
type="file" />
+ </not>
+ <then>
+ <echo file="(a){artifactDir}/build.properties">bin.includes =
feature.*, ., plugin.*, about.*, META-INF/, .options/, lib/, help/, icons/, org/, src/
+</echo>
+ </then>
+ </if>
+ </sequential>
+ </for>
+ </target>
+
<!-- TODO: figure out why this fails with error:
insecure -e option not allowed.
This account is restricted by rssh.
@@ -1390,7 +1460,7 @@
<delete file="${WORKINGDIR}/svn.info-tests.txt" />
<delete file="${WORKINGDIR}/svn.info-xulrunner.txt" />
<touch file="${WORKINGDIR}/common/pom.xml" />
- <var name="COMPONENTS.to.build" unset="true"/>
+ <var name="COMPONENTS.to.build" unset="true" />
<antcall target="get.sources" />
<for param="expected.dir" list="${get.sources.expected.dirs}"
delimiter=",
">
@@ -1429,7 +1499,7 @@
<echo level="info">
5/6: Test info w/o update</echo>
- <var name="COMPONENTS.to.build" unset="true"/>
+ <var name="COMPONENTS.to.build" unset="true" />
<antcall target="get.sources" />
<for param="expected.dir" list="${get.sources.expected.dirs}"
delimiter=",
">
Added: branches/modular_build/drools/build.xml
===================================================================
--- branches/modular_build/drools/build.xml (rev 0)
+++ branches/modular_build/drools/build.xml 2010-05-05 22:41:27 UTC (rev 21929)
@@ -0,0 +1,34 @@
+<project default="custom.build" name="jbosstools drools
build.xml">
+
+ <!-- customize as needed -->
+ <property name="drools.zip"
value="drools-5.1.0.SNAPSHOT-eclipse-all.zip" />
+
+ <target name="custom.build"
+ description="fetch latest drools from their Hudson build + selectively
unpack it"
+ depends="init"
+ >
+ <get
src="http://hudson.qa.jboss.com/hudson/job/drools/lastStableBuild/ar...
+ dest="${WORKINGDIR}/${COMPONENT}/${drools.zip}"
+ usetimestamp="true"
+ />
+ <unzip src="${WORKINGDIR}/${COMPONENT}/${drools.zip}"
dest="${WORKINGDIR}/${COMPONENT}" overwrite="true" />
+
+ <ant antfile="${build.xml}" target="unjarPlugins">
+ <property name="COMPONENT" value="${COMPONENT}" />
+ </ant>
+
+ <ant antfile="${build.xml}" target="snapshot2qualifier">
+ <property name="COMPONENT" value="${COMPONENT}" />
+ </ant>
+
+ <ant antfile="${build.xml}" target="genBuildProperties">
+ <property name="COMPONENT" value="${COMPONENT}" />
+ </ant>
+ </target>
+
+ <target name="init">
+ <property name="build.xml" value="${WORKINGDIR}/build.xml"
/>
+ <ant antfile="${build.xml}" target="init" />
+ </target>
+
+</project>
Property changes on: branches/modular_build/drools/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/modular_build/site/category.JBDS.xml
===================================================================
--- branches/modular_build/site/category.JBDS.xml 2010-05-05 22:05:36 UTC (rev 21928)
+++ branches/modular_build/site/category.JBDS.xml 2010-05-05 22:41:27 UTC (rev 21929)
@@ -101,14 +101,22 @@
<category name="DataTools" />
<category name="GeneralTools" />
</feature>
- <!-- TODO add Drools back into site -->
- <!-- <feature url="features/org.drools.eclipse.feature_0.0.0.jar"
id="org.drools.eclipse.feature"
- version="0.0.0"> <category name="AllTools"/> <category
name="SOATools"/>
- <category name="GeneralTools"/> </feature> <feature
url="features/org.drools.eclipse.task.feature_0.0.0.jar"
- id="org.drools.eclipse.task.feature" version="0.0.0">
<category name="AllTools"/>
- <category name="SOATools"/> </feature> <feature
url="features/org.guvnor.tools.feature_0.0.0.jar"
- id="org.guvnor.tools.feature" version="0.0.0"> <category
name="AllTools"/>
- <category name="SOATools"/> </feature> -->
+ <feature url="features/org.drools.eclipse.feature_0.0.0.jar"
id="org.drools.eclipse.feature" version="0.0.0">
+ <category name="AllTools" />
+ <category name="SOATools" />
+ <category name="GeneralTools" />
+ </feature>
+ <feature url="features/org.drools.eclipse.task.feature_0.0.0.jar"
+ id="org.drools.eclipse.task.feature"
+ version="0.0.0"
+ >
+ <category name="AllTools" />
+ <category name="SOATools" />
+ </feature>
+ <feature url="features/org.guvnor.tools.feature_0.0.0.jar"
id="org.guvnor.tools.feature" version="0.0.0">
+ <category name="AllTools" />
+ <category name="SOATools" />
+ </feature>
<feature url="features/org.jboss.tools.project.examples.feature_0.0.0.jar"
id="org.jboss.tools.project.examples.feature"
version="0.0.0"
Modified: branches/modular_build/site/category.JBossTools.xml
===================================================================
--- branches/modular_build/site/category.JBossTools.xml 2010-05-05 22:05:36 UTC (rev
21928)
+++ branches/modular_build/site/category.JBossTools.xml 2010-05-05 22:41:27 UTC (rev
21929)
@@ -102,14 +102,22 @@
<category name="DataTools" />
<category name="GeneralTools" />
</feature>
- <!-- TODO add Drools back into site -->
- <!-- <feature url="features/org.drools.eclipse.feature_0.0.0.jar"
id="org.drools.eclipse.feature"
- version="0.0.0"> <category name="AllTools"/> <category
name="SOATools"/>
- <category name="GeneralTools"/> </feature> <feature
url="features/org.drools.eclipse.task.feature_0.0.0.jar"
- id="org.drools.eclipse.task.feature" version="0.0.0">
<category name="AllTools"/>
- <category name="SOATools"/> </feature> <feature
url="features/org.guvnor.tools.feature_0.0.0.jar"
- id="org.guvnor.tools.feature" version="0.0.0"> <category
name="AllTools"/>
- <category name="SOATools"/> </feature> -->
+ <feature url="features/org.drools.eclipse.feature_0.0.0.jar"
id="org.drools.eclipse.feature" version="0.0.0">
+ <category name="AllTools" />
+ <category name="SOATools" />
+ <category name="GeneralTools" />
+ </feature>
+ <feature url="features/org.drools.eclipse.task.feature_0.0.0.jar"
+ id="org.drools.eclipse.task.feature"
+ version="0.0.0"
+ >
+ <category name="AllTools" />
+ <category name="SOATools" />
+ </feature>
+ <feature url="features/org.guvnor.tools.feature_0.0.0.jar"
id="org.guvnor.tools.feature" version="0.0.0">
+ <category name="AllTools" />
+ <category name="SOATools" />
+ </feature>
<feature url="features/org.jboss.tools.project.examples.feature_0.0.0.jar"
id="org.jboss.tools.project.examples.feature"
version="0.0.0"