Author: nickboldt
Date: 2010-05-01 11:11:28 -0400 (Sat, 01 May 2010)
New Revision: 21846
Modified:
branches/modular_build/build/build.xml
branches/modular_build/genpom.xml
Log:
prelim update site : fix support for genpom for update site; include update site
generation at end of build process
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-01 15:10:04 UTC (rev 21845)
+++ branches/modular_build/build/build.xml 2010-05-01 15:11:28 UTC (rev 21846)
@@ -59,6 +59,7 @@
</for>
</target>
+ <!-- TODO: enable create.overall.update.site task -->
<target name="run"
depends="init, get.bootstrap.scripts, get.sources, get.components.to.build,
run.build, collect.all.test.results"
/>
@@ -342,7 +343,7 @@
<target name="run.build">
<!-- could set -Dmaven.test.skip to skip tests, or use osgi-test:test to just
(re-)run tests w/o first building -->
- <property name="MAVEN_FLAGS" value="clean install -B -fn -q"
/>
+ <property name="MAVEN_FLAGS" value="install -B -fn -q" />
<for param="COMPONENT" list="${COMPONENTS.to.build}"
delimiter=",
">
<sequential>
@@ -531,11 +532,40 @@
</if>
</target>
+ <!-- TODO: generate site.xml files for each component from generated site.xml -->
+ <target name="create.update.site">
+ </target>
- <!-- TODO: generate site.xml files for components: gensite.xml script called by
build.xml -->
- <!-- TODO: zip up update site zips for each component; publish to
download.jboss.org
as part of deploy task -->
- <target name="zip.sites">
+ <!-- TODO: exclude test plugins/features from zip -->
+ <target name="create.overall.update.site" depends="init">
+ <delete dir="${WORKINGDIR}/site/target/site" includes="artifacts.*,
content.*" quiet="true" />
+ <delete dir="${WORKINGDIR}/site/target/site/features"
includeemptydirs="true" quiet="true" />
+ <mkdir dir="${WORKINGDIR}/site/target/site/features" />
+ <copy todir="${WORKINGDIR}/site/target/site/features"
flatten="true">
+ <fileset dir="${WORKINGDIR}"
includes="**/target/*feature_*.jar,**/target/*feature*SNAPSHOT.jar" />
+ </copy>
+
+ <delete dir="${WORKINGDIR}/site/target/site/plugins"
includeemptydirs="true" quiet="true" />
+ <mkdir dir="${WORKINGDIR}/site/target/site/plugins" />
+ <copy todir="${WORKINGDIR}/site/target/site/plugins"
flatten="true">
+ <fileset dir="${WORKINGDIR}"
+
excludes="**/target/*feature_*.jar,**/target/*feature*SNAPSHOT.jar"
+ includes="**/target/*_*.jar,**/target/*-SNAPSHOT.jar"
+ />
+ </copy>
+
+ <!-- Call maven to generate pom.xml, then build site from site.xml -->
+ <antcall target="run.build">
+ <param name="COMPONENTS.to.build" value="site" />
+ <param name="MAVEN_FLAGS" value="verify -B -fae
-Dmaven.test.skip" />
+ </antcall>
+
+ <!-- delete pointless empty site.zip (contains only site.xml) -->
+ <delete file="${WORKINGDIR}/site/target/site.zip"/>
+
+ <!-- create real update site zip -->
+ <zip destfile="${WORKINGDIR}/site/target/JBossTools-Update.zip"
basedir="${WORKINGDIR}/site/target/site" update="false"/>
</target>
<!-- TODO: figure out why this fails with error:
Modified: branches/modular_build/genpom.xml
===================================================================
--- branches/modular_build/genpom.xml 2010-05-01 15:10:04 UTC (rev 21845)
+++ branches/modular_build/genpom.xml 2010-05-01 15:11:28 UTC (rev 21846)
@@ -322,6 +322,17 @@
<dirset dir="@{dir}" excludes="${dirsToExclude}"
includes="*" />
</path>
</then>
+ <elseif>
+ <equals arg1="${COMPONENT}" arg2="site" />
+ <then>
+ <dirname property="parent.dir" file="@{dir}" />
+ <path id="trunkDir">
+ <dirset dir="${parent.dir}" includes="site"/>
+ </path>
+ <var name="parent.dir" unset="true"/>
+ <var name="pathToParentPom"
value="${pathToParentPom}site/"/>
+ </then>
+ </elseif>
<else>
<path id="trunkDir">
<dirset dir="@{dir}/${pathToParentPom}"
@@ -342,12 +353,19 @@
<!-- a plugin, feature, or update site dir -->
<available file="(a){subdir}/META-INF/MANIFEST.MF"
type="file" />
<available file="(a){subdir}/feature.xml" type="file" />
- <available file="(a){subdir}/site.xml" type="file" />
</or>
<then>
<!-- valid place to create a pom -->
<writeModulePom dir="@{subdir}"
parentpom="../${pathToParentPom}@{parentpom}" />
</then>
+ <elseif>
+ <available file="(a){subdir}/site.xml" type="file" />
+ <then>
+ <!-- valid place to create a pom -->
+ <echo level="debug">writeModulePom dir="@{subdir}"
parentpom="${pathToParentPom}@{parentpom}"</echo>
+ <writeModulePom dir="@{subdir}"
parentpom="${pathToParentPom}@{parentpom}" />
+ </then>
+ </elseif>
<else>
<for list="plugins tests features site" param="type"
delimiter=" ">
<sequential>
@@ -753,17 +771,17 @@
<property name="ant.enable.asserts" value="true" />
<!-- expected values for artifactVersion tests -->
- <property name="artifactVersion.esb/features/org.jboss.tools.esb.feature"
value="1.0.0" />
- <property
name="artifactVersion.as/tests/org.jboss.ide.eclipse.as.archives.integration.test"
value="1.0.0" />
- <property name="artifactVersion.esb/plugins/org.jboss.tools.esb.core"
value="2.0.0" />
+ <property name="artifactVersion.esb/features/org.jboss.tools.esb.feature"
value="1.3.0-SNAPSHOT" />
+ <property
name="artifactVersion.as/tests/org.jboss.ide.eclipse.as.archives.integration.test"
value="2.1.0-SNAPSHOT" />
+ <property name="artifactVersion.esb/plugins/org.jboss.tools.esb.core"
value="1.3.0-SNAPSHOT" />
<property
name="artifactVersion.bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui"
value="0.5.0-SNAPSHOT" />
<property
name="artifactVersion.bpel/features/org.jboss.tools.bpel.sdk.feature"
value="1.0.0-SNAPSHOT" />
<property name="artifactVersion.bpel/plugins/org.eclipse.bpel.xpath10"
value="0.5.0-SNAPSHOT" />
- <property
name="artifactVersion.vpe/plugins/org.jboss.tools.vpe.ui.palette"
value="2.1.0" />
- <property
name="artifactVersion.tests/features/org.jboss.tools.test.feature"
value="2.0.0" />
- <property
name="artifactVersion.portlet/features/org.jboss.tools.portlet.test.feature"
value="1.0.0" />
- <property name="artifactVersion.jst/features/org.jboss.tools.jst.feature"
value="2.0.0" />
- <property
name="artifactVersion.jst/features/org.jboss.tools.jst.web.tiles.feature"
value="2.0.0" />
+ <property
name="artifactVersion.vpe/plugins/org.jboss.tools.vpe.ui.palette"
value="3.1.0-SNAPSHOT" />
+ <property
name="artifactVersion.tests/features/org.jboss.tools.test.feature"
value="3.1.0-SNAPSHOT" />
+ <property
name="artifactVersion.portlet/features/org.jboss.tools.portlet.test.feature"
value="1.1.0-SNAPSHOT" />
+ <property name="artifactVersion.jst/features/org.jboss.tools.jst.feature"
value="3.1.0-SNAPSHOT" />
+ <property
name="artifactVersion.jst/features/org.jboss.tools.jst.web.tiles.feature"
value="3.1.0-SNAPSHOT" />
<!-- expected values for artifactId tests -->
<property name="artifactId.esb/features/org.jboss.tools.esb.feature"
value="org.jboss.tools.esb.feature" />