[jbosstools-commits] JBoss Tools SVN: r41507 - in trunk/build: aggregate and 1 other directory.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Tue May 29 04:37:48 EDT 2012
Author: mickael_istria
Date: 2012-05-29 04:37:47 -0400 (Tue, 29 May 2012)
New Revision: 41507
Removed:
trunk/build/aggregate/DEPRECATED_bottests-site/
trunk/build/build-DEPRECATED.xml
trunk/build/pom-core.xml.DEPRECATED.use.pom.xml.instead.for.Core.builds
trunk/build/pom-disabled-components.xml.DEPRECATED
trunk/build/publish.sh
trunk/build/publishComponentZipToStaging.sh
trunk/build/publishUpdateZipToStaging.sh
Log:
Clean deprecated
Deleted: trunk/build/build-DEPRECATED.xml
===================================================================
--- trunk/build/build-DEPRECATED.xml 2012-05-29 08:31:32 UTC (rev 41506)
+++ trunk/build/build-DEPRECATED.xml 2012-05-29 08:37:47 UTC (rev 41507)
@@ -1,2064 +0,0 @@
-<project default="run" basedir="." name="build.xml to wrap maven">
-<!--
- This file is deprecated per JBIDE-10690 - if nothing breaks after renaming this file, it will be safe to delete.
- Note that the "init" target has been reimplemented in build/results/build.xml and build/aggregate/build.xml, and that the
- "collect.test.results.for.hudson" target has moved to build/results/collect-test-results.xml
--->
-
- <!-- ****************************** Configuration ****************************** -->
-
- <!-- default maven version -->
- <property name="maven.version" value="3.0.4" />
-
- <!-- set name of component(s) to build+test, IN ORDER; if no subcomponents, use "." -->
- <property name="COMPONENTS"
- value="tests,common;
- flow,jbpm;
- jmx,archives,as;
- bpel,smooks,freemarker,profiler,portlet,modeshape;
- xulrunner,jst,vpe,jsf;
- drools,esb,ws;
- cdi,struts,hibernatetools,seam;
- examples,birt;
- maven"
- />
-
- <!-- svn root, including trunk or branch path -->
- <property name="svn.root" value="http://anonsvn.jboss.org/repos/jbosstools/trunk" />
-
- <!-- if true, use -Dmaven.repo.local=${COMMON_TOOLS}/m2-repository; if false, use default ~/.m2/repository; or set another path if preferred -->
- <property name="maven.repo.local" value="true" />
-
- <!-- name/version we're building -->
- <property name="product.name" value="JBoss Tools" />
- <property name="product.id" value="JBossTools" />
- <property name="product.version" value="3.2.0-beta-1" />
- <!--
- <property name="product.name" value="JBoss Developer Studio"/>
- <property name="product.id" value="JBDS"/>
- <property name="product.version" value="3.1.0-beta-1"/>
- -->
-
- <!-- TODO: connect build type (snapshot, milestone, release) to update site description (nightly, milestone, stable) -->
- <!-- update site description :: not used if site.xml already present -->
- <property name="update.site.description" value="Nightly Build" />
-
- <!-- ****************************** Usage Instructions ****************************** -->
- <target name="help" description="Usage Instructions" depends="init">
- <echo>
-To run this script in Eclipse:
- Run As > Ant Build
-
-To run this script via commandline (build default modules + run tests, then collect test results and build per-component + overall update site zips):
- cd /path/to/checked/out/source/tree; ant
-
-or, to build everything but not *run* the tests:
- ant -DMAVEN_FLAGS="clean install -Dmaven.test.skip"
- or
- ant -Dnotests=true
-
-or, to purge the local repo (or purge then build):
- ant purge -q
- or
- ant clean-run
-
-or, to rebuild even if sources have not changed:
- ant -Dbuild.if.sources.unchanged=true
-
-or, to fetch fresh sources, then build anew:
- ant -Dclean.sources=true
-
-or, to (re-)run tests w/o (re-)building first:
- ant -DMAVEN_FLAGS="osgi-test:test -B -fn"
-
-or, to build, test, and install 1 or more specific module(s):
- ant -DCOMPONENTS=tests,common,flow,jbpm
-
-or, to re-build a single component's update site w/o building, testing, and installing it into the m2 repo:
- ant -DCOMPONENT=jmx create.update.site
-
-or, to re-build the overall update site w/o building first (no applicable when COMPONENTS=.):
- ant create.overall.update.site -Dbuild.if.sources.unchanged=true
-
-To have hudson manage sources (rather than having this script checkout/update them) use:
- -Dhudson.managed.sources=true
-
-Note: if tests stall on Linux, install Xvfb and this script will use that to run Maven, unless use:
- -DnoXvfb=true
-
-Here is the order in which components must be built:
-</echo>
- <for param="COMPONENT" list="${COMPONENTS}" delimiter=";">
- <sequential>
- <echo message=" @{COMPONENT}," />
- </sequential>
- </for>
- </target>
-
- <!-- ******************* MAIN ENTRY TARGETS ******************* -->
- <target name="clean-run" description="purge m2 repo, then run build" depends="purge, run" />
-
- <target name="purge" depends="init">
- <antcall target="genPomXml">
- <param name="COMPONENT" value="purge" />
- <param name="packaging" value="pom" />
- </antcall>
- <antcall target="mvn">
- <param name="COMPONENT" value="purge" />
- <param name="MAVEN_DIR" value="${WORKINGDIR}/purge/site" />
- <param name="MAVEN_FLAGS" value="dependency:purge-local-repository -e -U -q -B -fae" />
- <param name="noXvfb" value="true" />
- </antcall>
- <delete dir="${WORKINGDIR}/purge" includeemptydirs="true" quiet="true" />
- <delete dir="${COMMON_TOOLS}/m2-repository/org/jboss/tools" includeemptydirs="true" quiet="true" />
- </target>
-
- <target name="run"
- description="run a build, collect test results, generate overall update site"
- depends="build, collect.all.test.results, create.overall.update.site, collect.update.site.results"
- />
-
- <target name="build"
- description="run a build"
- depends="init, get.bootstrap.scripts, get.sources, get.components.to.build, run.build"
- />
-
- <target name="test"
- description="run tests w/o first getting sources + list of components to build; assumes an upstream build job was already run"
- depends="init, get.bootstrap.scripts, get.all.components, run.build, collect.all.test.results"
- />
-
- <!-- ******************* MAIN ENTRY TARGETS ******************* -->
-
- <!-- override for local build -->
- <condition property="isInHudson" value="true">
- <or>
- <contains string="${user.dir}" substring="hudson" />
- <contains string="${user.name}" substring="hudson" />
- <contains string="${user.home}" substring="hudson" />
- </or>
- </condition>
- <target name="local" unless="isInHudson">
- <property name="WORKINGDIR" value="${basedir}" />
- <property name="COMMON_TOOLS" value="${java.io.tmpdir}" />
- </target>
-
- <target name="get.ant-contrib" unless="ant-contrib.jar.exists">
- <property name="ANTCONTRIB_MIRROR" value="http://downloads.sourceforge.net/ant-contrib/" />
- <get usetimestamp="true"
- dest="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip"
- src="${ANTCONTRIB_MIRROR}/ant-contrib-1.0b2-bin.zip"
- />
- <touch file="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip" />
- <mkdir dir="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_" />
- <unzip src="${COMMON_TOOLS}/ant-contrib-1.0b2-bin.zip"
- dest="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_"
- overwrite="true"
- />
- <copy file="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_/ant-contrib/lib/ant-contrib.jar"
- tofile="${COMMON_TOOLS}/ant-contrib.jar"
- failonerror="true"
- />
- <delete dir="${java.io.tmpdir}/ant-contrib-1.0b2-bin.zip_" includeemptydirs="true" quiet="true" />
- </target>
-
- <target name="get.svnant" unless="svnant.jar.exists">
- <echo level="debug">${os.name}, ${os.arch}, ${os.version}, ${osgi.os}</echo>
- <property name="SVNANT_MIRROR" value="http://www.tigris.org/files/documents/906/46267" />
- <if>
- <istrue value="${isWindows}" />
- <then>
- <var name="svnant.enabled" unset="true" />
- <var name="svnant.enabled" value="false" />
- </then>
- <else>
- <exec executable="wget" dir="${COMMON_TOOLS}">
- <arg line="${SVNANT_MIRROR}/svnant-1.3.0.zip --no-clobber" />
- </exec>
- </else>
- </if>
-
- <if>
- <istrue value="${svnant.enabled}" />
- <then>
- <if>
- <available file="${COMMON_TOOLS}/svnant-1.3.0.zip" type="file" />
- <then>
- <touch file="${COMMON_TOOLS}/svnant-1.3.0.zip" />
- <mkdir dir="${java.io.tmpdir}/svnant-1.3.0.zip_" />
- <unzip src="${COMMON_TOOLS}/svnant-1.3.0.zip"
- dest="${java.io.tmpdir}/svnant-1.3.0.zip_"
- overwrite="true"
- />
- <copy todir="${COMMON_TOOLS}" failonerror="true">
- <fileset dir="${java.io.tmpdir}/svnant-1.3.0.zip_/svnant-1.3.0/lib/" includes="*.jar" />
- </copy>
- <delete dir="${java.io.tmpdir}/svnant-1.3.0.zip_" includeemptydirs="true" quiet="true" />
- </then>
- <elseif>
- <or>
- <not>
- <available file="${COMMON_TOOLS}/svnant.jar" type="file" />
- </not>
- <not>
- <available file="${COMMON_TOOLS}/svnkit.jar" type="file" />
- </not>
- <not>
- <available file="${COMMON_TOOLS}/svnClientAdapter.jar" type="file" />
- </not>
- </or>
- <then>
- <fail>Error!
-Build cannot proceed!
- Must install svnant.jar, svnkit.jar + svnClientAdapter.jar from
- ${SVNANT_MIRROR}/svnant-1.3.0.zip
- into ${COMMON_TOOLS}/.
-</fail>
- </then>
- </elseif>
- </if>
- </then>
- <else>
- <echo level="warning">Warning!
-Svnant unavailable. Will use Maven to fetch sources.
-</echo>
- </else>
- </if>
- </target>
-
- <target name="get.maven" unless="maven.exists">
- <property name="MAVEN_MIRROR" value="http://mirror.csclub.uwaterloo.ca/apache/maven/binaries" />
- <get usetimestamp="true"
- dest="${COMMON_TOOLS}/apache-maven-${maven.version}-bin.tar.gz"
- src="${MAVEN_MIRROR}/apache-maven-${maven.version}-bin.tar.gz"
- />
- <untar compression="gzip"
- overwrite="false"
- dest="${COMMON_TOOLS}"
- src="${COMMON_TOOLS}/apache-maven-${maven.version}-bin.tar.gz"
- />
- <chmod perm="755" file="${COMMON_TOOLS}/apache-maven-${maven.version}/bin/mvn" />
- </target>
-
- <target name="init" depends="local">
- <macrodef name="now">
- <attribute name="level" default="warning" />
- <text name="info" optional="true" />
- <sequential>
- <var name="now" unset="true" />
- <tstamp>
- <format property="now" pattern="hh:mm:ss" />
- </tstamp>
- <echo level="@{level}">${now} @{info}</echo>
- </sequential>
- </macrodef>
-
- <condition property="isWindows" value="true" else="false">
- <or>
- <os family="windows" />
- <contains string="${os.name}" substring="windows" casesensitive="false" />
- </or>
- </condition>
-
- <!-- https://jira.jboss.org/jira/browse/JBQA-3313 Use static, shared space outside workspace, instead of working directly in the workspace -->
- <condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources" else="${basedir}">
- <available file="/home/hudson/static_build_env/jbds" type="dir" />
- </condition>
- <mkdir dir="${WORKINGDIR}" />
- <echo level="info">WORKINGDIR = ${WORKINGDIR}</echo>
-
- <condition property="COMMON_TOOLS"
- value="/home/hudson/static_build_env/jbds/tools"
- else="${WORKINGDIR}/../tools"
- >
- <available file="/home/hudson/static_build_env/jbds" type="dir" />
- </condition>
- <mkdir dir="${COMMON_TOOLS}" />
- <echo level="info">COMMON_TOOLS = ${COMMON_TOOLS}</echo>
-
- <available file="${COMMON_TOOLS}/ant-contrib.jar" type="file" property="ant-contrib.jar.exists" />
- <antcall target="get.ant-contrib" />
- <taskdef resource="net/sf/antcontrib/antlib.xml">
- <classpath>
- <pathelement location="${COMMON_TOOLS}/ant-contrib.jar" />
- </classpath>
- </taskdef>
-
- <property name="svnant.enabled" value="true" />
- <available file="${COMMON_TOOLS}/svnant.jar" type="file" property="svnant.jar.exists" />
- <antcall target="get.svnant" />
- <taskdef resource="org/tigris/subversion/svnant/svnantlib.xml">
- <classpath>
- <pathelement location="${COMMON_TOOLS}/svnant.jar" />
- <pathelement location="${COMMON_TOOLS}/svnkit.jar" />
- <pathelement location="${COMMON_TOOLS}/svnClientAdapter.jar" />
- </classpath>
- </taskdef>
-
- <available file="${COMMON_TOOLS}/apache-maven-${maven.version}/bin/mvn" type="file" property="maven.exists" />
- <antcall target="get.maven" />
- </target>
-
- <target name="get.sources" description="if sources not already on disk, fetch them" unless="hudson.managed.sources">
- <property name="clean.sources" value="false" />
- <property name="svn.recurse" value="true" />
-
- <!-- = = = = = = = = = = = = = = = = =
- COMPONENT: component to fetch or update
- op: up (update) or co (checkout)
- = = = = = = = = = = = = = = = = = -->
- <macrodef name="svn.fetch">
- <attribute name="component" />
- <attribute name="op" />
- <sequential>
- <!-- check out or update -->
- <if>
- <equals arg1="@{op}" arg2="up" />
- <then>
- <now level="info">Update '@{COMPONENT}'</now>
- <if>
- <istrue value="${svnant.enabled}" />
- <then>
- <!-- remove generated site/ folder?
- <if>
- <not>
- <equals arg1="@{component}" arg2="." />
- </not>
- <then>
- <delete dir="${WORKINGDIR}/@{component}/site"
- includeemptydirs="true"
- quiet="true"
- />
- </then>
- -->
- <!--
- <svn javahl="false" svnkit="true" failonerror="false">
- <revert recurse="${svn.recurse}" dir="@{component}" />
- </svn>
- -->
- <svn javahl="false" svnkit="true" failonerror="false">
- <update recurse="${svn.recurse}" dir="@{component}" />
- </svn>
- </then>
- <else>
- <antcall target="mvn">
- <param name="MAVEN_DIR" value="${WORKINGDIR}" />
- <param name="MAVEN_FLAGS"
- value="scm:update -f ${WORKINGDIR}/parent-pom.xml -e -q -B -fae -Dmaven.test.skip -DworkingDirectory=${WORKINGDIR}/@{component} -DconnectionUrl=scm:svn:${svn.root}/@{component} -DdeveloperConnectionUrl=scm:svn:${svn.root}/@{component}"
- />
- <param name="noXvfb" value="true" />
- </antcall>
- </else>
- </if>
- </then>
- <else>
- <now level="info">Fetch sources from ${svn.root}/@{component} into ${WORKINGDIR}/@{component}</now>
- <if>
- <istrue value="${svnant.enabled}" />
- <then>
- <svn javahl="false" svnkit="true" failonerror="true">
- <checkout recurse="${svn.recurse}"
- url="${svn.root}/@{component}"
- destpath="${WORKINGDIR}/@{component}"
- />
- </svn>
- </then>
- <else>
- <antcall target="mvn">
- <param name="MAVEN_DIR" value="${WORKINGDIR}" />
- <param name="MAVEN_FLAGS"
- value="scm:checkout -f ${WORKINGDIR}/parent-pom.xml -e -q -B -fae -Dmaven.test.skip -DskipCheckoutIfExists=true -DcheckoutDirectory=${WORKINGDIR}/@{component} -DworkingDirectory=${WORKINGDIR}/@{component} -DconnectionUrl=scm:svn:${svn.root}/@{component} -DdeveloperConnectionUrl=scm:svn:${svn.root}/@{component}"
- />
- <param name="noXvfb" value="true" />
- </antcall>
- </else>
- </if>
- </else>
- </if>
-
- <!-- Store svn info so we can compare it later and thus not need to update or checkout every time -->
- <if>
- <istrue value="${svnant.enabled}" />
- <then>
- <svn javahl="false" svnkit="true" failonerror="false">
- <info target="${WORKINGDIR}/@{component}"
- propprefix="svn.info.@{component}"
- verbose="false"
- />
- </svn>
- </then>
- </if>
- <if>
- <isset property="svn.info.@{component}.rev" />
- <then>
- <echo file="${WORKINGDIR}/svn.info-@{component}.txt">svn.info.@{component}.rev = ${svn.info.@{component}.rev}
-</echo>
- </then>
- </if>
- <echo file="${WORKINGDIR}/build.cfg" message="@{component}," append="true" />
- </sequential>
- </macrodef>
-
- <!-- only reset the file if we don't already have a value for COMPONENTS.to.build; thus when called later for "site" component build, append instead of overwriting -->
- <if>
- <not>
- <isset property="COMPONENTS.to.build" />
- </not>
- <then>
- <echo file="${WORKINGDIR}/build.cfg" message="COMPONENTS.to.build = " />
- </then>
- </if>
- <!-- check for each component dir in ${WORKINGDIR}; if not found, fetch -->
- <if>
- <and>
- <isset property="COMPONENT" />
- <not>
- <equals arg1="${COMPONENT}" arg2="" />
- </not>
- </and>
- <then>
- <var name="COMPONENTS" unset="true" />
- <var name="COMPONENTS" value="${COMPONENT}" />
- </then>
- </if>
- <for param="COMPONENT" list="${COMPONENTS}" delimiter=",;
- ">
- <sequential>
- <if>
- <equals arg1="${clean.sources}" arg2="true" />
- <then>
- <delete dir="${WORKINGDIR}/@{COMPONENT}" includeemptydirs="true" quiet="true" />
- </then>
- </if>
- <if>
- <not>
- <available file="${WORKINGDIR}/@{COMPONENT}" type="dir" />
- </not>
- <then>
- <svn.fetch component="@{COMPONENT}" op="co" />
- </then>
- <else>
- <if>
- <available file="${WORKINGDIR}/svn.info-@{COMPONENT}.txt" type="file" />
- <then>
- <property file="${WORKINGDIR}/svn.info-@{COMPONENT}.txt" />
- <!-- check svn info; if new version found, svn up -->
- <if>
- <istrue value="${svnant.enabled}" />
- <then>
- <svn javahl="false" svnkit="true" failonerror="false">
- <info target="${WORKINGDIR}/@{COMPONENT}"
- propprefix="svn.info.@{COMPONENT}.check"
- verbose="false"
- />
- </svn>
- </then>
- </if>
- <if>
- <or>
- <not>
- <isset property="svn.info.@{COMPONENT}.rev" />
- </not>
- <not>
- <isset property="svn.info.@{COMPONENT}.check.rev" />
- </not>
- <not>
- <equals arg1="${svn.info.@{COMPONENT}.rev}"
- arg2="${svn.info.@{COMPONENT}.check.rev}"
- />
- </not>
- </or>
- <then>
- <svn.fetch component="@{COMPONENT}" op="up" />
- </then>
- <else>
- <if>
- <and>
- <isset property="build.if.sources.unchanged" />
- <istrue value="${build.if.sources.unchanged}" />
- </and>
- <then>
- <svn.fetch component="@{COMPONENT}" op="up" />
- </then>
- </if>
- </else>
- </if>
- </then>
- <else>
- <svn.fetch component="@{COMPONENT}" op="up" />
- </else>
- </if>
- </else>
- </if>
- </sequential>
- </for>
-
- </target>
-
- <target name="get.bootstrap.scripts">
- <!-- also get files required to bootstrap the build -->
- <get src="${svn.root}/parent-pom.xml" dest="${WORKINGDIR}/parent-pom.xml" usetimestamp="true" />
- <get src="${svn.root}/genpom.xml" dest="${WORKINGDIR}/genpom.xml" usetimestamp="true" />
- </target>
-
- <target name="get.all.components">
- <var name="COMPONENTS.to.build" unset="true" />
- <var name="COMPONENTS.to.build" value="" />
- <for param="COMPONENT" list="${COMPONENTS}" delimiter="; ">
- <sequential>
- <var name="COMPONENTS.to.build" value="${COMPONENTS.to.build}@{COMPONENT}," />
- </sequential>
- </for>
- </target>
-
- <target name="get.components.to.build">
- <if>
- <available file="${WORKINGDIR}/build.cfg" type="file" />
- <then>
- <property file="${WORKINGDIR}/build.cfg" />
- <if>
- <equals arg1="${COMPONENTS.to.build}" arg2="" />
- <then>
- <echo level="warning">All components up to date: nothing to do!
-To force a build of unchanged components, use -Dbuild.if.sources.unchanged=true</echo>
-
- <antcall target="create.empty.test.results.file" />
- <property name="no.tests.run" value="true" />
- <property name="no.overall" value="true" />
- </then>
- <elseif>
- <not>
- <equals arg1="${COMPONENTS.to.build}" arg2=".," />
- </not>
- <then>
- <echo level="warning">The following components' sources have changed and will be built:
- COMPONENTS.to.build = ${COMPONENTS.to.build}
-</echo>
- </then>
- </elseif>
- <elseif>
- <equals arg1="${COMPONENTS.to.build}" arg2=".," />
- <then>
- <property name="no.overall" value="true" />
- </then>
- </elseif>
- </if>
- </then>
- <else>
- <antcallback target="get.all.components" return="COMPONENTS.to.build" />
- </else>
- </if>
- </target>
-
- <!--
- To run this after a maven build in Hudson, set these properties:
- basedir=${WORKSPACE}/sources
- WORKINGDIR=${WORKSPACE}/sources
- COMPONENT=.
- move.test.results=true
- -->
- <target name="collect.test.results.for.hudson"
- depends="init"
- if="isInHudson"
- description="collect test results after a pure maven build so Hudson has something to see"
- >
- <property name="basedir" value="${WORKSPACE}/sources" />
- <property name="WORKINGDIR" value="${WORKSPACE}/sources" />
- <property name="COMPONENT" value="." />
- <property name="move.test.results" value="true" />
- <var name="tests.results.found" value="false" />
- <echo level="debug">basedir = ${basedir}
-WORKINGDIR = ${WORKINGDIR}
-COMPONENT = ${COMPONENT}</echo>
- <delete dir="${basedir}/surefire-reports/NoTestsRun" includeemptydirs="true" />
- <for param="test.xml.files" delimiter=",
- ">
- <path>
- <fileset dir="${WORKINGDIR}"
- includes="**/target/surefire-reports/TEST-*.xml, **/**/target/surefire-reports/TEST-*.xml"
- excludes="**/TEST-*NoTestsRun.xml, **/**/TEST-*NoTestsRun.xml"
- />
- </path>
- <sequential>
- <var name="tests.results.found" value="true" />
- </sequential>
- </for>
- <if>
- <equals arg1="${tests.results.found}" arg2="true" />
- <then>
- <antcall target="collect.test.results">
- <param name="COMPONENT" value="." />
- </antcall>
- <antcall target="collect.all.test.results" />
- </then>
- <else>
- <antcall target="create.empty.test.results.file" />
- <property name="no.tests.run" value="true" />
- </else>
- </if>
- </target>
-
- <target name="create.empty.test.results.file">
- <!-- create fake test result file to avoid Hudson failure -->
- <delete dir="${basedir}/surefire-reports/NoTestsRun" includeemptydirs="true" />
- <mkdir dir="${basedir}/surefire-reports/NoTestsRun" />
- <echo file="${basedir}/surefire-reports/NoTestsRun/TEST-org.jboss.tools.NoTestsRun.xml"><?xml version="1.0" encoding="UTF-8" ?>
-<testsuite failures="0" time="0.001" errors="0" skipped="0" tests="1" name="org.jboss.tools.NoTestsRun">
-<testcase time="0.001" classname="org.jboss.tools.NoTestsRun" name="NoTestsRun"/>
-</testsuite>
-</echo>
- </target>
-
- <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 -U -e" />
-
- <!-- commandline overrides to suppress doing tests -->
- <if>
- <or>
- <isset property="notest" />
- <isset property="notests" />
- <isset property="skiptest" />
- <isset property="skiptests" />
- </or>
- <then>
- <property name="noXvfb" value="true" />
- <if>
- <not>
- <contains string="${MAVEN_FLAGS}" substring="-Dmaven.test.skip" />
- </not>
- <then>
- <var name="MAVEN_FLAGS" value="${MAVEN_FLAGS} -Dmaven.test.skip" />
- </then>
- </if>
- </then>
- </if>
-
- <for param="COMPONENT" list="${COMPONENTS.to.build}" delimiter=",
- ">
- <sequential>
- <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>
- <!-- TODO if needed: optional extra instructions to do before a maven build -->
- <loadfile property="@{COMPONENT}.pom.xml" srcfile="${WORKINGDIR}/@{COMPONENT}/pom.xml" />
- <if>
- <and>
- <!-- if pom.xml does not call custom build.xml directly -->
- <not>
- <contains string="${@{COMPONENT}.pom.xml}"
- substring="<ant antfile="build.xml" />"
- />
- </not>
- <available file="${WORKINGDIR}/@{COMPONENT}/build.xml" type="file" />
- <not>
- <equals arg1="@{COMPONENT}" arg2="." />
- </not>
- </and>
- <then>
- <echo>Run custom '@{COMPONENT}/build.xml'</echo>
- <ant antfile="${WORKINGDIR}/@{COMPONENT}/build.xml">
- <property name="COMPONENT" value="@{COMPONENT}" />
- <property name="basedir" value="${WORKINGDIR}/@{COMPONENT}" />
- <property name="build.xml" value="${ant.file}" />
- </ant>
- </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>
-
- <!-- don't collect test results if there are no test results to collect! -->
- <if>
- <not>
- <contains string="${MAVEN_FLAGS}" substring="-Dmaven.test.skip" />
- </not>
- <then>
- <antcall target="collect.test.results">
- <param name="COMPONENT" value="@{COMPONENT}" />
- </antcall>
- </then>
- <else>
- <property name="no.tests.run" value="true" />
- </else>
- </if>
-
- <!-- prevent recursion: overall site component is built with create.overall.update.site, not simpler create.update.site; also, don't rebuild the site if it's already been done by "." component -->
- <if>
- <and>
- <not>
- <equals arg1="@{COMPONENT}" arg2="site" />
- </not>
- <not>
- <equals arg1="@{COMPONENT}" arg2="." />
- </not>
- </and>
- <then>
- <!-- only do this if the component's aggregate pom doesn't reference the site/ folder, and therefore hasn't already build it -->
- <loadfile property="component.pom.xml" srcfile="${WORKINGDIR}/@{COMPONENT}/pom.xml" />
- <if>
- <not>
- <contains string="${component.pom.xml}" substring="<module>site</module>" />
- </not>
- <then>
- <antcall target="create.update.site">
- <param name="COMPONENT" value="@{COMPONENT}" />
- </antcall>
- </then>
- </if>
- </then>
- </if>
- </sequential>
- </for>
- <now level="info">Builds done</now>
- </target>
-
- <target name="mvn">
- <var name="mvnExe" value="mvn" />
- <antcallback target="getMvnExe" return="mvnExe" />
- <echo level="verbose">Exe: ${COMMON_TOOLS}/apache-maven-${maven.version}/bin/${mvnExe}</echo>
- <echo level="verbose">Pom: ${WORKINGDIR}/${COMPONENT}/pom.xml</echo>
- <property name="MAVEN_DIR" value="${WORKINGDIR}/${COMPONENT}" />
- <!-- support using true/false/other path values of maven.repo.local -->
- <if>
- <isset property="maven.repo.local" />
- <then>
- <if>
- <isfalse value="${maven.repo.local}" />
- <then>
- <var name="maven.repo.local" value="" />
- </then>
- <elseif>
- <istrue value="${maven.repo.local}" />
- <then>
- <var name="maven.repo.local" value=" -Dmaven.repo.local=${COMMON_TOOLS}/m2-repository" />
- </then>
- </elseif>
- <else>
- <var name="maven.repo.local" value=" -Dmaven.repo.local=${maven.repo.local}" />
- </else>
- </if>
- </then>
- <else>
- <var name="maven.repo.local" value=" -Dmaven.repo.local=${COMMON_TOOLS}/m2-repository" />
- </else>
- </if>
- <!-- 3 hr timeout = 10800000ms -->
- <echo level="info">${mvnExe} ${MAVEN_FLAGS} ${maven.repo.local}</echo>
- <exec executable="${COMMON_TOOLS}/apache-maven-${maven.version}/bin/${mvnExe}"
- dir="${MAVEN_DIR}"
- failifexecutionfails="true"
- failonerror="true"
- timeout="10800000"
- >
- <env key="M2_HOME" value="${COMMON_TOOLS}/apache-maven-${maven.version}" />
- <env key="MAVEN_OPTS" value="-Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m" />
- <!-- more debug output with <env key="MAVEN_OPTS" value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/> -->
- <!-- <arg line="-o -Dmaven.test.skip" /> -->
- <arg line="${MAVEN_FLAGS} ${maven.repo.local}" />
- </exec>
- </target>
-
- <!-- Use Xvfb wrapper for maven when invoking UI tests -->
- <target name="getMvnExe" unless="noXvfb">
- <if>
- <available file="/usr/bin/Xvfb" type="file" />
- <then>
- <if>
- <not>
- <available file="${COMMON_TOOLS}/apache-maven-${maven.version}/bin/mvnWithXvfb" type="file" />
- </not>
- <then>
- <echo file="${COMMON_TOOLS}/apache-maven-${maven.version}/bin/mvnWithXvfb">#!/bin/bash
-if [[ -f /tmp/.X3-lock ]]; then
-kill -9 `cat /tmp/.X3-lock`
-rm -fr /tmp/.X3-lock
-fi
-/usr/bin/Xvfb :3 -ac 2>&1 1>/dev/null &
-DISPLAY=:3 /opt/maven3/bin/mvn $*
-kill -9 `cat /tmp/.X3-lock`
-rm -fr /tmp/.X3-lock
-</echo>
- <chmod perm="755" file="${COMMON_TOOLS}/apache-maven-${maven.version}/bin/mvnWithXvfb" />
- </then>
- </if>
- <var name="mvnExe" value="mvnWithXvfb" />
- </then>
- </if>
- </target>
-
- <target name="collect.test.results">
- <delete dir="${basedir}/surefire-reports/NoTestsRun" includeemptydirs="true" />
- <property name="COMPONENT" value="" />
- <!-- collect test results by copying ${WORKINGDIR}/${COMPONENT}/**/target/surefire-reports/*.xml into ${basedir}/surefire-reports/${COMPONENT} -->
- <delete dir="${basedir}/surefire-reports/${COMPONENT}" includeemptydirs="true" />
- <mkdir dir="${basedir}/surefire-reports/${COMPONENT}" />
- <copy todir="${basedir}/surefire-reports/${COMPONENT}"
- flatten="true"
- preservelastmodified="true"
- overwrite="true"
- >
- <fileset dir="${WORKINGDIR}/${COMPONENT}" includes="**/target/surefire-reports/TEST-*.xml" />
- </copy>
- <if>
- <isset property="move.test.results" />
- <then>
- <delete dir="${WORKINGDIR}/${COMPONENT}" includes="**/target/surefire-reports" />
- </then>
- </if>
- </target>
-
- <target name="collect.all.test.results" unless="no.tests.run">
- <var name="test.results.all" value="" />
- <var name="test.results.errors.failures.skipped" value="" />
-
- <!-- Parse this: <testsuite errors="0" skipped="0" tests="10" time="0.042" failures="0" name="org.jboss.tools.jmx.ui.JMXUIAllTests"> -->
- <for param="testresultfile" delimiter=",
- ">
- <path>
- <fileset dir="${basedir}/surefire-reports/" includes="**/TEST-*.xml" />
- </path>
- <sequential>
- <var name="testsuite.name" unset="true" />
- <var name="testsuite.tests" unset="true" />
- <var name="testsuite.time" unset="true" />
- <var name="testsuite.skipped" unset="true" />
- <var name="testsuite.errors" unset="true" />
- <var name="testsuite.failures" unset="true" />
- <xmlproperty file="@{testresultfile}" keepRoot="true" collapseAttributes="true" />
- <for param="ts" list="testsuite.skipped, testsuite.errors, testsuite.failures" delimiter=", ">
- <sequential>
- <propertyregex override="true"
- property="ts.label"
- defaultvalue="@{ts}"
- input="@{ts}"
- regexp="testsuite\.(.+)"
- replace="\1"
- />
- <if>
- <isset property="@{ts}" />
- <then>
- <if>
- <equals arg1="${@{ts}}" arg2="0" />
- <then>
- <var name="@{ts}" value="" />
- </then>
- <else>
- <var name="@{ts}" value="; ${@{ts}} ${ts.label}" />
- </else>
- </if>
- </then>
- </if>
-
- </sequential>
- </for>
- <if>
- <or>
- <not>
- <equals arg1="${testsuite.skipped}" arg2="" />
- </not>
- <not>
- <equals arg1="${testsuite.errors}" arg2="" />
- </not>
- <not>
- <equals arg1="${testsuite.failures}" arg2="" />
- </not>
- </or>
- <then>
- <var name="test.results.errors.failures.skipped"
- value="${test.results.errors.failures.skipped}${testsuite.name} ran ${testsuite.tests} tests in ${testsuite.time}s${testsuite.skipped}${testsuite.errors}${testsuite.failures}${line.separator}"
- />
- </then>
- </if>
- <if>
- <isset property="testsuite.name" />
- <then>
- <var name="test.results.all"
- value="${test.results.all}${testsuite.name} ran ${testsuite.tests} tests in ${testsuite.time}s${testsuite.skipped}${testsuite.errors}${testsuite.failures}${line.separator}"
- />
- </then>
- </if>
- <var name="testsuite.name" unset="true" />
- <var name="testsuite.tests" unset="true" />
- <var name="testsuite.time" unset="true" />
- <var name="testsuite.skipped" unset="true" />
- <var name="testsuite.errors" unset="true" />
- <var name="testsuite.failures" unset="true" />
- </sequential>
- </for>
- <echo level="verbose">-------------------------------------------------------
- A L L T E S T R E S U L T S
--------------------------------------------------------
-${test.results.all}
--------------------------------------------------------
-
-</echo>
- <if>
- <and>
- <isset property="test.results.errors.failures.skipped" />
- <not>
- <equals arg1="${test.results.errors.failures.skipped}" arg2="" />
- </not>
- </and>
- <then>
- <echo level="error">-------------------------------------------------------
- T E S T R E S U L T S
--------------------------------------------------------
-${test.results.errors.failures.skipped}
--------------------------------------------------------
-
-</echo>
- </then>
- </if>
- </target>
-
- <!-- collect names, dates, and contained features in all generated update site zips, including the overall one -->
- <target name="collect.update.site.results" depends="init">
- <var name="COMPONENTS.to.check" unset="" />
- <if>
- <isset property="COMPONENTS.to.build" />
- <then>
- <var name="COMPONENTS.to.check" value="${COMPONENTS.to.build}" />
- </then>
- <else>
- <var name="COMPONENTS.to.check" value="${COMPONENTS}" />
- </else>
- </if>
- <if>
- <and>
- <not>
- <equals arg1="${COMPONENTS.to.check}" arg2="." />
- </not>
- <not>
- <contains string="${COMPONENTS.to.check}" substring=",site" />
- </not>
- </and>
- <then>
- <var name="COMPONENTS.to.check" value="${COMPONENTS.to.check},site" />
- </then>
- </if>
- <for param="COMPONENT" list="${COMPONENTS.to.check}" delimiter=",;
- ">
- <sequential>
- <!-- rename any leftover site.zip files -->
- <for param="updateZip">
- <path>
- <fileset dir="${WORKINGDIR}/@{COMPONENT}" includes="**/site.zip" />
- </path>
- <sequential>
- <if>
- <equals arg1="@{COMPONENT}" arg2="site" />
- <then>
- <var name="destinationZip"
- value="${WORKINGDIR}/@{COMPONENT}/site/target/jbosstools-ALL-Update-SNAPSHOT.zip"
- />
- </then>
- <else>
- <var name="COMPONENT.name" value="" />
- <if>
- <equals arg1="@{COMPONENT}" arg2="." />
- <then>
- <var name="COMPONENT.name" value="${product.id}" />
- </then>
- <else>
- <var name="COMPONENT.name" value="@{COMPONENTS}" />
- </else>
- </if>
- <var name="destinationZip"
- value="${WORKINGDIR}/@{COMPONENT}/site/target/jbosstools-${COMPONENT.name}-Update-SNAPSHOT.zip"
- />
- </else>
- </if>
- <!-- rename resulting update site zip -->
- <move file="${WORKINGDIR}/@{COMPONENT}/site/target/site.zip"
- tofile="${destinationZip}"
- overwrite="true"
- preservelastmodified="false"
- />
- </sequential>
- </for>
-
- <for param="updateZip">
- <path>
- <fileset dir="${WORKINGDIR}/@{COMPONENT}" includes="**/jbosstools*Update*.zip" />
- </path>
- <sequential>
- <propertyregex property="updateZip"
- defaultvalue="@{updateZip}"
- input="@{updateZip}"
- regexp=".+/site/target/([^/]+.+\.zip)"
- replace="\1"
- override="true"
- />
- <exec executable="unzip" outputproperty="zip.contents">
- <arg line="-l @{updateZip}" />
- </exec>
- <if>
- <and>
- <isset property="zip.contents" />
- <contains string="${zip.contents}" substring="plugins/" />
- <contains string="${zip.contents}" substring=".jar" />
- </and>
- <then>
- <echo level="info">@{COMPONENT} :: ${updateZip}</echo>
- <for param="featureJar" list="${zip.contents}" delimiter="
-">
- <sequential>
- <if>
- <and>
- <contains string="@{featureJar}" substring="features/" />
- <contains string="@{featureJar}" substring=".jar" />
- </and>
- <then>
- <echo level="info"> :: @{featureJar}</echo>
- </then>
- </if>
- </sequential>
- </for>
- </then>
- <else>
- <echo level="warn">@{COMPONENT} :: ${updateZip}</echo>
- </else>
- </if>
- </sequential>
- </for>
- <if>
- <not>
- <isset property="zip.contents" />
- </not>
- <then>
- <echo level="warn">No update site found for @{COMPONENT}.</echo>
- </then>
- </if>
- <var name="zip.contents" unset="true" />
- <var name="zip.features" unset="true" />
- <echo level="info">
- </echo>
- </sequential>
- </for>
- </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" unless="no.overall">
- <if>
- <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>
- </then>
- <else>
- <property name="update.site.path" value="site" />
-
- <!-- Fetch fresh sources (checkout or update) -->
- <antcall target="get.sources">
- <param name="COMPONENT" value="site" />
- </antcall>
-
- <!-- Get correct version of site.xml + resolve variables -->
- <loadfile property="site.xml.transformed"
- srcfile="${WORKINGDIR}/${update.site.path}/category.${product.id}.xml"
- >
- <filterchain>
- <expandproperties />
- </filterchain>
- </loadfile>
- <echo file="${WORKINGDIR}/${update.site.path}/site.xml" message="${site.xml.transformed}" />
- <var name="site.xml.transformed" unset="true" />
-
- <!-- Build update site -->
- <antcall target="build.update.site">
- <param name="COMPONENTS.to.build" value="site" />
- <param name="update.site.path" value="${update.site.path}" />
- </antcall>
-
- <!-- Copy overall site into workspace so it can be archived by Hudson -->
- <if>
- <not>
- <equals arg1="${basedir}" arg2="${WORKINGDIR}" />
- </not>
- <then>
- <mkdir dir="${basedir}/${update.site.path}/target" />
- <copy todir="${basedir}/${update.site.path}/target" overwrite="true">
- <fileset dir="${WORKINGDIR}/${update.site.path}/target/site" />
- </copy>
- </then>
- </if>
- </else>
- </if>
- </target>
-
- <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>
- <var name="destinationZip"
- value="${WORKINGDIR}/${update.site.path}/target/jbosstools-ALL-Update-SNAPSHOT.zip"
- />
- </then>
- <else>
- <var name="COMPONENT.name" value="" />
- <if>
- <equals arg1="${COMPONENT}" arg2="." />
- <then>
- <var name="COMPONENT.name" value="${product.id}" />
- </then>
- <else>
- <var name="COMPONENT.name" value="${COMPONENTS.to.build}" />
- </else>
- </if>
- <var name="destinationZip"
- value="${WORKINGDIR}/${update.site.path}/target/jbosstools-${COMPONENT.name}-Update-SNAPSHOT.zip"
- />
- </else>
- </if>
- <delete file="${destinationZip}" quiet="true" />
-
- <if>
- <equals arg1="${COMPONENTS.to.build}" arg2="site" />
- <then>
- <!-- Call maven to generate pom.xml, then build site from site.xml -->
- <antcall target="run.build">
- <param name="COMPONENTS.to.build" value="${COMPONENTS.to.build}" />
- <param name="MAVEN_FLAGS" value="verify -e -q -B -fae -Dmaven.test.skip" />
- <param name="noXvfb" value="true" />
- </antcall>
- </then>
- <else>
- <!-- Or just call maven to build site -->
- <antcall target="mvn">
- <param name="MAVEN_DIR" value="${WORKINGDIR}/${update.site.path}" />
- <param name="MAVEN_FLAGS" value="verify -e -q -B -fae -Dmaven.test.skip" />
- <param name="noXvfb" value="true" />
- </antcall>
- </else>
- </if>
-
- <if>
- <and>
- <available file="${WORKINGDIR}/${update.site.path}/target/site/plugins" type="dir" />
- <available file="${WORKINGDIR}/${update.site.path}/target/site/features" type="dir" />
- </and>
- <then>
- <!-- rename resulting update site zip -->
- <move file="${WORKINGDIR}/${update.site.path}/target/site.zip"
- tofile="${destinationZip}"
- overwrite="true"
- preservelastmodified="false"
- />
-
- <!-- Create real update site zip, including web UI -->
- <copy todir="${WORKINGDIR}/${update.site.path}/target/site">
- <fileset dir="${WORKINGDIR}/${update.site.path}" includes="web/*, index.html" />
- </copy>
- <zip destfile="${destinationZip}"
- basedir="${WORKINGDIR}/${update.site.path}/target/site"
- update="true"
- includes="web/*, index.html"
- />
-
- <!-- Copy zip into workspace so it can be archived by Hudson -->
- <if>
- <not>
- <equals arg1="${basedir}" arg2="${WORKINGDIR}" />
- </not>
- <then>
- <mkdir dir="${basedir}/${update.site.path}/target" />
- <copy todir="${basedir}/${update.site.path}/target"
- flatten="true"
- preservelastmodified="true"
- overwrite="true"
- >
- <fileset dir="${WORKINGDIR}/${update.site.path}/target" includes="*Update*.zip" />
- </copy>
- </then>
- </if>
- </then>
- <else>
- <delete file="${WORKINGDIR}/${update.site.path}/target/site.zip" quiet="true" />
- <if>
- <equals arg1="${update.site.path}" arg2="site" />
- <then>
- <fail>Overall update site zip contains no features!</fail>
- </then>
- <else>
- <echo level="info"> [ERROR] Update site zip for ${COMPONENTS.to.build} contains no features!</echo>
- </else>
- </if>
- </else>
- </if>
- </target>
-
- <!-- Used to build the update site of a component; requires a site.xml and pom.xml be generated first, if not already checked in -->
- <target name="create.update.site" depends="init">
- <var name="site.pom.exists" unset="true" />
- <condition property="site.pom.exists">
- <available file="${WORKINGDIR}/${COMPONENT}/site/pom.xml" type="file" />
- </condition>
- <antcall target="genPomXml" />
-
- <var name="site.sitexml.exists" unset="true" />
- <condition property="site.sitexml.exists">
- <available file="${WORKINGDIR}/${COMPONENT}/site/site.xml" type="file" />
- </condition>
- <antcall target="genSiteXml" />
-
- <antcall target="build.update.site">
- <param name="COMPONENTS.to.build" value="${COMPONENT}" />
- <param name="update.site.path" value="${COMPONENT}/site" />
- </antcall>
- </target>
-
- <target name="genPomXml" description="Generate a pom.xml" unless="site.pom.exists">
- <property name="pomDir" value="${WORKINGDIR}/${COMPONENT}/site" />
- <property name="COMPONENT" value="${COMPONENT}" />
- <property name="packaging" value="eclipse-update-site" />
- <mkdir dir="${pomDir}" />
- <echo file="${pomDir}/pom.xml"><project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>${COMPONENT}.site</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>${packaging}</packaging>
-</project>
-</echo>
-
- </target>
-
- <target name="genSiteXml"
- description="Generate a site.xml to contain the features in a category"
- unless="site.sitexml.exists"
- >
- <property name="updateSiteJarDir" value="${WORKINGDIR}/${COMPONENT}/site" />
- <property name="COMPONENT" value="${COMPONENT}" />
- <property name="category.name" value="${product.name} ${COMPONENT} ${update.site.description} Update Site" />
-
- <mkdir dir="${updateSiteJarDir}" />
- <echo file="${updateSiteJarDir}/site.xml"><?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- ${category.name} -->
- <category-def label="${category.name}" name="${category.name}">
- <description>${category.name}: contains all features in this build.</description>
- </category-def>
-</echo>
-
- <mkdir dir="${updateSiteJarDir}/../features" />
- <if>
- <!-- special case: for tests component, we WANT test features; for everyone else, test features shouldn't be on the site -->
- <equals arg1="${COMPONENT}" arg2="tests" />
- <then>
- <path id="featureJars">
- <fileset dir="${updateSiteJarDir}/../features" includes="**/target/*.jar" />
- </path>
- </then>
- <else>
- <path id="featureJars">
- <fileset dir="${updateSiteJarDir}/../features"
- includes="**/target/*.jar"
- excludes="**/*test*"
- id=""
- />
- </path>
- </else>
- </if>
- <for param="featureJar">
- <path refid="featureJars" />
- <sequential>
- <var name="feature.jarfile" unset="true" />
- <var name="feature.id" unset="true" />
- <antcallback target="get.feature.id" return="feature.id">
- <property name="featureJar" value="@{featureJar}" />
- </antcallback>
- <echo append="true" file="${updateSiteJarDir}/site.xml"> <feature url="features/${feature.id}_0.0.0.jar" id="${feature.id}" version="0.0.0">
- <category name="${category.name}"/>
- </feature>
-</echo>
- <var name="feature.jarfile" unset="true" />
- <var name="feature.id" unset="true" />
- </sequential>
- </for>
- <echo append="true" file="${updateSiteJarDir}/site.xml">
-</site>
-</echo>
- </target>
-
- <target name="get.feature.id">
- <antcallback target="get.artifact.id" return="artifact.id">
- <param name="regexp.path" value=".+/features/[^/]+/target/([^/]+feature.+\.jar)" />
- <param name="artifactJar" value="${featureJar}" />
- </antcallback>
- <var name="feature.id" value="${artifact.id}" />
- </target>
-
- <target name="get.plugin.id">
- <antcallback target="get.artifact.id" return="artifact.id">
- <param name="regexp.path" value=".+/plugins/([^/]+.+\.jar)" />
- <param name="artifactJar" value="${pluginJar}" />
- </antcallback>
- <var name="plugin.id" value="${artifact.id}" />
- </target>
-
- <target name="get.artifact.id">
- <!-- for a feature: regexp=".+/features/[^/]+/target/([^/]+feature.+\.jar)"
- for a plugin: regexp=".+/plugins/([^/]+.+\.jar)" -->
- <property name="regexp.path" value=".+/plugins/([^/]+.+\.jar)" />
-
- <propertyregex property="artifact.jarfile"
- defaultvalue="${artifactJar}"
- input="${artifactJar}"
- regexp="${regexp.path}"
- replace="\1"
- override="true"
- />
- <propertyregex property="artifact.id"
- defaultvalue="${artifact.jarfile}"
- input="${artifact.jarfile}"
- regexp="([^_]+)_(\d+\.\d+\.\d+)\.jar"
- replace="\1"
- override="true"
- />
- <propertyregex property="artifact.id"
- defaultvalue="${artifact.id}"
- input="${artifact.id}"
- regexp="([^_]+)-(\d+\.\d+\.\d+.+)\.jar"
- replace="\1"
- override="true"
- />
- <propertyregex property="artifact.id"
- defaultvalue="${artifact.id}"
- input="${artifact.id}"
- regexp="([^_]+)-(\d+\.\d+\.\d+.SNAPSHOT)\.jar"
- replace="\1"
- override="true"
- />
- <propertyregex property="artifact.id"
- defaultvalue="${artifact.id}"
- input="${artifact.id}"
- regexp="([^_]+)_(\d+\.\d+\.\d+)\.jar"
- replace="\1"
- override="true"
- />
- <propertyregex property="artifact.id"
- defaultvalue="${artifact.id}"
- input="${artifact.id}"
- regexp="([^_]+)_(\d+\.\d+\.\d+.SNAPSHOT)\.jar"
- replace="\1"
- override="true"
- />
- <!-- <echo level="debug">artifact.id = ${artifact.id}</echo> -->
- <propertyregex property="artifact.id"
- defaultvalue="${artifact.id}"
- input="${artifact.id}"
- regexp="([^_]+)_(\d+\.\d+\.\d+\.\d+)\.jar"
- replace="\1"
- override="true"
- />
- <echo level="verbose">artifact.id = ${artifact.id}</echo>
- <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>
- <echo level="verbose">Unzip @{artifactJar} into ${WORKINGDIR}/${COMPONENT}/plugins/${artifact.id}</echo>
- <unzip src="@{artifactJar}" dest="${WORKINGDIR}/${COMPONENT}/plugins/${artifact.id}" overwrite="true" />
- <var name="artifact.id" unset="true" />
- </sequential>
- </for>
- </target>
-
- <!-- rename previously built & unpacked feature dirs -->
- <target name="renameFeatures">
- <echo level="debug">${WORKINGDIR}/${COMPONENT}/features</echo>
- <for param="artifactJar">
- <path>
- <dirset dir="${WORKINGDIR}/${COMPONENT}/features" includes="*feature_*" />
- </path>
- <sequential>
- <antcallback target="get.artifact.id" return="artifact.id">
- <property name="artifactJar" value="@{artifactJar}" />
- <property name="regexp.path" value=".+/features/([^/]+feature)_\d+.+" />
- </antcallback>
- <move file="@{artifactJar}"
- tofile="${WORKINGDIR}/${COMPONENT}/features/${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/" excludes="." includes="*" />
- <dirset dir="${WORKINGDIR}/${COMPONENT}/plugins/" excludes="." includes="*" />
- </path>
- <sequential>
- <if>
- <not>
- <available file="@{artifactDir}/build.properties" type="file" />
- </not>
- <then>
- <echo file="@{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.
- Allowed commands: scp sftp rsync
- -->
- <target name="deploy" if="isInHudson" depends="init, get.bootstrap.scripts">
- <!-- default destinations -->
- <property name="DESTINATION.jbosstools" value="tools at filemgmt.jboss.org:/downloads_htdocs/tools/repository" />
- <property name="DESTINATION.jbds" value="/qa/services/http/binaries/RHDS/repository" />
-
- <!-- values for this deployment -->
- <property name="deployDir" value="${DESTINATION.jbosstools}/SNAPSHOT" />
- <property name="sourceDir" value="${WORKINGDIR}" />
- <property name="synchMethodParam" value=" --delete" />
-
- <echo level="debug">Promote build in ${sourceDir} ...</echo>
- <!-- rsync or scp build dir ${sourceDir} into ${deployDir}/ -->
- <if>
- <available file="/usr/bin/rsync" type="file" />
- <then>
- <var name="deployCmd"
- value="/usr/bin/rsync -arz --delete --include=*/*/*/target/ --include=*.xml --include=svn.info*.txt --include=${WORKINGDIR}/build.cfg --exclude=eclipse/ ${sourceDir} ${deployDir}/"
- />
- </then>
- <elseif>
- <available file="/usr/bin/scp" type="file" />
- <then>
- <var name="deployCmd" value="/usr/bin/scp -r ${sourceDir} ${deployDir}/" />
- </then>
- </elseif>
- <else>
- <fail>ERROR!
-Cannot deploy - please install scp or rsync on this server and try again.
-</fail>
- </else>
- </if>
- <if>
- <available file="${sourceDir}" type="dir" />
- <then>
- <echo message="${deployCmd}" />
- <exec executable="bash" failonerror="true">
- <arg line=" -c "${deployCmd}"" />
- </exec>
- </then>
- <else>
- <fail>ERROR!
-Cannot deploy - sourceDir not found in
- ${sourceDir}
-</fail>
- </else>
- </if>
-
- </target>
-
- <!-- ************************************ TESTS ************************************ -->
-
- <target name="test.expected.values">
- <property name="ant.enable.asserts" value="true" />
-
- <!-- expected values for get.sources.* tests -->
- <property name="get.sources.expected.dirs" value="tests,common,xulrunner," />
- <property name="get.sources.expected.files" value="${WORKINGDIR}/build.cfg" />
-
- <!-- expected values for test.get.sources.build.updated.only tests -->
- <property name="get.components.to.build.expected.2" value="tests,common,xulrunner," />
- <property name="get.components.to.build.expected.4" value="tests,xulrunner," />
- <property name="get.components.to.build.expected.6" value="" />
-
- <!-- expected values for test.get.sources.build.all tests -->
- <property name="get.components.to.build.expected.2.all" value="tests,common,xulrunner," />
- <property name="get.components.to.build.expected.4.all" value="tests,common,xulrunner," />
- <property name="get.components.to.build.expected.6.all" value="tests,common,xulrunner," />
-
- <!-- expected values for test.get.all.components -->
- <property name="get.all.components.expected"
- value="tests,common,flow,jbpm,jmx,archives,as,drools,bpel,smooks,freemarker,profiler,portlet,xulrunner,jst,vpe,jsf,esb,ws,cdi,struts,hibernatetools,seam,examples,birt,maven,"
- />
-
- <!-- expected values for test.get.feature.id -->
- <property name="get.artifact.id.expected.tests/features/org.jboss.tools.test.feature/target/org.jboss.tools.test.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.test.feature"
- />
- <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.all.feature/target/org.jboss.tools.common.all.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.common.all.feature"
- />
- <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.all.tests.feature/target/org.jboss.tools.common.all.tests.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.common.all.tests.feature"
- />
- <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.core.feature/target/org.jboss.tools.common.core.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.common.core.feature"
- />
- <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.feature/target/org.jboss.tools.common.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.common.feature"
- />
- <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.text.ext.feature/target/org.jboss.tools.common.text.ext.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.common.text.ext.feature"
- />
- <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.ui.feature/target/org.jboss.tools.common.ui.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.common.ui.feature"
- />
- <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.verification.feature/target/org.jboss.tools.common.verification.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.common.verification.feature"
- />
- <property name="get.artifact.id.expected.flow/features/org.jboss.tools.flow.common.feature/target/org.jboss.tools.flow.common.feature-4.0.0-SNAPSHOT.jar"
- value="org.jboss.tools.flow.common.feature"
- />
- <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.flow.jpdl4.feature/target/org.jboss.tools.flow.jpdl4.feature-4.0.0-SNAPSHOT.jar"
- value="org.jboss.tools.flow.jpdl4.feature"
- />
- <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm.common.feature/target/org.jboss.tools.jbpm.common.feature-4.3.0-SNAPSHOT.jar"
- value="org.jboss.tools.jbpm.common.feature"
- />
- <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm.convert.feature/target/org.jboss.tools.jbpm.convert.feature-1.0.0-SNAPSHOT.jar"
- value="org.jboss.tools.jbpm.convert.feature"
- />
- <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm3.feature/target/org.jboss.tools.jbpm3.feature-3.2.0-SNAPSHOT.jar"
- value="org.jboss.tools.jbpm3.feature"
- />
- <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm3.tests.feature/target/org.jboss.tools.jbpm3.tests.feature-3.2.0-SNAPSHOT.jar"
- value="org.jboss.tools.jbpm3.tests.feature"
- />
- <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm4.feature/target/org.jboss.tools.jbpm4.feature-4.0.0-SNAPSHOT.jar"
- value="org.jboss.tools.jbpm4.feature"
- />
- <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm4.tests.feature/target/org.jboss.tools.jbpm4.tests.feature-4.3.0-SNAPSHOT.jar"
- value="org.jboss.tools.jbpm4.tests.feature"
- />
- <property name="get.artifact.id.expected.jbpm/features/org.jbpm.gd.jpdl.feature/target/org.jbpm.gd.jpdl.feature-3.2.0-SNAPSHOT.jar"
- value="org.jbpm.gd.jpdl.feature"
- />
- <property name="get.artifact.id.expected.jmx/features/org.jboss.tools.jmx.feature/target/org.jboss.tools.jmx.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.jmx.feature"
- />
- <property name="get.artifact.id.expected.jmx/features/org.jboss.tools.jmx.tests.feature/target/org.jboss.tools.jmx.tests.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.jmx.tests.feature"
- />
- <property name="get.artifact.id.expected.archives/features/org.jboss.ide.eclipse.archives.feature/target/org.jboss.ide.eclipse.archives.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.ide.eclipse.archives.feature"
- />
- <property name="get.artifact.id.expected.archives/features/org.jboss.ide.eclipse.archives.test.feature/target/org.jboss.ide.eclipse.archives.test.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.ide.eclipse.archives.test.feature"
- />
- <property name="get.artifact.id.expected.as/features/org.jboss.ide.eclipse.as.test.feature/target/org.jboss.ide.eclipse.as.test.feature-2.1.0-SNAPSHOT.jar"
- value="org.jboss.ide.eclipse.as.test.feature"
- />
- <property name="get.artifact.id.expected.bpel/features/org.jboss.tools.bpel.feature/target/org.jboss.tools.bpel.feature-1.0.0-SNAPSHOT.jar"
- value="org.jboss.tools.bpel.feature"
- />
- <property name="get.artifact.id.expected.bpel/features/org.jboss.tools.bpel.tests.feature/target/org.jboss.tools.bpel.tests.feature-1.0.0-SNAPSHOT.jar"
- value="org.jboss.tools.bpel.tests.feature"
- />
- <property name="get.artifact.id.expected.smooks/features/org.jboss.tools.smooks.feature/target/org.jboss.tools.smooks.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.smooks.feature"
- />
- <property name="get.artifact.id.expected.smooks/features/org.jboss.tools.smooks.test.feature/target/org.jboss.tools.smooks.test.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.smooks.test.feature"
- />
- <property name="get.artifact.id.expected.freemarker/features/org.jboss.ide.eclipse.freemarker.feature/target/org.jboss.ide.eclipse.freemarker.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.ide.eclipse.freemarker.feature"
- />
- <property name="get.artifact.id.expected.freemarker/features/org.jboss.ide.eclipse.freemarker.test.feature/target/org.jboss.ide.eclipse.freemarker.test.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.ide.eclipse.freemarker.test.feature"
- />
- <property name="get.artifact.id.expected.profiler/features/org.jboss.tools.profiler.feature/target/org.jboss.tools.profiler.feature-1.0.0-SNAPSHOT.jar"
- value="org.jboss.tools.profiler.feature"
- />
- <property name="get.artifact.id.expected.portlet/features/org.jboss.tools.portlet.feature/target/org.jboss.tools.portlet.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.portlet.feature"
- />
- <property name="get.artifact.id.expected.portlet/features/org.jboss.tools.portlet.test.feature/target/org.jboss.tools.portlet.test.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.portlet.test.feature"
- />
- <property name="get.artifact.id.expected.jst/features/org.jboss.tools.jst.feature/target/org.jboss.tools.jst.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.jst.feature"
- />
- <property name="get.artifact.id.expected.jst/features/org.jboss.tools.jst.web.tiles.feature/target/org.jboss.tools.jst.web.tiles.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.jst.web.tiles.feature"
- />
- <property name="get.artifact.id.expected.vpe/features/org.jboss.tools.vpe.feature/target/org.jboss.tools.vpe.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.vpe.feature"
- />
- <property name="get.artifact.id.expected.vpe/features/org.jboss.tools.xulrunner.feature/target/org.jboss.tools.xulrunner.feature-1.9.1.2.jar"
- value="org.jboss.tools.xulrunner.feature"
- />
- <property name="get.artifact.id.expected.jsf/features/org.jboss.tools.jsf.feature/target/org.jboss.tools.jsf.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.jsf.feature"
- />
- <property name="get.artifact.id.expected.jsf/features/org.jboss.tools.richfaces.feature/target/org.jboss.tools.richfaces.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.richfaces.feature"
- />
- <property name="get.artifact.id.expected.esb/features/org.jboss.tools.esb.feature/target/org.jboss.tools.esb.feature-1.3.0-SNAPSHOT.jar"
- value="org.jboss.tools.esb.feature"
- />
- <property name="get.artifact.id.expected.esb/features/org.jboss.tools.esb.test.feature/target/org.jboss.tools.esb.test.feature-1.3.0-SNAPSHOT.jar"
- value="org.jboss.tools.esb.test.feature"
- />
- <property name="get.artifact.id.expected.ws/features/org.jboss.tools.ws.feature/target/org.jboss.tools.ws.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.ws.feature"
- />
- <property name="get.artifact.id.expected.ws/features/org.jboss.tools.ws.jaxrs.feature/target/org.jboss.tools.ws.jaxrs.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.ws.jaxrs.feature"
- />
- <property name="get.artifact.id.expected.cdi/features/org.jboss.tools.cdi.feature/target/org.jboss.tools.cdi.feature-1.0.0-SNAPSHOT.jar"
- value="org.jboss.tools.cdi.feature"
- />
- <property name="get.artifact.id.expected.struts/features/org.jboss.tools.struts.feature/target/org.jboss.tools.struts.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.struts.feature"
- />
- <property name="get.artifact.id.expected.hibernatetools/features/org.hibernate.eclipse.feature/target/org.hibernate.eclipse.feature-3.3.0-SNAPSHOT.jar"
- value="org.hibernate.eclipse.feature"
- />
- <property name="get.artifact.id.expected.hibernatetools/features/org.hibernate.eclipse.test.feature/target/org.hibernate.eclipse.test.feature-3.3.0-SNAPSHOT.jar"
- value="org.hibernate.eclipse.test.feature"
- />
- <property name="get.artifact.id.expected.seam/features/org.jboss.tools.seam.feature/target/org.jboss.tools.seam.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.seam.feature"
- />
- <property name="get.artifact.id.expected.seam/features/org.jboss.tools.seam.test.feature/target/org.jboss.tools.seam.test.feature-3.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.seam.test.feature"
- />
- <property name="get.artifact.id.expected.examples/features/org.jboss.tools.community.project.examples.feature/target/org.jboss.tools.community.project.examples.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.community.project.examples.feature"
- />
- <property name="get.artifact.id.expected.examples/features/org.jboss.tools.project.examples.feature/target/org.jboss.tools.project.examples.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.project.examples.feature"
- />
- <property name="get.artifact.id.expected.examples/features/org.jboss.tools.project.examples.test.feature/target/org.jboss.tools.project.examples.test.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.project.examples.test.feature"
- />
- <property name="get.artifact.id.expected.birt/features/org.jboss.tools.birt.feature/target/org.jboss.tools.birt.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.birt.feature"
- />
- <property name="get.artifact.id.expected.birt/features/org.jboss.tools.birt.test.feature/target/org.jboss.tools.birt.test.feature-1.1.0-SNAPSHOT.jar"
- value="org.jboss.tools.birt.test.feature"
- />
- <property name="get.artifact.id.expected.maven/features/org.jboss.tools.maven.feature/target/org.jboss.tools.maven.feature-1.0.0-SNAPSHOT.jar"
- value="org.jboss.tools.maven.feature"
- />
- <property name="get.artifact.id.expected.maven/features/org.jboss.tools.maven.seam.feature/target/org.jboss.tools.maven.seam.feature-1.0.0-SNAPSHOT.jar"
- value="org.jboss.tools.maven.seam.feature"
- />
-
- <property name="get.artifact.id.expected.as/features/org.jboss.ide.eclipse.as.feature/target/org.jboss.ide.eclipse.as.feature-2.1.0-SNAPSHOT.jar"
- value="org.jboss.ide.eclipse.as.feature"
- />
- <property name="get.artifact.id.expected.xulrunner/features/org.mozilla.xpcom.feature/target/org.mozilla.xpcom.feature-1.9.1.2a.jar"
- value="org.mozilla.xpcom.feature"
- />
- <property name="get.artifact.id.expected.xulrunner/features/org.mozilla.xulrunner.feature/target/org.mozilla.xulrunner.feature-1.9.1.2.jar"
- value="org.mozilla.xulrunner.feature"
- />
-
- <!-- expected values for test.get.plugin.id -->
- <property name="get.artifact.id.expected.drools/plugins/org.eclipse.webdav_3.0.101.jar"
- value="org.eclipse.webdav"
- />
- <property name="get.artifact.id.expected.drools/plugins/org.guvnor.tools_5.1.0.SNAPSHOT.jar"
- value="org.guvnor.tools"
- />
- <property name="get.artifact.id.expected.drools/plugins/org.drools.eclipse_5.1.0.SNAPSHOT.jar"
- value="org.drools.eclipse"
- />
- <property name="get.artifact.id.expected.drools/plugins/org.drools.eclipse.task_5.1.0.SNAPSHOT.jar"
- value="org.drools.eclipse.task"
- />
- <property name="get.artifact.id.expected.drools/plugins/org.guvnor.tools_5.1.0.jar"
- value="org.guvnor.tools"
- />
- <property name="get.artifact.id.expected.drools/plugins/org.drools.eclipse_5.1.0.jar"
- value="org.drools.eclipse"
- />
- <property name="get.artifact.id.expected.drools/plugins/org.drools.eclipse.task_5.1.0.jar"
- value="org.drools.eclipse.task"
- />
- <property name="get.artifact.id.expected.drools/plugins/org.drools.eclipse.task_5.2.0.201101062302.jar"
- value="org.drools.eclipse.task"
- />
- <property name="get.artifact.id.expected.drools/plugins/org.drools.eclipse_5.2.0.201101062302.jar"
- value="org.drools.eclipse"
- />
- <property name="get.artifact.id.expected.drools/plugins/org.guvnor.tools_5.2.0.201101062302.jar"
- value="org.guvnor.tools"
- />
- </target>
-
- <target name="test.all">
- <antcall target="test.get.sources.build.all" />
- <antcall target="test.get.sources" />
- <antcall target="test.get.feature.id" />
- <antcall target="test.get.plugin.id.drools" />
- </target>
-
- <!-- simpler tests, run faster -->
- <target name="test.get.feature.id.vpe">
- <antcall target="test.get.feature.id">
- <param name="COMPONENTS" value="vpe" />
- </antcall>
- </target>
- <target name="test.get.plugin.id.drools">
- <antcall target="test.get.plugin.id">
- <param name="COMPONENTS" value="drools" />
- </antcall>
- </target>
-
- <!-- test all feature.id fetches -->
- <target name="test.get.feature.id" depends="init, test.expected.values">
- <for param="COMPONENT" list="${COMPONENTS}" delimiter=";,
- ">
- <sequential>
- <echo level="info">Test feature.ids for @{COMPONENT}</echo>
- <for param="artifactJar" delimiter=", ">
- <path>
- <fileset dir="${basedir}/@{COMPONENT}" includes="**/features/**/target/*.jar" />
- </path>
- <sequential>
- <echo level="verbose">Test @{artifactJar}</echo>
- <antcallback target="get.artifact.id" return="artifact.id">
- <property name="artifactJar" value="@{artifactJar}" />
- <param name="regexp.path" value=".+/features/[^/]+/target/([^/]+feature.+\.jar)" />
- </antcallback>
- <propertyregex override="true"
- property="artifact.id.expected.name"
- defaultvalue="@{artifactJar}"
- input="@{artifactJar}"
- regexp="${basedir}\/(.+)"
- replace="get.artifact.id.expected.\1"
- />
- <!-- <echo><property name="get.artifact.id.expected.@{artifactJar}" value="${artifact.id}"/> </echo> -->
- <propertycopy name="artifact.id.expected" from="${artifact.id.expected.name}" />
- <assert failonerror="true" message="Expected: ${artifact.id.expected}; got: ${artifact.id}">
- <bool>
- <equals arg1="${artifact.id.expected}" arg2="${artifact.id}" />
- </bool>
- </assert>
- <var name="artifact.id.expected" unset="true" />
- </sequential>
- </for>
- </sequential>
- </for>
- </target>
-
- <!-- test all plugin.id fetches -->
- <target name="test.get.plugin.id" depends="init, test.expected.values">
- <for param="COMPONENT" list="${COMPONENTS}" delimiter=";,
- ">
- <sequential>
- <echo level="info">Test plugin.ids for @{COMPONENT}</echo>
- <for param="artifactJar" delimiter=", ">
- <path>
- <fileset dir="${basedir}/@{COMPONENT}" includes="**/plugins/*.jar" excludes="**/target/**" />
- </path>
- <sequential>
- <echo level="verbose">[1] Test @{artifactJar}</echo>
- <antcallback target="get.artifact.id" return="artifact.id">
- <property name="artifactJar" value="@{artifactJar}" />
- <property name="regexp.path" value=".+/plugins/([^/]+.+\.jar)" />
- </antcallback>
- <propertyregex override="true"
- property="artifact.id.expected.name"
- defaultvalue="@{artifactJar}"
- input="@{artifactJar}"
- regexp="${basedir}\/(.+)"
- replace="get.artifact.id.expected.\1"
- />
- <!-- <echo><property name="get.artifact.id.expected.@{artifactJar}" value="${artifact.id}"/> </echo> -->
- <propertycopy name="artifact.id.expected" from="${artifact.id.expected.name}" />
- <assert failonerror="true" message="Expected: ${artifact.id.expected}; got: ${artifact.id}">
- <bool>
- <equals arg1="${artifact.id.expected}" arg2="${artifact.id}" />
- </bool>
- </assert>
- <var name="artifact.id.expected" unset="true" />
- <var name="artifact.id" unset="true" />
-
- <echo level="verbose">[2] Test @{artifactJar}</echo>
- <antcallback target="get.plugin.id" return="plugin.id">
- <property name="artifactJar" value="@{artifactJar}" />
- <property name="regexp.path" value=".+/plugins/([^/]+.+\.jar)" />
- </antcallback>
- <propertyregex override="true"
- property="artifact.id.expected.name"
- defaultvalue="@{artifactJar}"
- input="@{artifactJar}"
- regexp="${basedir}\/(.+)"
- replace="get.artifact.id.expected.\1"
- />
- <!-- <echo><property name="get.artifact.id.expected.@{artifactJar}" value="${artifact.id}"/> </echo> -->
- <propertycopy name="artifact.id.expected" from="${artifact.id.expected.name}" />
- <assert failonerror="true" message="Expected: ${artifact.id.expected}; got: ${plugin.id}">
- <bool>
- <equals arg1="${artifact.id.expected}" arg2="${plugin.id}" />
- </bool>
- </assert>
- <var name="artifact.id.expected" unset="true" />
- <var name="artifact.id" unset="true" />
- </sequential>
- </for>
- </sequential>
- </for>
- </target>
-
- <target name="test.get.sources.build.all"
- depends="init, test.expected.values"
- description="verify get.sources works to fetch, then update; verify all components will be built"
- >
- <var name="build.if.sources.unchanged" value="true" />
- <var name="get.components.to.build.expected.2" unset="true" />
- <var name="get.components.to.build.expected.4" unset="true" />
- <var name="get.components.to.build.expected.6" unset="true" />
- <var name="get.components.to.build.expected.2" value="${get.components.to.build.expected.2.all}" />
- <var name="get.components.to.build.expected.4" value="${get.components.to.build.expected.4.all}" />
- <var name="get.components.to.build.expected.6" value="${get.components.to.build.expected.6.all}" />
- <antcall target="test.get.sources" />
- </target>
-
- <target name="test.get.sources"
- depends="init, test.expected.values"
- description="verify get.sources works to fetch, then update; verify if components are not updated, they will not be built"
- >
- <var name="COMPONENTS" unset="true" />
- <var name="COMPONENTS" value="${get.sources.expected.dirs}" />
-
- <!-- for testing purposes, do not recurse (otherwise will have to download 100s of Mb of data -->
- <var name="svn.recurse" unset="true" />
- <var name="svn.recurse" value="false" />
-
- <!-- cleanup before test -->
- <for param="expected.dir" list="${get.sources.expected.dirs}" delimiter=",
- ">
- <sequential>
- <delete dir="${WORKINGDIR}/@{expected.dir}" includeemptydirs="true" />
- <delete file="${WORKINGDIR}/svn.info-@{expected.dir}.txt" />
- </sequential>
- </for>
- <for param="expected.file" list="${get.sources.expected.files}" delimiter=",
- ">
- <sequential>
- <delete file="${WORKINGDIR}/@{expected.file}" />
- </sequential>
- </for>
-
- <echo level="info">----------------------------------</echo>
- <echo level="info">
-1/6: Test checkout</echo>
- <antcall target="get.sources" />
- <for param="expected.dir" list="${get.sources.expected.dirs}" delimiter=",
- ">
- <sequential>
- <assert failonerror="true" message="Dir ${WORKINGDIR}/@{expected.dir} not found!">
- <bool>
- <available file="${WORKINGDIR}/@{expected.dir}" type="dir" />
- </bool>
- </assert>
- </sequential>
- </for>
- <for param="expected.file" list="${get.sources.expected.files}" delimiter=",
- ">
- <sequential>
- <assert failonerror="true" message="Dir ${WORKINGDIR}/@{expected.file} not found!">
- <bool>
- <available file="${WORKINGDIR}/@{expected.file}" type="file" />
- </bool>
- </assert>
- </sequential>
- </for>
- <echo level="info">----------------------------------</echo>
-
- <echo level="info">
-2/6: Test build.cfg</echo>
- <var name="COMPONENTS.to.build" unset="true" />
- <antcallback target="get.components.to.build" return="COMPONENTS.to.build" />
- <assert failonerror="true"
- message="expected: [${get.components.to.build.expected.2}] but got: [${COMPONENTS.to.build}]"
- >
- <bool>
- <equals arg1="${get.components.to.build.expected.2}" arg2="${COMPONENTS.to.build}" />
- </bool>
- </assert>
- <echo level="info">----------------------------------</echo>
-
- <echo level="info">
-3/6: Test update</echo>
- <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" />
- <antcall target="get.sources" />
- <for param="expected.dir" list="${get.sources.expected.dirs}" delimiter=",
- ">
- <sequential>
- <assert failonerror="true" message="Dir ${WORKINGDIR}/@{expected.dir} not found!">
- <bool>
- <available file="${WORKINGDIR}/@{expected.dir}" type="dir" />
- </bool>
- </assert>
- </sequential>
- </for>
- <for param="expected.file" list="${get.sources.expected.files}" delimiter=",
- ">
- <sequential>
- <assert failonerror="true" message="Dir ${WORKINGDIR}/@{expected.file} not found!">
- <bool>
- <available file="${WORKINGDIR}/@{expected.file}" type="file" />
- </bool>
- </assert>
- </sequential>
- </for>
- <echo level="info">----------------------------------</echo>
-
- <echo level="info">
-4/6: Test build.cfg</echo>
- <var name="COMPONENTS.to.build" unset="true" />
- <antcallback target="get.components.to.build" return="COMPONENTS.to.build" />
- <assert failonerror="true"
- message="expected: [${get.components.to.build.expected.4}] but got: [${COMPONENTS.to.build}]"
- >
- <bool>
- <equals arg1="${get.components.to.build.expected.4}" arg2="${COMPONENTS.to.build}" />
- </bool>
- </assert>
- <echo level="info">----------------------------------</echo>
-
- <echo level="info">
-5/6: Test info w/o update</echo>
- <var name="COMPONENTS.to.build" unset="true" />
- <antcall target="get.sources" />
- <for param="expected.dir" list="${get.sources.expected.dirs}" delimiter=",
- ">
- <sequential>
- <assert failonerror="true" message="Dir ${WORKINGDIR}/@{expected.dir} not found!">
- <bool>
- <available file="${WORKINGDIR}/@{expected.dir}" type="dir" />
- </bool>
- </assert>
- </sequential>
- </for>
- <for param="expected.file" list="${get.sources.expected.files}" delimiter=",
- ">
- <sequential>
- <assert failonerror="true" message="Dir ${WORKINGDIR}/@{expected.file} not found!">
- <bool>
- <available file="${WORKINGDIR}/@{expected.file}" type="file" />
- </bool>
- </assert>
- </sequential>
- </for>
- <echo level="info">----------------------------------</echo>
-
- <echo level="info">
-6/6: Test build.cfg</echo>
- <var name="COMPONENTS.to.build" unset="true" />
- <antcallback target="get.components.to.build" return="COMPONENTS.to.build" />
- <assert failonerror="true"
- message="expected: [${get.components.to.build.expected.6}] but got: [${COMPONENTS.to.build}]"
- >
- <bool>
- <equals arg1="${get.components.to.build.expected.6}" arg2="${COMPONENTS.to.build}" />
- </bool>
- </assert>
- <echo level="info">----------------------------------</echo>
- </target>
-
- <!-- TODO: fixme: manual test; lacks something we can assert... maybe that deployDir exists? -->
- <target name="test.deploy" depends="init">
- <antcall target="deploy">
- <param name="deployDir" value="tools at filemgmt.jboss.org:/downloads_htdocs/tools/repository/SNAPSHOT" />
- <param name="sourceDir" value="${WORKINGDIR}/surefire-reports" />
- </antcall>
- </target>
-
- <target name="test.now" depends="init">
- <now>foobar!</now>
- <now />
- <now level="error">error!</now>
- <now level="info">info!</now>
- </target>
-
- <target name="test.get.all.components" depends="init, test.expected.values">
- <var name="COMPONENTS" unset="true" />
- <var name="COMPONENTS"
- value="tests,common;
- flow,jbpm;
- jmx,archives,as;
- drools,bpel,smooks,freemarker,profiler,portlet;
- xulrunner,jst,vpe,jsf;
- esb,ws;
- cdi,struts,hibernatetools,seam;
- examples,birt;
- maven"
- />
- <antcallback target="get.all.components" return="COMPONENTS.to.build" />
- <assert failonerror="true"
- message="expected: [${get.all.components.expected}] but got: [${COMPONENTS.to.build}]"
- >
- <bool>
- <equals arg1="${get.all.components.expected}" arg2="${COMPONENTS.to.build}" />
- </bool>
- </assert>
- </target>
-
-</project>
Deleted: trunk/build/pom-core.xml.DEPRECATED.use.pom.xml.instead.for.Core.builds
===================================================================
--- trunk/build/pom-core.xml.DEPRECATED.use.pom.xml.instead.for.Core.builds 2012-05-29 08:31:32 UTC (rev 41506)
+++ trunk/build/pom-core.xml.DEPRECATED.use.pom.xml.instead.for.Core.builds 2012-05-29 08:37:47 UTC (rev 41507)
@@ -1,649 +0,0 @@
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.build</artifactId>
- <name>org.jboss.tools.build</name>
- <version>0.0.2</version>
- <packaging>pom</packaging>
-
- <profiles>
- <!-- for bootstrapping the parent and target-platform poms via Mead, we need to be able to fetch from this folder and run
- this profile (excluding all others); currently parent pom includes target-platform build too, so only need to build the parent
-
- mvn clean install -P parent,\!libs,\!tests,\!jmx,\!archives,\!as,\!common,\!jst,\!xulrunner,\!vpe \
- -P \!jsf,\!freemarker,\!hibernatetools,\!portlet,\!struts,\!cdi,\!birt,\!seam,\!examples \
- -P \!maven,\!ws,\!gwt,\!deltacloud,\!runtime,\!usage,\!central,\!aggregate-coverage
-
- -->
- <profile>
- <id>parent</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <modules>
- <module>parent</module>
- </modules>
- </profile>
-
- <profile>
- <id>libs</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <property>
- <name>coverage</name>
- </property>
- </activation>
- <modules>
- <module>libs</module>
- </modules>
- </profile>
-
- <profile>
- <id>tests</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <property>
- <name>as-bootstrap</name>
- </property>
- </activation>
- <modules>
- <module>../tests</module>
- </modules>
- </profile>
-
- <profile>
- <id>jmx</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../jmx</module>
- </modules>
- </profile>
-
- <profile>
- <id>jmx-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../jmx</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>archives</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <property>
- <name>as-bootstrap</name>
- </property>
- </activation>
- <modules>
- <module>../archives</module>
- </modules>
- </profile>
-
- <profile>
- <id>archives-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../archives</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>as</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <property>
- <name>as-bootstrap</name>
- </property>
- </activation>
- <modules>
- <module>../as</module>
- </modules>
- </profile>
-
- <profile>
- <id>as-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../archives</module>
- <module>../jmx</module>
- <module>../as</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>openshift</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <property>
- <name>openshift-bootstrap</name>
- </property>
- </activation>
- <modules>
- <module>../openshift</module>
- </modules>
- </profile>
-
- <profile>
- <id>openshift-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../archives</module>
- <module>../jmx</module>
- <module>../as</module>
- <module>../openshift</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>common</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../common</module>
- </modules>
- </profile>
-
- <profile>
- <id>common-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- </modules>
- </profile>
-
- <profile>
- <id>jst</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../jst</module>
- </modules>
- </profile>
-
- <profile>
- <id>jst-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../jst</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>xulrunner</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../xulrunner</module>
- </modules>
- </profile>
-
- <profile>
- <id>xulrunner-bootstrap</id>
- <modules>
- <module>../xulrunner</module>
- </modules>
- </profile>
-
- <profile>
- <id>vpe</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../vpe</module>
- </modules>
- </profile>
-
- <profile>
- <id>vpe-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../jst</module>
- <module>../xulrunner</module>
- <module>../vpe</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>jsf</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../jsf</module>
- </modules>
- </profile>
-
- <profile>
- <id>jsf-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../jst</module>
- <module>../xulrunner</module>
- <module>../vpe</module>
- <module>../jsf</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>freemarker</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../freemarker</module>
- </modules>
- </profile>
-
- <profile>
- <id>freemarker-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../freemarker</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>hibernatetools</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../hibernatetools</module>
- </modules>
- </profile>
-
- <profile>
- <id>hibernatetools-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../freemarker</module>
- <module>../hibernatetools</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>portlet</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../portlet</module>
- </modules>
- </profile>
-
- <profile>
- <id>portlet-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../jmx</module>
- <module>../archives</module>
- <module>../as</module>
- <module>../hibernatetools</module>
- <module>../common</module>
- <module>../jst</module>
- <module>../xulrunner</module>
- <module>../vpe</module>
- <module>../jsf</module>
- <module>../usage</module>
- <module>../seam</module>
- <module>../portlet</module>
- </modules>
- </profile>
-
- <profile>
- <id>struts</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../struts</module>
- </modules>
- </profile>
-
- <profile>
- <id>struts-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../jst</module>
- <module>../xulrunner</module>
- <module>../vpe</module>
- <module>../struts</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>forge</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../forge</module>
- </modules>
- </profile>
-
- <profile>
- <id>forge-bootstrap</id>
- <modules>
- <module>../forge</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>cdi</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../cdi</module>
- </modules>
- </profile>
-
- <profile>
- <id>cdi-tests</id>
- <modules>
- <module>libs</module>
- <module>../cdi/tests</module>
- <module>reports/emma-coverage</module>
- </modules>
- </profile>
-
- <profile>
- <id>cdi-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../jst</module>
- <module>../cdi</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>birt</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../birt</module>
- </modules>
- </profile>
-
- <profile>
- <id>birt-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../birt</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>seam</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../seam</module>
- </modules>
- </profile>
-
- <profile>
- <id>seam-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../jmx</module>
- <module>../archives</module>
- <module>../as</module>
- <module>../hibernatetools</module>
- <module>../common</module>
- <module>../jst</module>
- <module>../xulrunner</module>
- <module>../vpe</module>
- <module>../jsf</module>
- <module>../seam</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>examples</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../examples</module>
- </modules>
- </profile>
-
- <profile>
- <id>examples-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../jmx</module>
- <module>../usage</module>
- <module>../runtime</module>
- <module>../examples</module>
- </modules>
- </profile>
-
- <profile>
- <id>maven</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../maven</module>
- </modules>
- </profile>
-
- <profile>
- <id>maven-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../jmx</module>
- <module>../archives</module>
- <module>../as</module>
- <module>../hibernatetools</module>
- <module>../common</module>
- <module>../examples</module>
- <module>../jst</module>
- <module>../xulrunner</module>
- <module>../vpe</module>
- <module>../jsf</module>
- <module>../seam</module>
- <module>../usage</module>
- <module>../cdi</module>
- <module>../maven</module>
- </modules>
- </profile>
-
- <profile>
- <id>ws</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../ws</module>
- </modules>
- </profile>
-
- <profile>
- <id>ws-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../as</module>
- <module>../ws</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>gwt</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../gwt</module>
- </modules>
- </profile>
-
- <profile>
- <id>deltacloud</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../deltacloud</module>
- </modules>
- </profile>
-
- <profile>
- <id>deltacloud-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../as</module>
- <module>../deltacloud</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>runtime</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../runtime</module>
- </modules>
- </profile>
-
- <profile>
- <id>runtime-bootstrap</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../jmx</module>
- <module>../archives</module>
- <module>../as</module>
- <module>../hibernatetools</module>
- <module>../jst</module>
- <module>../xulrunner</module>
- <module>../vpe</module>
- <module>../jsf</module>
- <module>../seam</module>
- <module>../usage</module>
- <module>../runtime</module>
- </modules>
- </profile>
-
- <profile>
- <id>richfaces</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../jst</module>
- <module>../vpe</module>
- <module>../jsf</module>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>usage</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../usage</module>
- </modules>
- </profile>
-
- <profile>
- <id>central</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../central</module>
- </modules>
- </profile>
-
- <profile>
- <id>central-bootstrap</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../tests</module>
- <module>../common</module>
- <module>../runtime</module>
- <module>../freemarker</module>
- <module>../hibernatetools</module>
- <module>../usage</module>
- <module>../jst</module>
- <module>../vpe</module>
- <module>../jsf</module>
- <module>../jmx</module>
- <module>../archives</module>
- <module>../as</module>
- <module>../seam</module>
- <module>../portlet</module>
- <module>../examples</module>
- <module>../esb</module>
- <module>../jbpm</module>
- <module>../flow</module>
- <module>../maven</module>
- <module>../central</module>
- </modules>
- </profile>
-
- <profile>
- <id>aggregate-coverage</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <property>
- <name>coverage</name>
- </property>
- </activation>
- <modules>
- <module>reports/emma-coverage</module>
- </modules>
- </profile>
- </profiles>
-
-</project>
-
Deleted: trunk/build/pom-disabled-components.xml.DEPRECATED
===================================================================
--- trunk/build/pom-disabled-components.xml.DEPRECATED 2012-05-29 08:31:32 UTC (rev 41506)
+++ trunk/build/pom-disabled-components.xml.DEPRECATED 2012-05-29 08:37:47 UTC (rev 41507)
@@ -1,38 +0,0 @@
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.build</artifactId>
- <name>org.jboss.tools.build</name>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <profiles>
-
- <profile>
- <id>libs</id>
- <activation>
- <property>
- <name>coverage</name>
- </property>
- </activation>
- <modules>
- <module>libs</module>
- </modules>
- </profile>
-
- <profile>
- <id>site</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>../site</module>
- </modules>
- </profile>
-
- </profiles>
-
-</project>
-
Deleted: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2012-05-29 08:31:32 UTC (rev 41506)
+++ trunk/build/publish.sh 2012-05-29 08:37:47 UTC (rev 41507)
@@ -1,471 +0,0 @@
-#!/bin/bash
-# Hudson script used to publish Tycho-built p2 update sites
-# NOTE: sources MUST be checked out into ${WORKSPACE}/sources
-
-# to use timestamp when naming dirs instead of ${BUILD_ID}-H${BUILD_NUMBER}, use:
-# BUILD_ID=2010-08-31_19-16-10; timestamp=$(echo $BUILD_ID | tr -d "_-"); timestamp=${timestamp:0:12}; echo $timestamp; # 201008311916
-
-#set up tmpdir
-tmpdir=`mktemp -d`
-mkdir -p $tmpdir
-
-# where to create the stuff to publish
-STAGINGDIR=${WORKSPACE}/results/${JOB_NAME}
-
-# for trunk, use "trunk" or "trunk/soa" instead of generated path from job name
-PUBLISHPATHSUFFIX=""; if [[ $1 ]]; then PUBLISHPATHSUFFIX="$1"; fi
-
-# https://jira.jboss.org/browse/JBIDE-6956 "jbosstools-3.2.0.M2" is too verbose, use "3.2.0.M2" instead
-JOBNAMEREDUX=${JOB_NAME/.aggregate}; JOBNAMEREDUX=${JOBNAMEREDUX/jbosstools-}
-
-# releases get named differently than snapshots
-if [[ ${RELEASE} == "Yes" ]]; then
- ZIPSUFFIX="${BUILD_ID}-H${BUILD_NUMBER}"
-else
- ZIPSUFFIX="SNAPSHOT"
-fi
-
-# define target update zip filename
-SNAPNAME="${JOB_NAME}-Update-${ZIPSUFFIX}.zip"
-# define target sources zip filename
-SRCSNAME="${JOB_NAME}-Sources-${ZIPSUFFIX}.zip"
-# define suffix to use for additional update sites
-SUFFNAME="-Update-${ZIPSUFFIX}.zip"
-
-# for JBDS, use DESTINATION=/qa/services/http/binaries/RHDS
-if [[ $DESTINATION == "" ]]; then DESTINATION="tools at filemgmt.jboss.org:/downloads_htdocs/tools"; fi
-
-# internal destination mirror, for file:// access (instead of http://)
-if [[ $INTRNALDEST == "" ]]; then INTRNALDEST="/home/hudson/static_build_env/jbds/"; fi
-
-# cleanup from last time
-rm -fr ${WORKSPACE}/results; mkdir -p ${STAGINGDIR}
-
-# check for aggregate zip or overall zip
-z=""
-if [[ -d ${WORKSPACE}/sources/aggregate/site/target ]]; then
- if [[ -f ${WORKSPACE}/sources/aggregate/site/target/site_assembly.zip ]]; then
- siteZip=${WORKSPACE}/sources/aggregate/site/target/site_assembly.zip
- else
- siteZip=${WORKSPACE}/sources/aggregate/site/target/repository.zip
- fi
- z=$siteZip
-elif [[ -d ${WORKSPACE}/sources/aggregate/site/site/target ]]; then
- if [[ -f ${WORKSPACE}/sources/aggregate/site/site/target/site_assembly.zip ]]; then
- siteZip=${WORKSPACE}/sources/aggregate/site/site/target/site_assembly.zip
- else
- siteZip=${WORKSPACE}/sources/aggregate/site/site/target/repository.zip
- fi
- z=$siteZip
-elif [[ -d ${WORKSPACE}/sources/site/target ]]; then
- if [[ -f ${WORKSPACE}/sources/site/target/site_assembly.zip ]]; then
- siteZip=${WORKSPACE}/sources/site/target/site_assembly.zip
- else
- siteZip=${WORKSPACE}/sources/site/target/repository.zip
- # JBIDE-10923
- currentDir=$(pwd)
- cd ${WORKSPACE}/sources/site/target/repository
- zip -r $siteZip .
- cd $currentDir
- fi
- z=$siteZip
-fi
-
-# note the job name, build number, SVN rev, and build ID of the latest snapshot zip
-mkdir -p ${STAGINGDIR}/logs
-bl=${STAGINGDIR}/logs/BUILDLOG.txt
-rm -f ${bl}; wget -q http://hudson.qa.jboss.com/hudson/job/${JOB_NAME}/${BUILD_NUMBER}/consoleText -O ${bl} --timeout=900 --wait=10 --random-wait --tries=10 --retry-connrefused --no-check-certificate
-
-# JBDS-1361 - fetch XML and then sed it into plain text
-wgetParams="--timeout=900 --wait=10 --random-wait --tries=30 --retry-connrefused --no-check-certificate --server-response"
-rl=${STAGINGDIR}/logs/REVISION
-if [[ $(find ${WORKSPACE} -mindepth 2 -maxdepth 3 -name ".git") ]]; then
- # Track git source revision through hudson api: /job/${JOB_NAME}/${BUILD_NUMBER}/api/xml?xpath=//lastBuiltRevision
- rl=${STAGINGDIR}/logs/GIT_REVISION
- rm -f ${rl}.txt ${rl}.xml; wget -O ${rl}.xml "http://hudson.qa.jboss.com/hudson/job/${JOB_NAME}/${BUILD_NUMBER}/api/xml?xpath=//lastBuiltRevision" ${wgetParams}
- sed -e "s#<lastBuiltRevision><SHA1>\([a-f0-9]\+\)</SHA1><branch><SHA1>\([a-f0-9]\+\)</SHA1><name>\([^<>]\+\)</name></branch></lastBuiltRevision>#\3\@\1#g" ${rl}.xml | sed -e "s#<[^<>]\+>##g" > ${rl}.txt
-elif [[ $(find ${WORKSPACE} -mindepth 2 -maxdepth 3 -name ".svn") ]]; then
- # Track svn source revision through hudson api: /job/${JOB_NAME}/api/xml?wrapper=changeSet&depth=1&xpath=//build[1]/changeSet/revision
- rl=${STAGINGDIR}/logs/SVN_REVISION
- rm -f ${rl}.txt ${rl}.xml; wget -O ${rl}.xml "http://hudson.qa.jboss.com/hudson/job/${JOB_NAME}/api/xml?wrapper=changeSet&depth=1&xpath=//build[1]/changeSet/revision" ${wgetParams}
- if [[ $? -eq 0 ]]; then
- sed -e "s#<module>\(http[^<>]\+\)</module><revision>\([0-9]\+\)</revision>#\1\@\2\n#g" ${rl}.xml | sed -e "s#<[^<>]\+>##g" > ${rl}.txt
- else
- echo "UNKNOWN SVN REVISION(S)" > ${rl}.txt
- fi
-else
- # not git or svn... unsupported
- echo "UNKNOWN REVISION(S)" > ${rl}.txt
-fi
-
-METAFILE="${BUILD_ID}-H${BUILD_NUMBER}.txt"
-touch ${STAGINGDIR}/logs/${METAFILE}
-METAFILE=build.properties
-
-echo "JOB_NAME = ${JOB_NAME}" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "BUILD_NUMBER = ${BUILD_NUMBER}" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "BUILD_ID = ${BUILD_ID}" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "WORKSPACE = ${WORKSPACE}" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "HUDSON_SLAVE = $(uname -a)" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "RELEASE = ${RELEASE}" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "ZIPSUFFIX = ${ZIPSUFFIX}" >> ${STAGINGDIR}/logs/${METAFILE}
-y=${STAGINGDIR}/logs/${METAFILE}; for m in $(md5sum ${y}); do if [[ $m != ${y} ]]; then echo $m > ${y}.MD5; fi; done
-
-#echo "$z ..."
-if [[ $z != "" ]] && [[ -f $z ]] ; then
- # unzip into workspace for publishing as unpacked site
- mkdir -p ${STAGINGDIR}/all/repo
- unzip -u -o -q -d ${STAGINGDIR}/all/repo $z
-
- # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-
- # copy into workspace for access by bucky aggregator (same name every time)
- rsync -aq $z ${STAGINGDIR}/all/${SNAPNAME}
- rsync -aq ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}.MD5
-fi
-z=""
-
-# if component zips exist, copy repository.zip (or site_assembly.zip) too
-for z in $(find ${WORKSPACE}/sources/*/site/target -type f -name "repository.zip" -o -name "site_assembly.zip"); do
- y=${z%%/site/target/*}; y=${y##*/}
- if [[ $y != "aggregate" ]]; then # prevent duplicate nested sites
- #echo "[$y] $z ..."
- # unzip into workspace for publishing as unpacked site
- mkdir -p ${STAGINGDIR}/$y
- unzip -u -o -q -d ${STAGINGDIR}/$y $z
- # copy into workspace for access by bucky aggregator (same name every time)
-
- # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-
- rsync -aq $z ${STAGINGDIR}/${y}${SUFFNAME}
- rsync -aq ${z}.MD5 ${STAGINGDIR}/${y}${SUFFNAME}.MD5
- fi
-done
-
-# if installer jars exist (should be 2 installers, 2 md5sums)
-for z in $(find ${WORKSPACE}/sources/product/installer/target -type f -name "jbdevstudio-product*-universal*.jar*"); do
- mkdir -p ${STAGINGDIR}/installer/
- rsync -aq $z ${STAGINGDIR}/installer/
-done
-
-# if zips exist produced & renamed by ant script, copy them too
-if [[ ! -f ${STAGINGDIR}/all/${SNAPNAME} ]]; then
- for z in $(find ${WORKSPACE} -maxdepth 5 -mindepth 3 -name "*Update*.zip" | sort | tail -1); do
- #echo "$z ..."
- if [[ -f $z ]]; then
- mkdir -p ${STAGINGDIR}/all
- unzip -u -o -q -d ${STAGINGDIR}/all/ $z
-
- # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-
- rsync -aq $z ${STAGINGDIR}/all/${SNAPNAME}
- rsync -aq ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}.MD5
- fi
- done
-fi
-
-# create sources zip
-pushd ${WORKSPACE}/sources
-mkdir -p ${STAGINGDIR}/all
-if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]] && [[ -d ${WORKSPACE}/sources/aggregate/site/zips ]]; then
- srczipname=${SRCSNAME/-Sources-/-Additional-Sources-}
-else
- srczipname=${SRCSNAME}
-fi
-zip ${STAGINGDIR}/all/${srczipname} -q -r * -x hudson_workspace\* -x documentation\* -x download.jboss.org\* -x requirements\* \
- -x workingset\* -x labs\* -x build\* -x \*test\* -x \*target\* -x \*.class -x \*.svn\* -x \*classes\* -x \*bin\* -x \*.zip \
- -x \*docs\* -x \*reference\* -x \*releng\* -x \*.git\* -x \*/lib/\*.jar
-popd
-z=${STAGINGDIR}/all/${srczipname}; for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-
-mkdir -p ${STAGINGDIR}/logs
-
-# collect component zips from upstream aggregated build jobs
-if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]] && [[ -d ${WORKSPACE}/sources/aggregate/site/zips ]]; then
- mkdir -p ${STAGINGDIR}/components
- for z in $(find ${WORKSPACE}/sources/aggregate/site/zips -name "*Update*.zip"); do
- # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
- mv $z ${z}.MD5 ${STAGINGDIR}/components
- done
-
- # TODO :: JBIDE-9870 When we have a -Update-Sources- zip, this can be removed
- mkdir -p ${STAGINGDIR}/all/sources
- # unpack component source zips like jbosstools-pi4soa-3.1_trunk-Sources-SNAPSHOT.zip or jbosstools-3.2_trunk.component--ws-Sources-SNAPSHOT.zip
- for z in $(find ${WORKSPACE}/sources/aggregate/site/zips -name "*Sources*.zip"); do
- zn=${z%*-Sources*.zip}; zn=${zn#*--}; zn=${zn##*/}; zn=${zn#jbosstools-};
- # zn=${zn%_trunk}; zn=${zn%_stable_branch};
- mkdir -p ${STAGINGDIR}/all/sources/${zn}/
- unzip -qq -o -d ${STAGINGDIR}/all/sources/${zn}/ $z
- done
- # add component sources into sources zip
- pushd ${STAGINGDIR}/all/sources
- zip ${STAGINGDIR}/all/${SRCSNAME} -q -r * -x hudson_workspace\* -x documentation\* -x download.jboss.org\* -x requirements\* \
- -x workingset\* -x labs\* -x build\* -x \*test\* -x \*target\* -x \*.class -x \*.svn\* -x \*classes\* -x \*bin\* -x \*.zip \
- -x \*docs\* -x \*reference\* -x \*releng\* -x \*.git\* -x \*/lib/\*.jar
- popd
- rm -fr ${STAGINGDIR}/all/sources
- z=${STAGINGDIR}/all/${SRCSNAME}; for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-
- # JBIDE-7444 get aggregate metadata xml properties file
- if [[ -f ${WORKSPACE}/sources/aggregate/site/zips/build.properties.all.xml ]]; then
- rsync -aq ${WORKSPACE}/sources/aggregate/site/zips/build.properties.all.xml ${STAGINGDIR}/logs/
- fi
-fi
-
-# JBIDE-9870 check if there's a sources update site and rename it if found (note, bottests-site/site/sources won't work; use bottests-site/souces)
-for z in $(find ${WORKSPACE}/sources/aggregate/*/sources/target/ -name "repository.zip" -o -name "site_assembly.zip"); do
- echo "Collect sources from update site in $z"
- mv $z ${STAGINGDIR}/all/${SRCSNAME/-Sources-/-Update-Sources-}
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-done
-
-# generate list of zips in this job
-METAFILE=zip.list.txt
-echo "ALL_ZIPS = \\" >> ${STAGINGDIR}/logs/${METAFILE}
-for z in $(find ${STAGINGDIR} -name "*Update*.zip") $(find ${STAGINGDIR} -name "*Sources*.zip"); do
- # list zips in staging dir
- echo "${z##${STAGINGDIR}/},\\" >> ${STAGINGDIR}/logs/${METAFILE}
-done
-echo "" >> ${STAGINGDIR}/logs/${METAFILE}
-
-# generate md5sums in a single file
-md5sumsFile=${STAGINGDIR}/logs/md5sums.txt
-echo "# Update Site Zips" > ${md5sumsFile}
-echo "# ----------------" >> ${md5sumsFile}
-md5sum $(find . -name "*Update*.zip" | egrep -v "aggregate-Sources|nightly-Update") >> ${md5sumsFile}
-echo " " >> ${md5sumsFile}
-echo "# Source Zips" >> ${md5sumsFile}
-echo "# -----------" >> ${md5sumsFile}
-md5sum $(find . -name "*Source*.zip" | egrep -v "aggregate-Sources|nightly-Update") >> ${md5sumsFile}
-echo " " >> ${md5sumsFile}
-
-mkdir -p ${STAGINGDIR}/logs
-
-if [[ ! $ANT_HOME ]]; then # find ant in PATH - select LAST entry if more than one
- ANT_HOME=$(for d in $(echo ${PATH//:/ }); do if [[ ${d/ant/} != ${d} ]]; then echo -n " ${d%/bin}"; fi; done); ANT_HOME=${ANT_HOME##* }
-fi
-ANT_EXEC="ant"
-if [[ -d ${ANT_HOME} ]] && [[ -x ${ANT_HOME}/bin/ant ]]; then
- export ANT_HOME=${ANT_HOME}
- ANT_EXEC=${ANT_HOME}/bin/ant
-fi
-ANT_LIB="" # add COMMON_TOOLS folder to ant's lib folder
-if [[ -d /home/hudson/static_build_env/jbds/tools ]]; then
- ANT_LIB=" -lib /home/hudson/static_build_env/jbds/tools"
-fi
-ANT_PARAMS=" -DZIPSUFFIX=${ZIPSUFFIX} -DJOB_NAME=${JOB_NAME} -Dinput.dir=${STAGINGDIR} -Doutput.dir=${STAGINGDIR}/logs -DWORKSPACE=${WORKSPACE}"
-for buildxml in ${WORKSPACE}/build/results/build.xml ${WORKSPACE}/sources/build/results/build.xml ${WORKSPACE}/sources/results/build.xml; do
- if [[ -f ${buildxml} ]]; then
- ANT_SCRIPT=${buildxml}
- RESULTS_DIR=${buildxml/\/build.xml/}
- fi
-done
-ANT_TARGET="buildResults.single"; if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]]; then ANT_TARGET="buildResults.aggregate"; fi
-if [[ ${ANT_SCRIPT} ]] && [[ -f ${ANT_SCRIPT} ]]; then ${ANT_EXEC}${ANT_LIB} -f ${ANT_SCRIPT} ${ANT_TARGET} ${ANT_PARAMS}; fi
-
-# copy buildResults.css, buildResults.html to ${STAGINGDIR}/logs
-if [[ ${RESULTS_DIR} ]] && [[ -d ${RESULTS_DIR} ]]; then
- for f in buildResults.html buildResults.css; do
- if [[ -f ${RESULTS_DIR}/${f} ]]; then rsync -arzq ${RESULTS_DIR}/${f} ${STAGINGDIR}/logs/; fi
- done
-fi
-
-# purge duplicate zip files in logs/zips/all/*.zip
-if [[ -d ${STAGINGDIR}/logs/zips ]]; then rm -f $(find ${STAGINGDIR}/logs/zips -type f -name "*.zip"); fi
-
-# ${bl} is full build log; see above
-mkdir -p ${STAGINGDIR}/logs
-# filter out Maven test failures
-fl=${STAGINGDIR}/logs/FAIL_LOG.txt
-# ignore warning lines and checksum failures
-sed -ne "/\[WARNING\]\|CHECKSUM FAILED/ ! p" ${bl} | sed -ne "/<<< FAI/,+9 p" | sed -e "/AILURE/,+9 s/\(.\+AILURE.\+\)/\n----------\n\n\1/g" > ${fl}
-sed -ne "/\[WARNING\]\|CHECKSUM FAILED/ ! p" ${bl} | sed -ne "/ FAI/ p" | sed -e "/AILURE \[/ s/\(.\+AILURE \[.\+\)/\n----------\n\n\1/g" >> ${fl}
-sed -ne "/\[WARNING\]\|CHECKSUM FAILED/ ! p" ${bl} | sed -ne "/ SKI/ p" | sed -e "/KIPPED \[/ s/\(.\+KIPPED \[.\+\)/\n----------\n\n\1/g" >> ${fl}
-fc=$(sed -ne "/FAI\|LURE/ p" ${fl} | wc -l)
-if [[ $fc != "0" ]]; then
- echo "" >> ${fl}; echo -n "FAI" >> ${fl}; echo -n "LURES FOUND: "$fc >> ${fl};
-fi
-fc=$(sed -ne "/KIPPED/ p" ${fl} | wc -l)
-if [[ $fc != "0" ]]; then
- echo "" >> ${fl}; echo -n "SKI" >> ${fl}; echo -n "PS FOUND: "$fc >> ${fl};
-fi
-el=${STAGINGDIR}/logs/ERRORLOG.txt
-# ignore warning lines and checksum failures
-sed -ne "/\[WARNING\]\|CHECKSUM FAILED/ ! p" ${bl} | sed -ne "/<<< ERR/,+9 p" | sed -e "/RROR/,+9 s/\(.\+RROR.\+\)/\n----------\n\n\1/g" > ${el}
-sed -ne "/\[WARNING\]\|CHECKSUM FAILED/ ! p" ${bl} | sed -ne "/\[ERR/,+2 p" | sed -e "/ROR\] Fai/,+2 s/\(.\+ROR\] Fai.\+\)/\n----------\n\n\1/g" >> ${el}
-ec=$(sed -ne "/ERR\|RROR/ p" ${el} | wc -l)
-if [[ $ec != "0" ]]; then
- echo "" >> ${el}; echo -n "ERR" >> ${el}; echo "ORS FOUND: "$ec >> ${el};
-fi
-
-# publish to download.jboss.org, unless errors found - avoid destroying last-good update site
-if [[ $ec == "0" ]] && [[ $fc == "0" ]]; then
- # publish build dir (including update sites/zips/logs/metadata
- if [[ -d ${STAGINGDIR} ]]; then
-
- # if an aggregate build, put output elsewhere on disk
- if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]]; then
- echo "<meta http-equiv=\"refresh\" content=\"0;url=${BUILD_ID}-H${BUILD_NUMBER}/\">" > $tmpdir/latestBuild.html
- if [[ ${PUBLISHPATHSUFFIX} ]]; then
- date
- # create folders if not already there
- if [[ ${DESTINATION##*@*:*} == "" ]]; then # user at server, do remote op
- seg="."; for d in ${PUBLISHPATHSUFFIX/\// }; do seg=$seg/$d; echo -e "mkdir ${seg:2}" | sftp $DESTINATION/builds/nightly/; done; seg=""
- else
- mkdir -p $DESTINATION/builds/nightly/${PUBLISHPATHSUFFIX}
- fi
- date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/* $DESTINATION/builds/nightly/${PUBLISHPATHSUFFIX}/${BUILD_ID}-H${BUILD_NUMBER}/
- # sftp only works with user at server, not with local $DESTINATIONS, so use rsync to push symlink instead
- # echo -e "rm latest\nln ${BUILD_ID}-H${BUILD_NUMBER} latest" | sftp ${DESTINATIONREDUX}/builds/nightly/${PUBLISHPATHSUFFIX}/
- pushd $tmpdir >/dev/null; ln -s ${BUILD_ID}-H${BUILD_NUMBER} latest; rsync --protocol=28 -l latest ${DESTINATION}/builds/nightly/${PUBLISHPATHSUFFIX}/; rm -f latest; popd >/dev/null
- date; rsync -arzq --protocol=28 --delete $tmpdir/latestBuild.html $DESTINATION/builds/nightly/${PUBLISHPATHSUFFIX}/
- else
- date; rsync -arzq --protocol=28 --delete $tmpdir/latestBuild.html $DESTINATION/builds/nightly/${JOBNAMEREDUX}/
- # sftp only works with user at server, not with local $DESTINATIONS, so use rsync to push symlink instead
- # echo -e "rm latest\nln ${BUILD_ID}-H${BUILD_NUMBER} latest" | sftp ${DESTINATIONREDUX}/builds/nightly/${JOBNAMEREDUX}/
- pushd $tmpdir >/dev/null; ln -s ${BUILD_ID}-H${BUILD_NUMBER} latest; rsync --protocol=28 -l latest ${DESTINATION}/builds/nightly/${JOBNAMEREDUX}/; rm -f latest; popd >/dev/null
- date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/* $DESTINATION/builds/nightly/${JOBNAMEREDUX}/${BUILD_ID}-H${BUILD_NUMBER}/
- fi
- rm -f $tmpdir/latestBuild.html
- #else
- # COMMENTED OUT as this uses too much disk space
- # if a release build, create a named dir
- #if [[ ${RELEASE} == "Yes" ]]; then
- # date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/* $DESTINATION/builds/staging/${JOB_NAME}-${ZIPSUFFIX}/
- #fi
- fi
-
- # and create/replace a snapshot dir w/ static URL
- date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/* $DESTINATION/builds/staging/${JOB_NAME}.next
-
- # 1. To recursively purge contents of .../staging.previous/foobar/ folder:
- # mkdir -p $tmpdir/foobar;
- # rsync -aPrz --delete $tmpdir/foobar tools at filemgmt.jboss.org:/downloads_htdocs/tools/builds/staging.previous/
- # 2. To then remove entire .../staging.previous/foobar/ folder:
- # echo -e "rmdir foobar" | sftp tools at filemgmt.jboss.org:/downloads_htdocs/tools/builds/staging.previous/
- # rmdir $tmpdir/foobar
-
- # JBIDE-8667 move current to previous; move next to current
- if [[ ${DESTINATION##*@*:*} == "" ]]; then # user at server, do remote op
- # create folders if not already there (could be empty)
- echo -e "mkdir ${JOB_NAME}" | sftp $DESTINATION/builds/staging/
- echo -e "mkdir ${JOB_NAME}" | sftp $DESTINATION/builds/staging.previous/
- #echo -e "mkdir ${JOB_NAME}.2" | sftp $DESTINATION/builds/staging.previous/
-
- # IF using .2 folders, purge contents of /builds/staging.previous/${JOB_NAME}.2 and remove empty dir
- # NOTE: comment out next section - should only purge one staging.previous/* folder
- #mkdir -p $tmpdir/${JOB_NAME}.2
- #rsync -arzq --delete --protocol=28 $tmpdir/${JOB_NAME}.2 $DESTINATION/builds/staging.previous/
- #echo -e "rmdir ${JOB_NAME}.2" | sftp $DESTINATION/builds/staging.previous/
- #rmdir $tmpdir/${JOB_NAME}.2
-
- # OR, purge contents of /builds/staging.previous/${JOB_NAME} and remove empty dir
- mkdir -p $tmpdir/${JOB_NAME}
- rsync -arzq --protocol=28 --delete $tmpdir/${JOB_NAME} $DESTINATION/builds/staging.previous/
- echo -e "rmdir ${JOB_NAME}" | sftp $DESTINATION/builds/staging.previous/
- rmdir $tmpdir/${JOB_NAME}
-
- # move contents of /builds/staging.previous/${JOB_NAME} into /builds/staging.previous/${JOB_NAME}.2
- #echo -e "rename ${JOB_NAME} ${JOB_NAME}.2" | sftp $DESTINATION/builds/staging.previous/
-
- # move contents of /builds/staging/${JOB_NAME} into /builds/staging.previous/${JOB_NAME}
- echo -e "rename ${JOB_NAME} ../staging.previous/${JOB_NAME}" | sftp $DESTINATION/builds/staging/
-
- # move contents of /builds/staging/${JOB_NAME}.next into /builds/staging/${JOB_NAME}
- echo -e "rename ${JOB_NAME}.next ${JOB_NAME}" | sftp $DESTINATION/builds/staging/
- else # work locally
- # create folders if not already there (could be empty)
- mkdir -p $DESTINATION/builds/staging/${JOB_NAME}
- mkdir -p $DESTINATION/builds/staging.previous/${JOB_NAME}
- #mkdir -p $DESTINATION/builds/staging.previous/${JOB_NAME}.2
-
- # purge contents of /builds/staging.previous/${JOB_NAME}.2 and remove empty dir
- # NOTE: comment out next section - should only purge one staging.previous/* folder
- #rm -fr $DESTINATION/builds/staging.previous/${JOB_NAME}.2/
-
- # OR, purge contents of /builds/staging.previous/${JOB_NAME} and remove empty dir
- rm -fr $DESTINATION/builds/staging.previous/${JOB_NAME}/
-
- # move contents of /builds/staging.previous/${JOB_NAME} into /builds/staging.previous/${JOB_NAME}.2
- #mv $DESTINATION/builds/staging.previous/${JOB_NAME} $DESTINATION/builds/staging.previous/${JOB_NAME}.2
-
- # move contents of /builds/staging/${JOB_NAME} into /builds/staging.previous/${JOB_NAME}
- mv $DESTINATION/builds/staging/${JOB_NAME} $DESTINATION/builds/staging.previous/${JOB_NAME}
-
- # move contents of /builds/staging/${JOB_NAME}.next into /builds/staging/${JOB_NAME}
- mv $DESTINATION/builds/staging/${JOB_NAME}.next $DESTINATION/builds/staging/${JOB_NAME}
- fi
-
- # generate 2 ${STAGINGDIR}/all/composite*.xml files which will point at:
- # /builds/staging/${JOB_NAME}/all/repo/
- # /builds/staging.previous/${JOB_NAME}/all/repo/
- # /builds/staging.previous/${JOB_NAME}.2/all/repo/
- now=$(date +%s000)
- echo "<?xml version='1.0' encoding='UTF-8'?>
-<?compositeMetadataRepository version='1.0.0'?>
-<repository name='JBoss Tools Staging - ${JOB_NAME} Composite' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
-" > ${STAGINGDIR}/all/compositeContent.xml
- echo "<?xml version='1.0' encoding='UTF-8'?>
-<?compositeArtifactRepository version='1.0.0'?>
-<repository name='JBoss Tools Staging - ${JOB_NAME} Composite' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'> " > ${STAGINGDIR}/all/compositeArtifacts.xml
- metadata="<properties size='2'><property name='p2.compressed' value='true'/><property name='p2.timestamp' value='"${now}"'/></properties>
-<children size='2'>
-<child location='../../../staging/${JOB_NAME}/all/repo/'/>
-<child location='../../../staging.previous/${JOB_NAME}/all/repo/'/>
-</children>
-</repository>
-"
- echo $metadata >> ${STAGINGDIR}/all/compositeContent.xml
- echo $metadata >> ${STAGINGDIR}/all/compositeArtifacts.xml
- date; rsync -arzq --protocol=28 ${STAGINGDIR}/all/composite*.xml $DESTINATION/builds/staging/${JOB_NAME}/all/
-
- # create a snapshot dir outside Hudson which is file:// accessible
- date; rsync -arzq --delete ${STAGINGDIR}/* $INTRNALDEST/builds/staging/${JOB_NAME}.next
-
- # cycle internal copy of ${JOB_NAME} in staging and staging.previous
- mkdir -p $INTRNALDEST/builds/staging/${JOB_NAME}/
- # purge contents of /builds/staging.previous/${JOB_NAME} and remove empty dir
- rm -fr $INTRNALDEST/builds/staging.previous/${JOB_NAME}/
- # move contents of /builds/staging/${JOB_NAME} into /builds/staging.previous/${JOB_NAME}
- mv $INTRNALDEST/builds/staging/${JOB_NAME} $INTRNALDEST/builds/staging.previous/${JOB_NAME}
- # move contents of /builds/staging/${JOB_NAME}.next into /builds/staging/${JOB_NAME}
- mv $INTRNALDEST/builds/staging/${JOB_NAME}.next $INTRNALDEST/builds/staging/${JOB_NAME}
- fi
-
- # extra publish step for aggregate update sites ONLY
- if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]]; then
- if [[ ${PUBLISHPATHSUFFIX} ]]; then
- # create folders if not already there
- if [[ ${DESTINATION##*@*:*} == "" ]]; then # user at server, do remote op
- seg="."; for d in ${PUBLISHPATHSUFFIX/\// }; do seg=$seg/$d; echo -e "mkdir ${seg:2}" | sftp $DESTINATION/updates/nightly/; done; seg=""
- else
- mkdir -p $DESTINATION/updates/nightly/${PUBLISHPATHSUFFIX}
- fi
- date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/all/repo/* $DESTINATION/updates/nightly/${PUBLISHPATHSUFFIX}/
- else
- date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/all/repo/* $DESTINATION/updates/nightly/${JOBNAMEREDUX}/
- fi
- fi
-fi
-date
-
-# purge org.jboss.tools metadata from local m2 repo (assumes job is configured with -Dmaven.repo.local=${WORKSPACE}/m2-repo)
-if [[ -d ${WORKSPACE}/m2-repo/org/jboss/tools ]]; then
- rm -rf ${WORKSPACE}/m2-repo/org/jboss/tools
-fi
-
-# publish updated log
-bl=${STAGINGDIR}/logs/BUILDLOG.txt
-rm -f ${bl}; wget -q http://hudson.qa.jboss.com/hudson/job/${JOB_NAME}/${BUILD_NUMBER}/consoleText -O ${bl} --timeout=900 --wait=10 --random-wait --tries=10 --retry-connrefused --no-check-certificate
-date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/logs $DESTINATION/builds/staging/${JOB_NAME}/
-date; rsync -arzq --delete ${STAGINGDIR}/logs $INTRNALDEST/builds/staging/${JOB_NAME}/
-
-# purge tmpdir
-rm -fr $tmpdir
-
-# to avoid looking for files that are still being synched/nfs-copied, wait a bit before trying to run tests (the next step usually)
-sleep 15s
Deleted: trunk/build/publishComponentZipToStaging.sh
===================================================================
--- trunk/build/publishComponentZipToStaging.sh 2012-05-29 08:31:32 UTC (rev 41506)
+++ trunk/build/publishComponentZipToStaging.sh 2012-05-29 08:37:47 UTC (rev 41507)
@@ -1,45 +0,0 @@
-# Use this script to publish 1 or more component update site zips from an aggregate via a Hudson job
-
-if [[ $1 ]]; then
- pattern="$1"
-else
- echo "Must run from Hudson or manually specify pattern"
- echo "eg., $0 \"drools|teiid|usage|jbpm\""
- exit 1
-fi
-
-if [[ $2 ]]; then
- # specify job to publish on commandline
- JOBNAMEREDUX=$2
-elif [[ ${JOB_NAME} ]]; then
- # pull name of the job to publish from the name of the publisher job
- JOBNAMEREDUX=${JOB_NAME/-publish}
-else
- echo "Must run from Hudson or manually specify job name"
- echo "(for offline testing), eg., $0 \"drools|teiid|usage|jbpm\" jbosstools-3.2.0.Beta2.aggregate"
- exit 1
-fi
-
-if [[ $DESTINATION == "" ]]; then DESTINATION="tools at filemgmt.jboss.org:/downloads_htdocs/tools"; fi
-
-# eg., extract 3.2.0.Beta2 from jbosstools-3.2.0.Beta2.aggregate or jbosstools-3.2.0.Beta2.aggregate-publish
-BRANCH=${JOBNAMEREDUX/.aggregate}; BRANCH=${BRANCH/jbosstools-}; #echo $BRANCH
-
-# get zip names from zip.list.txt
-paths=$(wget -q http://download.jboss.org/jbosstools/builds/staging/${JOBNAMEREDUX}/logs/zip.list.txt -O - | egrep -- "-Update-" | egrep "${pattern}" | sed "s#,\\\\##");
-
-for path in $paths; do
- targetZip=${path##*/};targetZip=${targetZip%%-Update-*}-Update.zip;
- #echo ""; echo inputPath=$path; echo targetZip=${targetZip}
-
- #echo "Fetch ${path} as ${targetZip}"
- # to test locally, may need to use --protocol=29 and -P instead of -q
- date; rsync -arzq --rsh=ssh --protocol=28 ${DESTINATION}/builds/staging/${JOBNAMEREDUX}/${path} ${targetZip}
-
- # generate MD5 sums for each zip
- for m in $(md5sum ${targetZip}); do if [[ $m != ${targetZip} ]]; then echo $m > ${targetZip}.MD5; fi; done
-
- #echo "Publish ${path} as ${targetZip}"
- # to test locally, may need to use --protocol=29 and -P instead of -q
- date; rsync -arzq --rsh=ssh --protocol=28 ${targetZip} ${targetZip}.MD5 ${DESTINATION}/updates/staging/$BRANCH/
-done
Deleted: trunk/build/publishUpdateZipToStaging.sh
===================================================================
--- trunk/build/publishUpdateZipToStaging.sh 2012-05-29 08:31:32 UTC (rev 41506)
+++ trunk/build/publishUpdateZipToStaging.sh 2012-05-29 08:37:47 UTC (rev 41507)
@@ -1,30 +0,0 @@
-# Use this script to publish a single update site zip via a Hudson job
-
-if [[ $1 ]]; then
- # specify job to publish on commandline
- JOBNAMEREDUX=$1
-elif [[ ${JOB_NAME} ]]; then
- # pull name of the job to publish from the name of the publisher job
- JOBNAMEREDUX=${JOB_NAME/-publish}
-else
- echo "Must run from Hudson or manually specify job name"
- echo "(for offline testing), eg., $0 jbosstools-teiid-designer"
- exit 1
-fi
-
-if [[ $DESTINATION == "" ]]; then DESTINATION="tools at filemgmt.jboss.org:/downloads_htdocs/tools"; fi
-
-# get zip name from zip.list.txt
-path=$(wget -q http://download.jboss.org/jbosstools/builds/staging/${JOBNAMEREDUX}/logs/zip.list.txt -O - | egrep -- "-Update-" | head -1 | sed "s#,\\\\##");
-
-targetZip="${JOBNAMEREDUX}-Update.zip"
-#echo "Fetch ${path} as ${targetZip}"
-# to test locally, may need to use --protocol=29 and -P instead of -q
-date; rsync -arzq --rsh=ssh --protocol=28 ${DESTINATION}/builds/staging/${JOBNAMEREDUX}/${path} ${targetZip}
-
-# generate MD5 sum for each zip
-for m in $(md5sum ${targetZip}); do if [[ $m != ${targetZip} ]]; then echo $m > ${targetZip}.MD5; fi; done
-
-#echo "Publish ${path} as ${targetZip}"
-# to test locally, may need to use --protocol=29 and -P instead of -q
-date; rsync -arzq --rsh=ssh --protocol=28 ${targetZip} ${targetZip}.MD5 ${DESTINATION}/updates/staging/
More information about the jbosstools-commits
mailing list