Author: nickboldt
Date: 2010-04-12 15:03:47 -0400 (Mon, 12 Apr 2010)
New Revision: 21441
Added:
trunk/genpom.xml
trunk/runstack.sh
trunk/runtests.sh
Modified:
trunk/genpom.scala
trunk/parent-pom.xml
Log:
JBDS-486 port from modular_build branch
Modified: trunk/genpom.scala
===================================================================
--- trunk/genpom.scala 2010-04-12 18:39:33 UTC (rev 21440)
+++ trunk/genpom.scala 2010-04-12 19:03:47 UTC (rev 21441)
@@ -2,19 +2,26 @@
import scala.io.Source
import scala.xml.XML
-object HelloWorld {
+object GenPom {
case class GVA(groupId : String, artifactId : String, version : String)
+ /********** Configuration Start **********/
+ var projectName = "org.jboss.tools"
+ var pathToParentPom = ""
+ var parentPomVersion = "0.0.1-SNAPSHOT"
+ var sourcePomVersion = "0.0.1-SNAPSHOT"
+ /********** Configuration Ends **********/
+
var aggregatorcount = 0
var modulecount = 0
-
+
def main(args: Array[String]) {
generateAggregator(new File("."),
- new File("parent-pom.xml"),
- GVA("org.jboss.tools", "org.jboss.tools.parent.pom",
"0.0.1-SNAPSHOT"),
- GVA("org.jboss.tools", "trunk", "0.0.1-SNAPSHOT")
+ new File(pathToParentPom + "parent-pom.xml"),
+ GVA(projectName, projectName + ".parent.pom", parentPomVersion),
+ GVA(projectName, "trunk", sourcePomVersion)
)
println("Modules: " + modulecount + " Aggregator: " +
aggregatorcount)
@@ -23,6 +30,8 @@
def generateModule(dir : File, parentPom : File, parent : GVA, me : GVA) {
modulecount = modulecount + 1
+
+
var module =
<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>
@@ -35,22 +44,80 @@
<groupId>{me.groupId}</groupId>
<artifactId>{me.artifactId}</artifactId>
<version>{getVersion(dir)}</version>
- <packaging>{
- if (dir.getParentFile().getName().equals("tests"))
+ <packaging>{ if
(dir.getParentFile().getAbsolutePath().endsWith("/tests") ||
dir.getParentFile().getAbsolutePath().endsWith("/tests/."))
"eclipse-test-plugin"
- else if (dir.getParentFile().getName().equals("features"))
+ else if (dir.getParentFile().getAbsolutePath().endsWith("/features") ||
dir.getParentFile().getAbsolutePath().endsWith("/features/."))
"eclipse-feature"
else
- "eclipse-plugin"}</packaging>
- </project>;
-
+ "eclipse-plugin"}</packaging>
+ { getTarget(dir) }
+ </project>;
+
val pp = new scala.xml.PrettyPrinter(80,2)
-
writePom("Module ", pp.format(module), dir)
}
+ def getTarget(dir : File) : Object ={
+ var env = <environment/>;
+
+ if (dir.getAbsolutePath().endsWith("gtk.linux.x86")) {
+ env = <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>;
+ } else if (dir.getAbsolutePath().endsWith("gtk.linux.x86_64")) {
+ env = <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>;
+ } else if (dir.getAbsolutePath().endsWith("carbon.macosx")) {
+ env = <environment>
+ <os>macosx</os>
+ <ws>carbon</ws>
+ <arch>x86</arch>
+ </environment>;
+ } else if (dir.getAbsolutePath().endsWith("cocoa.macosx")) {
+ env = <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86</arch>
+ </environment>;
+ } else if (dir.getAbsolutePath().endsWith("win32.win32.x86")) {
+ env = <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>;
+ }
+
+ var target = <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${{tychoVersion}}</version>
+ <configuration>
+ <resolver>p2</resolver>
+ <environments>
+ { env }
+ </environments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>;
+
+ if(dir.getAbsolutePath().endsWith("x86_64")
+ || dir.getAbsolutePath().endsWith("x86")
+ || dir.getAbsolutePath().endsWith("macosx")) {
+ return target
+ }
+ return ""
+ }
+
def writePom(n : String, pp : String, dir : File) {
val pomxml = new File(dir, "pom.xml")
@@ -103,7 +170,7 @@
def dump(dirs : Collection[File], parentPom : File, parent : GVA, me : GVA) {
for(f <- dirs) {
-
+ var aggregate = false
val manifest = new File(new File(f, "META-INF"),
"MANIFEST.MF")
val plugins = new File(f, "plugins")
val tests = new File(f, "tests")
@@ -118,32 +185,51 @@
}
if(plugins.exists()) {
- generateAggregator(plugins,
+ aggregate = true
+ generateAggregator(plugins,
new File("../../" + parentPom.getPath()),
parent,
- GVA(me.groupId, f.getName() , "0.0.1-SNAPSHOT")
+ GVA(me.groupId, f.getName() + ".plugins" , "0.0.1-SNAPSHOT")
)
}
if(tests.exists()) {
- generateAggregator(tests,
+ aggregate = true
+ generateAggregator(tests,
new File("../../" + parentPom.getPath()),
parent,
- GVA(me.groupId, f.getName() , "0.0.1-SNAPSHOT")
+ GVA(me.groupId, f.getName() + ".tests", "0.0.1-SNAPSHOT")
)
}
if(features.exists()) {
- generateAggregator(features,
+ aggregate = true
+ generateAggregator(features,
new File("../../" + parentPom.getPath()),
parent,
- GVA(me.groupId, f.getName() , "0.0.1-SNAPSHOT")
+ GVA(me.groupId, f.getName()+".features" , "0.0.1-SNAPSHOT")
)
}
+ if(aggregate) {
+ println("Generate Agg for " + f)
+ generateAggregator(f, new File("../" + parentPom.getPath()), parent,
GVA(me.groupId, f.getName()+".all", "0.0.1-SNAPSHOT"))
+ }
}
}
+ def isModule(n : File) : Boolean = {
+ def v = (new File(n, "pom.xml").exists() &&
!n.getName().equals("docs")) ||
+ (!n.getName().contains(".sdk.") && (new File(new File(n,
"META-INF"), "MANIFEST.MF").exists()) || (new File(n,
"feature.xml").exists())) || (hasDirectory(n, "features") ||
hasDirectory(n, "tests") || hasDirectory(n, "plugins"))
+ return v
+ }
+
+ def hasDirectory(parent : File, name : String) : Boolean = {
+
+ val dir = new File(parent, name)
+ return dir.isDirectory() && dir.exists()
+ }
+
def generateAggregator(dir : File,
parentPom : File,
parent : GVA,
@@ -152,11 +238,12 @@
aggregatorcount = aggregatorcount + 1
val dirs = dir.listFiles().filter(
- (n) => n.isDirectory() && !n.getName().startsWith(".")
+ (n) => n.isDirectory() && !n.getName().startsWith(".")
&& !n.getName().contains(".sdk.")
)
val realModules = dirs.filter(
- (n) => n.isDirectory() && !n.getName().startsWith(".")
&& (new File(new File(n, "META-INF"), "MANIFEST.MF").exists()
|| (new File(n, "feature.xml").exists() &&
!n.getName().contains(".sdk."))))
+ (n) => isModule(n))
+
var modules =
<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>
@@ -167,7 +254,7 @@
<version>{parent.version}</version>
</parent>
<groupId>{me.groupId}</groupId>
- <artifactId>{me.artifactId}.{dir.getName()}</artifactId>
+ <artifactId>{me.artifactId}</artifactId>
<version>{me.version}</version>
<packaging>pom</packaging>
<modules>
@@ -191,4 +278,4 @@
}
-HelloWorld.main(args)
+GenPom.main(args)
Added: trunk/genpom.xml
===================================================================
--- trunk/genpom.xml (rev 0)
+++ trunk/genpom.xml 2010-04-12 19:03:47 UTC (rev 21441)
@@ -0,0 +1,805 @@
+<project default="run" basedir=".">
+ <!-- Configuration Start -->
+ <property name="projectName" value="org.jboss.tools" />
+ <property name="pathToParentPom" value="" />
+ <property name="pomVersion" value="0.0.1-SNAPSHOT" />
+ <property name="debug" value="false" />
+ <property name="dirsToExclude"
+ value="**/*.sdk.*, **/doc*, **/download.jboss.org, **/util, **/test,
**/builders, **/releng, ."
+ />
+ <!-- Configuration Ends -->
+
+ <!-- To run this script in Eclipse:
+ Run As > Ant Build
+ -->
+ <!-- To run this script via commandline:
+ cd /home/nboldt/workspace36/jbosstools-modular_build; ant -f genpom.xml -q
+ or, to build a specific module only:
+ cd /home/nboldt/workspace36/jbosstools-modular_build; \
+ ant -f genpom.xml -q -DpathToParentPom=../
-DWORKINGDIR=/home/nboldt/workspace36/jbosstools-modular_build/as
+
+ -->
+
+ <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>
+
+ <!-- override for local build -->
+ <available file="/qa/tools/opt" type="dir"
property="isJBossQA" />
+ <target name="local" unless="isJBossQA">
+ <property name="WORKINGDIR" value="${basedir}" />
+ <property name="COMMON_TOOLS" value="${java.io.tmpdir}" />
+ </target>
+
+ <target name="init" depends="local">
+ <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>
+
+ <macrodef name="debug">
+ <text name="echo" />
+ <sequential>
+ <if>
+ <and>
+ <isset property="debug" />
+ <istrue value="${debug}" />
+ </and>
+ <then>
+ <echo message="@{echo}" />
+ </then>
+ </if>
+ </sequential>
+ </macrodef>
+
+ <!-- = = = = = = = = = = = = = = = = =
+ macrodef: write out a pom.xml which aggregates subdirs
+ = = = = = = = = = = = = = = = = = -->
+ <macrodef name="writeAggregatePom">
+ <attribute name="dir" default="." />
+ <attribute name="parentpom" />
+ <attribute name="artifactId" default="" />
+ <attribute name="artifactVersion" default="" />
+ <sequential>
+ <if>
+ <equals arg1="@{artifactId}" arg2="" />
+ <then>
+ <var name="artifactId" unset="true" />
+ <antcallback target="getArtifactId" return="artifactId">
+ <property name="dir" value="@{dir}" />
+ </antcallback>
+ </then>
+ <else>
+ <var name="artifactId" value="@{artifactId}" />
+ </else>
+ </if>
+ <if>
+ <equals arg1="@{artifactVersion}" arg2="" />
+ <then>
+ <var name="artifactVersion" unset="true" />
+ <antcallback target="getArtifactVersion"
return="artifactVersion">
+ <property name="dir" value="@{dir}" />
+ </antcallback>
+ </then>
+ <else>
+ <var name="artifactVersion" value="@{artifactVersion}"
/>
+ </else>
+ </if>
+ <var name="artifactType" value="pom" />
+ <propertyregex property="activeDir"
+ input="@{dir}"
+ defaultvalue="@{dir}"
+ regexp="${WORKINGDIR}/"
+ replace=""
+ casesensitive="true"
+ override="true"
+ />
+ <debug> Agg dir: ${activeDir}, artifactType: ${artifactType}, artifactId:
${artifactId}, artifactVersion: ${artifactVersion}, parentpom: @{parentpom}</debug>
+ <!-- <echo>Write Agg @{dir}/pom.xml</echo> -->
+ <echo file="(a){dir}/pom.xml">&lt;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>@{parentpom}</relativePath>
+ <groupId>${projectName}</groupId>
+ <artifactId>${projectName}.parent.pom</artifactId>
+ <version>${pomVersion}</version>
+ </parent>
+ <groupId>${projectName}</groupId>
+ <artifactId>${artifactId}</artifactId>
+ <version>${artifactVersion}</version>
+ <packaging>${artifactType}</packaging>
+ <modules>
+</echo>
+ <var name="artifactId" unset="true" />
+ <var name="artifactVersion" unset="true" />
+ <for param="subdir" delimiter=",
+ ">
+ <path>
+ <dirset dir="@{dir}" excludes="${dirsToExclude}"
includes="*" />
+ </path>
+ <sequential>
+ <basename property="subdirSuffix" file="@{subdir}" />
+ <echo file="(a){dir}/pom.xml"
append="true"> <module>${subdirSuffix}</module>
+</echo>
+ <var name="subdirSuffix" unset="true" />
+ </sequential>
+ </for>
+ <echo file="(a){dir}/pom.xml"
append="true"> </modules>
+</project>
+ </echo>
+ </sequential>
+ </macrodef>
+
+ <!-- = = = = = = = = = = = = = = = = =
+ macrodef: write out a pom.xml for a plugin or feature or test
+ = = = = = = = = = = = = = = = = = -->
+ <macrodef name="writeModulePom">
+ <attribute name="dir" default="." />
+ <attribute name="parentpom" />
+ <sequential>
+ <var name="artifactType" unset="true" />
+ <antcallback target="getArtifactType"
return="artifactType">
+ <property name="dir" value="@{dir}" />
+ </antcallback>
+ <if>
+ <!-- cannot calculate id and version for an update site so just set them to
defaults -->
+ <equals arg1="${artifactType}" arg2="eclipse-update-site"
/>
+ <then>
+ <var name="artifactId" unset="true" />
+ <basename property="artifactId" file="@{dir}" />
+ <var name="artifactVersion" value="0.0.0" />
+ </then>
+ <else>
+ <var name="artifactId" unset="true" />
+ <antcallback target="getArtifactId" return="artifactId">
+ <property name="dir" value="@{dir}" />
+ </antcallback>
+ <var name="artifactVersion" unset="true" />
+ <antcallback target="getArtifactVersion"
return="artifactVersion">
+ <property name="dir" value="@{dir}" />
+ </antcallback>
+ </else>
+ </if>
+ <propertyregex property="activeDir"
+ input="@{dir}"
+ defaultvalue="@{dir}"
+ regexp="${WORKINGDIR}/"
+ replace=""
+ casesensitive="true"
+ override="true"
+ />
+ <debug> Mod dir: ${activeDir}, artifactType: ${artifactType}, artifactId:
${artifactId}, artifactVersion: ${artifactVersion}, parentpom: @{parentpom}</debug>
+ <echo file="(a){dir}/pom.xml">&lt;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>@{parentpom}</relativePath>
+ <groupId>${projectName}</groupId>
+ <artifactId>${projectName}.parent.pom</artifactId>
+ <version>${pomVersion}</version>
+ </parent>
+ <groupId>${projectName}</groupId>
+ <artifactId>${artifactId}</artifactId>
+ <version>${artifactVersion}</version>
+ <packaging>${artifactType}</packaging>
+</project>
+ </echo>
+ <var name="artifactId" unset="true" />
+ <var name="artifactVersion" unset="true" />
+ <var name="artifactType" unset="true" />
+ <var name="modulecountstring" value="${modulecountstring}1"
/>
+ </sequential>
+ </macrodef>
+
+ <!-- = = = = = = = = = = = = = = = = =
+ macrodef: generateAggregator
+ = = = = = = = = = = = = = = = = = -->
+ <macrodef name="generateAggregator">
+ <attribute name="dir" default="${WORKINGDIR}" />
+ <attribute name="parentPom"
default="${pathToParentPom}parent-pom.xml" />
+ <attribute name="artifactId" default="" />
+ <attribute name="artifactVersion" default="" />
+ <sequential>
+ <writeAggregatePom dir="@{dir}"
+ parentpom="@{parentpom}"
+ artifactId="@{artifactId}"
+ artifactVersion="@{artifactVersion}"
+ />
+
+ <dump dir="@{dir}"
+ parentpom="@{parentpom}"
+ artifactId="@{artifactId}"
+ artifactVersion="@{artifactVersion}"
+ />
+ <var name="aggregatorcountstring"
value="${aggregatorcountstring}1" />
+
+ </sequential>
+ </macrodef>
+
+
+ <!-- = = = = = = = = = = = = = = = = =
+ macrodef: dump
+ = = = = = = = = = = = = = = = = = -->
+ <macrodef name="dump">
+ <attribute name="dir" />
+ <attribute name="parentpom" />
+ <attribute name="artifactId" default="" />
+ <attribute name="artifactVersion" default="" />
+ <sequential>
+
+ <for param="subdir" delimiter=",
+ ">
+ <path>
+ <dirset dir="@{dir}" excludes="${dirsToExclude}"
includes="*" />
+ </path>
+ <sequential>
+ <!-- <debug> @{subdir}</debug> -->
+ <var name="aggregate" value="false" />
+ <if>
+ <or>
+ <!-- a plugin, feature, or update site dir -->
+ <available file="(a){subdir}/META-INF/MANIFEST.MF"
type="file" />
+ <available file="(a){subdir}/feature.xml" type="file" />
+ <available file="(a){subdir}/site.xml" type="file" />
+ </or>
+ <then>
+ <!-- valid place to create a pom -->
+ <writeModulePom dir="@{subdir}"
parentpom="../@{parentpom}" />
+ </then>
+ <else>
+ <for list="plugins tests features" param="type"
delimiter=" ">
+ <sequential>
+ <basename property="artifactIdAgg" file="@{subdir}"
/>
+ <if>
+ <available file="@{subdir}/@{type}" type="dir" />
+ <then>
+ <var name="aggregate" value="true" />
+ <generateAggregator dir="@{subdir}/@{type}"
+ parentpom="../../@{parentpom}"
+ artifactId="${artifactIdAgg}.@{type}"
+ artifactVersion="@{artifactVersion}"
+ />
+ </then>
+ </if>
+ <var name="artifactIdAgg" unset="true" />
+ </sequential>
+ </for>
+
+ <if>
+ <istrue value="${aggregate}" />
+ <else>
+ <basename property="artifactIdAgg" file="@{subdir}"
/>
+ <writeAggregatePom dir="@{subdir}"
+ parentpom="../${pathToParentPom}parent-pom.xml"
+ artifactId="${artifactIdAgg}.all"
+ artifactVersion="@{artifactVersion}"
+ />
+
+ <debug>subdir = @{subdir}</debug>
+ <echo>Aggregated: ${artifactIdAgg}</echo>
+
+ <var name="artifactIdAgg" unset="true" />
+ </else>
+ </if>
+ </else>
+ </if>
+ </sequential>
+ </for>
+ </sequential>
+ </macrodef>
+
+ <!-- = = = = = = = = = = = = = = = = =
+ macrodef: count items in a list
+ = = = = = = = = = = = = = = = = = -->
+ <!-- example usage:
+ <list.count list="foo bar baz" />
+ <echo message="${list.count.return}" />
+ <var name="list.count.return" unset="true"/>
+ <list.count list="foo bar" />
+ <echo message="${list.count.return}" />
+ -->
+ <macrodef name="list.count">
+ <attribute name="list" default="" />
+ <sequential>
+ <var name="count" value="" />
+ <for param="listitem" list="@{list}" delimiter=",
+ ">
+ <sequential>
+ <var name="count" value="${count}0" />
+ </sequential>
+ </for>
+ <length property="list.count.return" string="${count}" />
+ </sequential>
+ </macrodef>
+
+ </target>
+
+ <target name="run" depends="init">
+ <if>
+ <not>
+ <available file="${WORKINGDIR}/${pathToParentPom}parent-pom.xml"
type="file" />
+ </not>
+ <then>
+ <fail>Error: no parent-pom.xml found in
${WORKINGDIR}/${pathToParentPom}</fail>
+ </then>
+ </if>
+
+ <!-- if set, compare values in tags file to values found in manifests and report
discrepancies -->
+ <!--<property name="tagsFile"
+
value="/home/nboldt/eclipse/workspace-jboss/devstudio-trunk/releng/org.jboss.ide.eclipse.releng/builders/product/versionTags/jbosstools/3.1.0.GA.tags"
+ />-->
+
+ <if>
+ <and>
+ <isset property="tagsFile" />
+ <available file="${tagsFile}" type="file" />
+ </and>
+ <then>
+ <property file="${tagsFile}" prefix="tagsFile" />
+ </then>
+ </if>
+
+ <!-- counter variables -->
+ <var name="aggregatorcountstring" value="" />
+ <var name="modulecountstring" value="" />
+
+ <!-- call generateAggregator for overall -->
+ <generateAggregator dir="${WORKINGDIR}"
+ parentpom="${pathToParentPom}parent-pom.xml"
+ artifactId="trunk"
+ artifactVersion="${pomVersion}"
+ />
+ <!-- summary -->
+ <length string="${modulecountstring}" property="modulecount"
/>
+ <length string="${aggregatorcountstring}"
property="aggregatorcount" />
+ <echo>Modules: ${modulecount} Aggregations: ${aggregatorcount}</echo>
+
+ </target>
+
+ <target name="getArtifactType">
+ <property name="dir" value="." />
+ <if>
+ <matches string="${dir}" pattern=".+/features/.+" />
+ <then>
+ <var name="artifactType" value="eclipse-feature" />
+ </then>
+ <elseif>
+ <or>
+ <matches string="${dir}" pattern=".+/site" />
+ <matches string="${dir}" pattern=".+site" />
+ </or>
+ <then>
+ <var name="artifactType" value="eclipse-update-site" />
+ </then>
+ </elseif>
+ <elseif>
+ <and>
+ <not>
+ <matches string="${dir}" pattern=".+/plugins/.+" />
+ </not>
+ <matches string="${dir}" pattern=".+/tests/.+" />
+ </and>
+ <then>
+ <var name="artifactType" value="eclipse-test-plugin" />
+ </then>
+ </elseif>
+ <else>
+ <var name="artifactType" value="eclipse-plugin" />
+ </else>
+ </if>
+ </target>
+
+ <target name="getArtifactVersion">
+ <property name="dir" value="." />
+ <!-- echo>${dir}</echo -->
+ <if>
+ <available file="${dir}/META-INF/MANIFEST.MF" type="file"
/>
+ <then>
+ <!-- get Bundle-SymbolicName: -->
+ <loadfile srcfile="${dir}/META-INF/MANIFEST.MF"
property="artifactVersion">
+ <filterchain>
+ <linecontains>
+ <contains value="Bundle-Version:" />
+ </linecontains>
+ </filterchain>
+ </loadfile>
+ <propertyregex property="artifactVersion"
+ input="${artifactVersion}"
+ defaultvalue="${artifactVersion}"
+ regexp="Bundle-Version:( +)([^\n\r]+)[\n\r]+"
+ replace="\2"
+ casesensitive="true"
+ override="true"
+ />
+
+ <!-- compare tags file to current manifests -->
+ <antcallback target="checkArtifactVersionAgainstTagFile"
return="artifactVersion.from.tag" />
+ <if>
+ <and>
+ <isset property="artifactVersion.from.tag" />
+ <not>
+ <equals arg1="${artifactVersion.from.tag}"
arg2="${artifactVersion}" />
+ </not>
+ </and>
+ <then>
+ <loadfile property="manifest.file"
srcfile="${dir}/META-INF/MANIFEST.MF">
+ <filterchain>
+ <tokenfilter>
+ <replaceregex pattern="Bundle-Version:( +)${artifactVersion}"
+ replace="Bundle-Version: ${artifactVersion.from.tag}"
+ flags=""
+ />
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+ <echo message="${manifest.file}"
file="${dir}/META-INF/MANIFEST.MF" />
+ <var name="manifest.file" unset="true" />
+ </then>
+ <else>
+ <var name="artifactVersion.from.tag"
value="${artifactVersion}" />
+ </else>
+ </if>
+
+ <!-- now, switch to Maven style (s/.qualifier/-SNAPSHOT/) -->
+ <propertyregex property="artifactVersion"
+ input="${artifactVersion.from.tag}"
+ defaultvalue="${artifactVersion.from.tag}"
+ regexp="(.+).qualifier"
+ replace="\1-SNAPSHOT"
+ casesensitive="true"
+ override="true"
+ />
+ <var name="artifactVersion.from.tag" unset="true" />
+ </then>
+ <elseif>
+ <available file="${dir}/feature.xml" type="file" />
+ <then>
+ <!-- get <feature version=""> -->
+ <xmlproperty file="${dir}/feature.xml"
collapseAttributes="true" />
+ <var name="artifactVersion" value="${feature.version}" />
+
+ <!-- compare tags file to current manifests -->
+ <antcallback target="checkArtifactVersionAgainstTagFile"
return="artifactVersion.from.tag" />
+ <if>
+ <and>
+ <isset property="artifactVersion.from.tag" />
+ <not>
+ <equals arg1="${artifactVersion.from.tag}"
arg2="${artifactVersion}" />
+ </not>
+ </and>
+ <then>
+ <loadfile property="manifest.file"
srcfile="${dir}/feature.xml">
+ <filterchain>
+ <tokenfilter>
+ <replaceregex
pattern="version="${artifactVersion}""
+
replace="version="${artifactVersion.from.tag}""
+ flags=""
+ />
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+ <echo message="${manifest.file}" file="${dir}/feature.xml"
/>
+ <var name="manifest.file" unset="true" />
+ </then>
+ <else>
+ <var name="artifactVersion.from.tag"
value="${artifactVersion}" />
+ </else>
+ </if>
+ <var name="feature.version" unset="true" />
+
+ <!-- now, switch to Maven style (s/.qualifier/-SNAPSHOT/) -->
+ <propertyregex property="artifactVersion"
+ input="${artifactVersion.from.tag}"
+ defaultvalue="${artifactVersion.from.tag}"
+ regexp="(.+).qualifier"
+ replace="\1-SNAPSHOT"
+ casesensitive="true"
+ override="true"
+ />
+ <var name="artifactVersion.from.tag" unset="true" />
+ </then>
+ </elseif>
+ <else>
+ <echo>Warning! artifactVersion not found for ${dir}!</echo>
+ <var name="artifactVersion" value="0.0.0" />
+ </else>
+ </if>
+ </target>
+
+ <target name="checkArtifactVersionAgainstTagFile">
+ <dirname property="this.dir" file="${dir}" />
+ <dirname property="parent.dir.path" file="${this.dir}" />
+ <basename property="parent.dir" file="${parent.dir.path}" />
+ <var name="this.dir" unset="true" />
+ <var name="parent.dir.path" unset="true" />
+ <if>
+ <isset property="tagsFile.${parent.dir}" />
+ <then>
+ <propertycopy from="tagsFile.${parent.dir}"
property="artifactVersion.from.tag" />
+ <propertyregex property="artifactVersion.from.tag"
+ input="${artifactVersion.from.tag}"
+ defaultvalue="${artifactVersion.from.tag}"
+ regexp="(.+).GA"
+ replace="\1.qualifier"
+ casesensitive="true"
+ override="true"
+ />
+ </then>
+ </if>
+ <if>
+ <and>
+ <isset property="tagsFile.${parent.dir}" />
+ <not>
+ <equals arg1="${artifactVersion}"
arg2="${artifactVersion.from.tag}" />
+ </not>
+ </and>
+ <then>
+ <basename file="${dir}" property="this.dir" />
+ <echo>For ${this.dir}, got ${artifactVersion}; should be
${artifactVersion.from.tag}</echo>
+ </then>
+ <else>
+ <var name="artifactVersion.from.tag"
value="${artifactVersion}" />
+ </else>
+ </if>
+ <var name="parent.dir" unset="true" />
+ </target>
+
+ <target name="getArtifactId">
+ <property name="dir" value="." />
+ <!-- echo>${dir}</echo -->
+ <if>
+ <available file="${dir}/META-INF/MANIFEST.MF" type="file"
/>
+ <then>
+ <!-- get Bundle-SymbolicName: -->
+ <loadfile srcfile="${dir}/META-INF/MANIFEST.MF"
property="artifactId">
+ <filterchain>
+ <linecontains>
+ <contains value="Bundle-SymbolicName:" />
+ </linecontains>
+ </filterchain>
+ </loadfile>
+ <propertyregex property="artifactId"
+ input="${artifactId}"
+ defaultvalue="${artifactId}"
+ regexp="Bundle-SymbolicName:([\t ]+)([^\n\r\t ]+);(.+)[\n\r\t
]+"
+ replace="\2"
+ casesensitive="true"
+ override="true"
+ />
+ <propertyregex property="artifactId"
+ input="${artifactId}"
+ defaultvalue="${artifactId}"
+ regexp="Bundle-SymbolicName:([\t ]+)([^\n\r\t ]+)[\n\r\t
]+"
+ replace="\2"
+ casesensitive="true"
+ override="true"
+ />
+ </then>
+ <elseif>
+ <available file="${dir}/feature.xml" type="file" />
+ <then>
+ <!-- get <feature id=""> -->
+ <xmlproperty file="${dir}/feature.xml"
collapseAttributes="true" />
+ <var name="artifactId" value="${feature.id}" />
+ <var name="feature.id" unset="true" />
+ </then>
+ </elseif>
+ <else>
+ <echo>Warning! artifactId not found for ${dir}!</echo>
+ <basename property="artifactId" file="${dir}" />
+ </else>
+ </if>
+ </target>
+
+ <!-- ************************************ TESTS ************************************
-->
+
+ <target name="test.expected.values">
+ <property name="ant.enable.asserts" value="true" />
+
+ <!-- expected values for artifactVersion tests -->
+ <property name="artifactVersion.esb/features/org.jboss.tools.esb.feature"
value="1.0.0" />
+ <property
name="artifactVersion.as/tests/org.jboss.ide.eclipse.as.archives.integration.test"
value="1.0.0" />
+ <property name="artifactVersion.esb/plugins/org.jboss.tools.esb.core"
value="2.0.0" />
+ <property
name="artifactVersion.bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui"
value="0.5.0-SNAPSHOT" />
+ <property
name="artifactVersion.bpel/features/org.jboss.tools.bpel.sdk.feature"
value="1.0.0-SNAPSHOT" />
+ <property name="artifactVersion.bpel/plugins/org.eclipse.bpel.xpath10"
value="0.5.0-SNAPSHOT" />
+ <property
name="artifactVersion.vpe/plugins/org.jboss.tools.vpe.ui.palette"
value="2.1.0" />
+ <property
name="artifactVersion.tests/features/org.jboss.tools.test.feature"
value="2.0.0" />
+ <property
name="artifactVersion.portlet/features/org.jboss.tools.portlet.test.feature"
value="1.0.0" />
+ <property name="artifactVersion.jst/features/org.jboss.tools.jst.feature"
value="2.0.0" />
+ <property
name="artifactVersion.jst/features/org.jboss.tools.jst.web.tiles.feature"
value="2.0.0" />
+
+ <!-- expected values for artifactId tests -->
+ <property name="artifactId.esb/features/org.jboss.tools.esb.feature"
value="org.jboss.tools.esb.feature" />
+ <property
name="artifactId.as/tests/org.jboss.ide.eclipse.as.archives.integration.test"
+ value="org.jboss.ide.eclipse.as.archives.integration.test"
+ />
+ <property name="artifactId.esb/plugins/org.jboss.tools.esb.core"
value="org.jboss.tools.esb.core" />
+ <property
name="artifactId.bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui"
+ value="org.eclipse.bpel.apache.ode.deploy.ui"
+ />
+ <property
name="artifactId.bpel/features/org.jboss.tools.bpel.sdk.feature"
+ value="org.jboss.tools.bpel.sdk.feature"
+ />
+ <property name="artifactId.bpel/plugins/org.eclipse.bpel.xpath10"
value="org.eclipse.bpel.xpath10" />
+ <property name="artifactId.vpe/plugins/org.jboss.tools.vpe.ui.palette"
value="org.jboss.tools.vpe.ui.palette" />
+ <property name="artifactId.tests/features/org.jboss.tools.test.feature"
value="org.jboss.tools.test.feature" />
+ <property
name="artifactId.portlet/features/org.jboss.tools.portlet.test.feature"
+ value="org.jboss.tools.portlet.test.feature"
+ />
+ <property name="artifactId.jst/features/org.jboss.tools.jst.feature"
value="org.jboss.tools.jst.feature" />
+ <property
name="artifactId.jst/features/org.jboss.tools.jst.web.tiles.feature"
+ value="org.jboss.tools.jst.web.tiles.feature"
+ />
+
+ <!-- expected values for artifactType tests -->
+ <property name="artifactType.esb/features/org.jboss.tools.esb.feature"
value="eclipse-feature" />
+ <property
name="artifactType.as/tests/org.jboss.ide.eclipse.as.archives.integration.test"
+ value="eclipse-test-plugin"
+ />
+ <property name="artifactType.esb/plugins/org.jboss.tools.esb.core"
value="eclipse-plugin" />
+ <property
name="artifactType.bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui"
value="eclipse-plugin" />
+ <property
name="artifactType.bpel/features/org.jboss.tools.bpel.sdk.feature"
value="eclipse-feature" />
+ <property name="artifactType.bpel/plugins/org.eclipse.bpel.xpath10"
value="eclipse-plugin" />
+ <property name="artifactType.vpe/plugins/org.jboss.tools.vpe.ui.palette"
value="eclipse-plugin" />
+ <property name="artifactType.tests/features/org.jboss.tools.test.feature"
value="eclipse-feature" />
+ <property
name="artifactType.portlet/features/org.jboss.tools.portlet.test.feature"
value="eclipse-feature" />
+ <property name="artifactType.jst/features/org.jboss.tools.jst.feature"
value="eclipse-feature" />
+ <property
name="artifactType.jst/features/org.jboss.tools.jst.web.tiles.feature"
value="eclipse-feature" />
+ </target>
+
+ <target name="test.all">
+
+ <property name="dirs"
+ value="
+ ${WORKINGDIR}/esb/features/org.jboss.tools.esb.feature
+ ${WORKINGDIR}/as/tests/org.jboss.ide.eclipse.as.archives.integration.test
+ ${WORKINGDIR}/esb/plugins/org.jboss.tools.esb.core
+ ${WORKINGDIR}/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui
+ ${WORKINGDIR}/bpel/features/org.jboss.tools.bpel.sdk.feature
+ ${WORKINGDIR}/bpel/plugins/org.eclipse.bpel.xpath10
+ ${WORKINGDIR}/vpe/plugins/org.jboss.tools.vpe.ui.palette
+ ${WORKINGDIR}/tests/features/org.jboss.tools.test.feature
+ ${WORKINGDIR}/portlet/features/org.jboss.tools.portlet.test.feature
+ ${WORKINGDIR}/jst/features/org.jboss.tools.jst.feature
+ ${WORKINGDIR}/jst/features/org.jboss.tools.jst.web.tiles.feature
+ "
+ />
+ <antcall target="test.getArtifactVersion" />
+ <antcall target="test.getArtifactId" />
+ <antcall target="test.getArtifactType" />
+ </target>
+
+ <target name="test.getArtifactVersion" depends="init,
test.expected.values">
+ <property name="dirs"
+ value="
+ ${WORKINGDIR}/esb/features/org.jboss.tools.esb.feature
+ ${WORKINGDIR}/as/tests/org.jboss.ide.eclipse.as.archives.integration.test
+ ${WORKINGDIR}/esb/plugins/org.jboss.tools.esb.core
+ ${WORKINGDIR}/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui
+ ${WORKINGDIR}/tests/features/org.jboss.tools.test.feature
+ ${WORKINGDIR}/portlet/features/org.jboss.tools.portlet.test.feature
+ ${WORKINGDIR}/jst/features/org.jboss.tools.jst.feature
+ ${WORKINGDIR}/jst/features/org.jboss.tools.jst.web.tiles.feature
+ "
+ />
+ <for param="dir" list="${dirs}" delimiter=",
+ ">
+ <sequential>
+ <antcallback target="getArtifactVersion"
return="artifactVersion">
+ <property name="dir" value="@{dir}" />
+ </antcallback>
+ <propertyregex property="activeDir"
+ input="@{dir}"
+ defaultvalue="@{dir}"
+ regexp="${WORKINGDIR}/"
+ replace=""
+ casesensitive="true"
+ override="true"
+ />
+ <propertycopy name="expected.value"
from="artifactVersion.${activeDir}" />
+ <assert failonerror="false"
+ message="For ${activeDir}, artifactVersion = ${artifactVersion};
expected ${expected.value}"
+ >
+ <bool>
+ <equals arg1="${expected.value}" arg2="${artifactVersion}"
/>
+ </bool>
+ </assert>
+ <var name="expected.value" unset="true" />
+ <var name="artifactVersion" unset="true" />
+ </sequential>
+ </for>
+ </target>
+
+ <target name="test.getArtifactId" depends="init,
test.expected.values">
+ <property name="dirs"
+ value="
+ ${WORKINGDIR}/esb/features/org.jboss.tools.esb.feature
+ ${WORKINGDIR}/as/tests/org.jboss.ide.eclipse.as.archives.integration.test
+ ${WORKINGDIR}/esb/plugins/org.jboss.tools.esb.core
+ "
+ />
+ <for param="dir" list="${dirs}" delimiter=",
+ ">
+ <sequential>
+ <antcallback target="getArtifactId" return="artifactId">
+ <property name="dir" value="@{dir}" />
+ </antcallback>
+ <propertyregex property="activeDir"
+ input="@{dir}"
+ defaultvalue="@{dir}"
+ regexp="${WORKINGDIR}/"
+ replace=""
+ casesensitive="true"
+ override="true"
+ />
+ <propertycopy name="expected.value"
from="artifactId.${activeDir}" />
+ <assert failonerror="false"
+ message="For ${activeDir}, artifactId = ${artifactId}; expected
${expected.value}"
+ >
+ <bool>
+ <equals arg1="${expected.value}" arg2="${artifactId}" />
+ </bool>
+ </assert>
+ <var name="expected.value" unset="true" />
+ <var name="artifactId" unset="true" />
+ </sequential>
+ </for>
+ </target>
+
+ <target name="test.getArtifactType" depends="init,
test.expected.values">
+ <property name="dirs"
+ value="
+ ${WORKINGDIR}/esb/features/org.jboss.tools.esb.feature
+ ${WORKINGDIR}/as/tests/org.jboss.ide.eclipse.as.archives.integration.test
+ ${WORKINGDIR}/esb/plugins/org.jboss.tools.esb.core
+ "
+ />
+ <for param="dir" list="${dirs}" delimiter=",
+ ">
+ <sequential>
+ <antcallback target="getArtifactType"
return="artifactType">
+ <property name="dir" value="@{dir}" />
+ </antcallback>
+ <propertyregex property="activeDir"
+ input="@{dir}"
+ defaultvalue="@{dir}"
+ regexp="${WORKINGDIR}/"
+ replace=""
+ casesensitive="true"
+ override="true"
+ />
+ <propertycopy name="expected.value"
from="artifactType.${activeDir}" />
+ <assert failonerror="false"
+ message="For ${activeDir}, artifactType = ${artifactType}; expected
${expected.value}"
+ >
+ <bool>
+ <equals arg1="${expected.value}" arg2="${artifactType}"
/>
+ </bool>
+ </assert>
+ <var name="expected.value" unset="true" />
+ <var name="artifactType" unset="true" />
+ </sequential>
+ </for>
+ </target>
+
+</project>
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-04-12 18:39:33 UTC (rev 21440)
+++ trunk/parent-pom.xml 2010-04-12 19:03:47 UTC (rev 21441)
@@ -30,11 +30,6 @@
<environment>
<os>macosx</os>
<ws>cocoa</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
<arch>x86</arch>
</environment>
<environment>
@@ -60,19 +55,145 @@
</environments>
</configuration>
</plugin>
-<plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <version>${tychoVersion}</version>
- <configuration>
- <useUIHarness>true</useUIHarness>
- <useUIThread>true</useUIThread>
- </configuration>
- </plugin>
+ <!--
+ to skip running tests (compile only) use commandline flag:
+ -Dmaven.test.skip
+ To allow all tests in a pom to pass/fail, use commandline flag:
+ -fae (fail at end)
+ -->
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <!--
https://docs.sonatype.org/display/TYCHO/How+to+run+SWTBot+tests+with+Tycho
-->
+ <!-- set useUIThread=true for regular ui tests -->
+ <!-- set useUIThread=false for swtbot tests (?) -->
+ <product>org.eclipse.sdk.ide</product>
+ <application>org.eclipse.ui.ide.workbench</application>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.sdk.ide</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ <includes>
+ <include>**/*AllTests*.class</include>
+ <include>**/*AllBotTests*.class</include>
+ <include>**/*TestSuite*.class</include>
+ </includes>
+ <parallel>true</parallel>
+ </configuration>
+ </plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>helios</id>
+ <activation>
+ <property>
+ <name>helios</name>
+ </property>
+ </activation>
+ <repositories>
+ <repository>
+ <id>helios</id>
+ <
url>http://download.eclipse.org/releases/helios/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>eclipse36</id>
+ <
url>http://download.eclipse.org/eclipse/updates/3.6/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>birt26</id>
+ <
url>http://download.eclipse.org/birt/update-site/2.6/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>swtbot-helios</id>
+ <
url>http://download.eclipse.org/technology/swtbot/helios/dev-build/upd...
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ </profile>
+ <profile>
+ <id>svn-repos</id>
+ <activation>
+ <property>
+ <name>svn</name>
+ </property>
+ </activation>
+ <repositories>
+ <repository>
+ <id>subclipse16</id>
+ <
url>http://subclipse.tigris.org/update_1.6.x/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>subversive07</id>
+ <
url>http://download.eclipse.org/technology/subversive/0.7/update-site/...
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>subversive20</id>
+ <
url>http://community.polarion.com/projects/subversive/download/eclipse...
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ </repositories>
+ </profile>
+ </profiles>
+
<repositories>
<repository>
<id>galileo</id>
@@ -97,8 +218,8 @@
</releases>
</repository>
<repository>
- <id>webtools</id>
- <
url>http://download.eclipse.org/webtools/updates/</url>
+ <id>birt25r</id>
+ <
url>http://download.eclipse.org/birt/update-site/2.5</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -108,8 +229,9 @@
</releases>
</repository>
<repository>
- <id>m2eclipse</id>
- <
url>http://m2eclipse.sonatype.org/sites/m2e/</url>
+ <id>swtbot-galileo</id>
+ <
url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/up...
+ </url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -118,9 +240,10 @@
<enabled>true</enabled>
</releases>
</repository>
+
<repository>
- <id>m2eclipse-extras</id>
- <
url>http://m2eclipse.sonatype.org/sites/m2e-extras/</url>
+ <id>webtools</id>
+ <
url>http://download.eclipse.org/webtools/updates/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -130,8 +253,8 @@
</releases>
</repository>
<repository>
- <id>birt25</id>
- <
url>http://download.eclipse.org/birt/update-site/2.5/</url>
+ <id>m2eclipse</id>
+ <
url>http://m2eclipse.sonatype.org/sites/m2e/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -141,8 +264,8 @@
</releases>
</repository>
<repository>
- <id>subclipse16</id>
- <
url>http://subclipse.tigris.org/update_1.6.x/</url>
+ <id>m2eclipse-extras</id>
+ <
url>http://m2eclipse.sonatype.org/sites/m2e-extras/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -151,32 +274,10 @@
<enabled>true</enabled>
</releases>
</repository>
- <repository>
- <id>subversive07</id>
- <
url>http://download.eclipse.org/technology/subversive/0.7/update-site/...
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>subversive20</id>
- <
url>http://community.polarion.com/projects/subversive/download/eclipse...
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
<repository>
<id>xulrunner</id>
- <
url>http://download.jboss.org/tools/updates/xulrunner/</url>
+ <
url>http://download.jboss.org/jbosstools/updates/xulrunner/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -185,111 +286,19 @@
<enabled>true</enabled>
</releases>
</repository>
-
- <!--
- <repository>
- <id>xpcom1912a</id>
- <
url>http://repository.jboss.org/xulrunner/org.mozilla.xpcom_1.9.1.2a.j...
- <layout>jar</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>xulrunner1912-carbon32</id>
- <
url>http://repository.jboss.org/xulrunner/org.mozilla.xulrunner.carbon...
- <layout>jar</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>xulrunner1912-cocoa32</id>
- <
url>http://repository.jboss.org/xulrunner/org.mozilla.xulrunner.cocoa....
- <layout>jar</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>xulrunner1912-linux32</id>
- <
url>http://repository.jboss.org/xulrunner/org.mozilla.xulrunner.gtk.li...
- <layout>jar</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>xulrunner1912-linux64</id>
- <
url>http://repository.jboss.org/xulrunner/org.mozilla.xulrunner.gtk.li...
- <layout>jar</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>xulrunner1912-win32</id>
- <
url>http://repository.jboss.org/xulrunner/org.mozilla.xulrunner.win32....
- <layout>jar</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- -->
- <!--
- <repository>
- <id>jbosstools31</id>
- <
url>http://download.jboss.org/tools/updates/stable/galileo</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- -->
- <!--
- <repository>
- <id>jbosstools32-nightly</id>
- <
url>http://download.jboss.org/tools/updates/nightly/trunk</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- -->
</repositories>
- <pluginRepositories>
+ <!-- <pluginRepositories>
<pluginRepository>
<id>tycho</id>
<
url>http://repository.sonatype.org/content/repositories/all-001/
</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
- </pluginRepositories>
+ </pluginRepositories> -->
</project>
Added: trunk/runstack.sh
===================================================================
--- trunk/runstack.sh (rev 0)
+++ trunk/runstack.sh 2010-04-12 19:03:47 UTC (rev 21441)
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+#root of svn tree
+workingdir=~/workspace36/jbosstools-modular_build
+
+#use commandline args as list of components to build
+if [[ $# -lt 1 ]]; then
+ echo "Usage: $0 component1 component2 ..."
+ echo "Eg. $0 tests common jmx archives as"
+ echo "Eg. $0 jst jsf vpe struts seam"
+ exit 1
+fi
+
+flags=""
+components=""
+while [ "$#" -gt 0 ]; do
+ case $1 in
+ '-'*) flags="$flags $1"; shift 1;;
+ *) components="$components $1"; shift 1;;
+ esac
+done
+
+# run builds w/o running tests
+for d in $components; do
+ # build features, plugins, and tests, but do not RUN tests
+ #cd $workingdir; ./runtests.sh ${d}/ clean install -Dmaven.test.skip
+
+ # build features, plugins, and tests, then run ALL tests (don't stop after first
failed test)
+ cd $workingdir; ./runtests.sh ${d}/ clean install --fail-at-end $flags
+done
+
+# collect compilation results and failures
+for d in $components; do
+ cd $workingdir; echo "==== $d ===="
+ egrep -v "org\.|com\." $d/buildlog.latest.txt | egrep
"SUCCESS|FAIL"
+ egrep -A1 "Cannot complete the request|depends on|satisfy dependency|Missing
requirement|requires '.+'" $d/buildlog.latest.txt
+ echo ""
+done
+
Property changes on: trunk/runstack.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/runtests.sh
===================================================================
--- trunk/runtests.sh (rev 0)
+++ trunk/runtests.sh 2010-04-12 19:03:47 UTC (rev 21441)
@@ -0,0 +1,89 @@
+#!/bin/bash
+
+# set corect path to mvn on your machine:
+mvn3=/opt/maven3/bin/mvn
+
+if [[ $# -lt 1 ]]; then
+ # some useful flags:
+ # -pl - list of projects to build
+ # -o - offline mode (don't search remote repos)
+ # -Dmaven.test.skip - compile but do not run tests
+ # --fail-at-end - fail build after ALL tests have run, not at first failure
+ echo "Usage: $0 workingdir flags targets"
+ echo "Eg: $0 as/ -Dmaven.test.skip clean install"
+ echo "Eg: $0 bpel/tests/ -o --fail-at-end install"
+ exit 1;
+fi
+
+#echo "[runtests] $0 started on: `date +%H\:%M\:%S`";
+
+# environment variables
+PATH=.:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/X11R6/bin:`pwd`/../linux;export
PATH
+
+#export USERNAME=`whoami`
+#echo "[runtests] Run as $USERNAME";
+#echo "[runtests] With PATH = $PATH";
+
+# fix for org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
+# fix for Failed to invoke suite():org.eclipse.swt.SWTError: No more handles
[gtk_init_check() failed]
+export CVS_RSH=ssh
+#ulimit -c unlimited; # set corefile size to unlimited; not allowed on build.eclipse
+
+#echo "[runtests] Set JAVA_HIGH_ZIPFDS=500 & LANG=C";
+#export JAVA_HIGH_ZIPFDS=500
+#export LANG=C
+
+usedPorts=""; maxPort=40
+for port in $(ps aux | egrep '[Xvnc|Xvfb]\ :' | egrep " :[0-9]+" | sed
"s/\(\^\|.\+\)\(Xvfb\|Xvnc\) :\([0-9]\+\)\(.\+\|$\)/\3/g" | sort); do
+ if [[ $(echo $port | egrep "^:[0-9]+$") ]]; then
+ usedPorts=$usedPorts" "${port:1};
+ thisPort=${port:1}; (( thisPort -= 0 ));
+ if [[ $maxPort -lt $thisPort ]]; then maxPort=$thisPort; fi
+ #echo "[$usedPorts], $thisPort, $maxPort"
+ fi
+done
+(( xport = maxPort + 1 ));
+#echo "Existing DISPLAY ports include: $usedPorts."
+#echo "Use DISPLAY port :$xport"
+
+xCmd=""
+xvncExists=$(which Xvnc); xvncExists=${xvncExists##*no Xvnc *}
+if [ $xvncExists ]; then
+ xCmd="Xvnc :${xport} -geometry 1024x768 -depth 24 -ac"
+else
+ xvfbExists=$(which Xvfb); xvfbExists=${xvfbExists##*no Xvfb *}
+ if [ $xvfbExists ]; then
+ xCmd="Xvfb :${xport} -screen 0 1024x768x24 -ac"
+ else
+ echo "[runtests] WARNING! This script requires Xvfb or Xvnc. "
+ echo "[runtests] Without some way to run tests in a different display port, UI
tests will run in front of you and you may accidentally interact with them."
+ fi
+fi
+
+if [[ $xCmd ]]; then
+ #echo "[runtests] Using X server: '${xCmd}'"
+ ${xCmd} &
+ export DISPLAY=localhost:${xport}.0
+ xhost +
+else
+ echo "[runtests] Warning! UI tests will run in the current UI display port (usually
:0). Please avoid accidentally interacting with them."
+fi
+
+
+# run tests
+echo "[runtests] [`date +%H\:%M\:%S`] Launching Tycho..."
+dir=$1; shift;
+
+cd $dir; $mvn3 2>&1 $* | tee buildlog.latest.txt
+
+echo "[runtests] [`date +%H\:%M\:%S`] Test run completed. "
+
+# xwd -silent -display :${xport} -root -out /tmp/snap.xwd; # save a snapshot
+
+############################# END RUN TESTS #############################
+
+# drop X server process threads used by tests
+if [[ -r /tmp/.X${xport}-lock ]]; then kill `cat /tmp/.X${xport}-lock`; fi
+if [[ -f /tmp/.X${xport}-lock ]]; then rm -fr /tmp/.X${xport}-lock; fi
+
+#echo "[runtests] ${0##*/} done: `date +%H\:%M\:%S`"
Property changes on: trunk/runtests.sh
___________________________________________________________________
Name: svn:executable
+ *