浏览代码

Share project "org.yakindu.sct.releng" into "https://svn.codespot.com/a/eclipselabs.org/yakindu"

Alexander Nyßen 14 年之前
父节点
当前提交
51c34cc892

+ 11 - 0
releng/org.yakindu.sct.releng/.project

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.sct.releng</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>

+ 52 - 0
releng/org.yakindu.sct.releng/build/allElements.xml

@@ -0,0 +1,52 @@
+<project name="allElements Delegator">
+	<property name="defaultAssemblyEnabled" value="true" />
+
+	<!-- ===================================================================== 	-->
+	<!-- Run a given ${target} on all elements being built						-->
+	<!-- By default ${topLevelElementType} and ${topLevelElementId} should be	-->
+	<!-- defined in the builder's build.properties file.  You can customize by	-->
+	<!-- setting the type/id values directly here.								-->
+	<!-- You can add additional calls to ${genericTargets} to build more top 	-->
+	<!-- level elements.									   					-->
+	<!--																		-->
+	<!-- The top level must exist in the ${buildDirectory}, ${baseLocation} or	-->
+	<!-- ${pluginPath} locations.												-->
+	<!-- ===================================================================== 	-->
+	<target name="allElementsDelegator">
+		<ant antfile="${genericTargets}" target="${target}">
+			<property name="type" value="${topLevelElementType}" />
+			<property name="id" value="${topLevelElementId}" />
+		</ant>
+	</target>
+
+	<!-- ====================================================================== -->
+	<!--  The default assemble target, this will be called to assemble each		-->
+	<!--  config if a custom assemble target is not defined.					-->
+	<!-- The following properties will be defined:								-->
+	<!-- 		config : The configuration being assembled eg "win32.win32.x86"	-->
+	<!-- 		element: The element being assembled eg "org.eclipse.sdk"		-->
+	<!-- 		assembleScriptName: The assemble script to be called			-->
+	<!-- ====================================================================== -->
+	<target name="defaultAssemble">
+		<ant antfile="${assembleScriptName}" dir="${buildDirectory}" />
+	</target>
+
+	<!-- =====================================================================	-->
+	<!-- Custom targets to assemble the built elements for particular 			-->
+	<!-- configurations.  These generally call the generated assemble scripts 	-->
+	<!-- (named in  ${assembleScriptName}) but may also add pre and post		-->
+	<!-- processing      														-->
+	<!-- Add one target for each root element and each configuration for which	-->
+	<!-- custom processing is desired. Replace element.id with the id of the 	-->
+	<!-- top level element being built.  A property with a matching name must 	-->
+	<!-- be defined for this custom target to be called instead of the 			-->
+	<!-- defaultAssemble target above.											-->
+	<!--	Example:  name="assemble.org.eclipse.sdk"							-->
+	<!--	Example:  name="assemble.org.eclipse.sdk.win32.win32.x86"			-->
+	<!-- ====================================================================== -->
+	<property name="assemble.element.id[.config.spec]" value="true" />
+	<target name="assemble.element.id[.config.spec]">
+		<ant antfile="${assembleScriptName}" dir="${buildDirectory}" />
+	</target>
+
+</project>

+ 258 - 0
releng/org.yakindu.sct.releng/build/build.properties

@@ -0,0 +1,258 @@
+###############################################################################
+# Copyright (c) 2003, 2006 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+###############################################################################
+#
+# Server Configuration
+#
+###############################################################################
+
+# The directory into which the build elements are fetched and where
+# the build takes place.
+
+buildDirectory=${buildWorkspace}/buildDirectory
+
+#####################
+# Parameters describing how and where to execute the build.
+# Typical users need only update the following properties:
+#    baseLocation - where things you are building against are installed
+#    bootclasspath - The base jars to compile against (typicaly rt.jar)
+#    configs - the list of {os, ws, arch} configurations to build.  
+#
+# Of course any of the settings here can be overridden by spec'ing 
+# them on the command line (e.g., -DbaseLocation=d:/eclipse
+
+#The type of the top level element we are building,  generally "feature"
+topLevelElementType = feature
+#The id of the top level element we are building
+topLevelElementId = org.yakindu.sct
+
+############# PACKAGING CONTROL #############
+runPackager=true
+
+#Set the name of the archive that will result from the product build.
+#archiveNamePrefix=
+
+# The prefix that will be used in the generated archive.
+archivePrefix=eclipse
+
+# The location underwhich all of the build output will be collected.
+collectingFolder=${archivePrefix}
+
+# The list of {os, ws, arch} configurations to build.  This 
+# value is a '&' separated list of ',' separate triples.  For example, 
+#     configs=win32,win32,x86 & linux,motif,x86
+# By default the value is *,*,*
+configs = *, *, *
+#configs=win32, win32, x86 & \
+#	win32,win32,x86_64 & \
+#	win32,win32,wpf & \
+#	linux, gtk, ppc & \
+#	linux, gtk, x86 & \
+#	linux, gtk, x86_64 & \
+#	linux, motif, x86 & \
+#	solaris, motif, sparc & \
+#	solaris, gtk, sparc & \
+#	aix, motif, ppc & \
+#	hpux, motif, ia64_32 & \
+#	macosx, carbon, ppc & \
+#	macosx, carbon, x86 & \
+#	macosx, cocoa, ppc & \
+#	macosx, cocoa, x86 & \
+#	macosx, cocoa, x86_64
+
+# By default PDE creates one archive (result) per entry listed in the configs property.
+# Setting this value to true will cause PDE to only create one output containing all 
+# artifacts for all the platforms listed in the configs property.
+# To control the output format for the group, add a "group, group, group - <format>" entry to the
+# archivesFormat. 
+#groupConfigurations=true
+
+#The format of the archive. By default a zip is created using antZip.
+#The list can only contain the configuration for which the desired format is different than zip.
+#archivesFormat=win32, win32, x86 - antZip& \
+#	linux, gtk, ppc - antZip &\
+#    linux, gtk, x86 - antZip& \
+#	linux, gtk, x86_64 - antZip& \
+# linux, motif, x86 - antZip& \
+#	solaris, motif, sparc - antZip& \
+#	solaris, gtk, sparc - antZip& \
+#	aix, motif, ppc - antZip& \
+#	hpux, motif, PA_RISC - antZip& \
+#	macosx, carbon, ppc - antZip
+archivesFormat=	*, *, * - antZip
+
+#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
+allowBinaryCycles = false
+
+#Sort bundles depenedencies across all features instead of just within a given feature.
+#flattenDependencies = true
+
+#Parallel compilation, requires flattenedDependencies=true
+#parallelCompilation=true
+#parallelThreadCount=
+#parallelThreadsPerProcessor=
+	
+#Set to true if you want the output to be ready for an update jar (no site.xml generated)
+#outputUpdateJars = false
+
+#Set to true for Jnlp generation
+#codebase should be a URL that will be used as the root of all relative URLs in the output.
+#generateJnlp=false
+#jnlp.codebase=<codebase url>
+#jnlp.j2se=<j2se version>
+#jnlp.locale=<a locale>
+#jnlp.generateOfflineAllowed=true or false generate <offlineAllowed/> attribute in the generated features
+#jnlp.configs=${configs}			#uncomment to filter the content of the generated jnlp files based on the configuration being built
+
+#Set to true if you want to sign jars
+#signJars=false
+#sign.alias=<alias>
+#sign.keystore=<keystore location>
+#sign.storepass=<keystore password>
+#sign.keypass=<key password>
+
+#Arguments to send to the zip executable
+zipargs=
+
+#Arguments to send to the tar executable
+tarargs=
+
+#Control the creation of a file containing the version included in each configuration - on by default 
+#generateVersionsLists=false
+
+############## BUILD NAMING CONTROL ################
+# Type of build.  Used in naming the build output.  Typically this value is
+# one of I, N, M, S, ...
+buildType=I
+
+# ID of the build.  Used in naming the build output.
+buildId=${buildTimestamp}
+
+# Label for the build.  Used in naming the build output
+buildLabel=${buildType}.${buildId}
+
+#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde.
+#The value will only be applied to plugin or features indicating build.properties, qualifier = context 
+#forceContextQualifier=<the value for the qualifier>
+
+#Enable / disable the generation of a suffix for the features that use .qualifier. 
+#The generated suffix is computed according to the content of the feature   
+generateFeatureVersionSuffix=true
+
+############# BASE CONTROL #############
+# Settings for the base Eclipse components and Java class libraries 
+# against which you are building.
+# Base location for anything the build needs to compile against.  For example,
+# in most RCP app or a plug-in,  the baseLocation should be the location of a previously
+# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack.
+
+base=${buildWorkspace}/base
+baseLocation=
+
+#Folder containing repositories whose content is needed to compile against
+repoBaseLocation=${buildWorkspace}/repoBase
+#Folder where the content of the repositories from ${repoBaseLocation} will be made available as a form suitable to be compiled against
+#transformedRepoLocation=${base}/transformedRepos
+transformedRepoLocation=${buildWorkspace}/transformedRepo
+
+#Os/Ws/Arch/nl of the eclipse specified by baseLocation
+#baseos=linux
+#basews=gtk
+#basearch=x86_64
+
+#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built
+filteredDependencyCheck=false
+
+#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
+resolution.devMode=false
+
+#pluginPath is a list of locations in which to find plugins and features.  This list is separated by the platform file separator (; or :)
+#a location is one of:  
+#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo
+#- a directory that contains a /plugins or /features subdirectory
+#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml
+#pluginPath=
+
+skipBase=true
+
+############# MAP FILE CONTROL ################
+# This section defines CVS tags to use when fetching the map files from the repository.
+# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml
+skipMaps=true
+
+############ REPOSITORY CONTROL ###############
+# This section defines properties parameterizing the repositories where plugins, fragments
+# bundles and features are being obtained from. 
+
+# The tags to use when fetching elements to build.
+# By default thebuilder will use whatever is in the maps.  
+# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the 
+# overriding value
+# For example fetchTag=CVS=HEAD, SVN=v20050101
+# fetchTag=HEAD
+skipFetch=true
+
+############# JAVA COMPILER OPTIONS ##############
+# The location of the Java jars to compile against.  Typically the rt.jar for your JDK/JRE
+#bootclasspath=${java.home}/lib/rt.jar
+
+#build.compiler=org.eclipse.jdt.core.JDTCompilerAdapter"
+
+# specific JRE locations to compile against. These values are used to compile bundles specifying a 
+# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
+#CDC-1.0/Foundation-1.0= /path/to/rt.jar
+#CDC-1.1/Foundation-1.1=
+#OSGi/Minimum-1.0=
+#OSGi/Minimum-1.1=
+#JRE-1.1=
+#J2SE-1.2=
+#J2SE-1.3=${J2SE-1.3-dir}/lib/rt.jar:${J2SE-1.3-dir}/lib/sunrsasign.jar:${J2SE-1.3-dir}/lib/javaplugin.jar:${J2SE-1.3-dir}/lib/i18n.jar
+#J2SE-1.4=${J2SE-1.4-dir}/lib/charsets.jar:${J2SE-1.4-dir}/lib/jce.jar:${J2SE-1.4-dir}/lib/jsse.jar:${J2SE-1.4-dir}/lib/rt.jar:${J2SE-1.4-dir}/lib/sunrsasign.jar
+#J2SE-1.5=${J2SE-1.5-dir}/lib/charsets.jar:${J2SE-1.5-dir}/lib/deploy.jar:${J2SE-1.5-dir}/lib/javaws.jar:${J2SE-1.5-dir}/lib/jce.jar:${J2SE-1.5-dir}/lib/jsse.jar:${J2SE-1.5-dir}/lib/plugin.jar:${J2SE-1.5-dir}/lib/rt.jar
+#JavaSE-1.6=${JavaSE-1.6-dir}/lib/charsets.jar:${JavaSE-1.6-dir}/lib/deploy.jar:${JavaSE-1.6-dir}/lib/javaws.jar:${JavaSE-1.6-dir}/lib/jce.jar:${JavaSE-1.6-dir}/lib/jsse.jar:${JavaSE-1.6-dir}/lib/plugin.jar:${JavaSE-1.6-dir}/lib/rt.jar
+#PersonalJava-1.1=
+#PersonalJava-1.2=
+#CDC-1.0/PersonalBasis-1.0=
+#CDC-1.0/PersonalJava-1.0=
+#CDC-1.1/PersonalBasis-1.1=
+#CDC-1.1/PersonalJava-1.1=
+
+# Specify the output format of the compiler log when eclipse jdt is used
+logExtension=.log
+
+# Whether or not to include debug info in the output jars
+javacDebugInfo=false 
+
+# Whether or not to fail the build if there are compiler errors
+javacFailOnError=true
+
+# Enable or disable verbose mode of the compiler
+javacVerbose=true
+
+# Extra arguments for the compiler. These are specific to the java compiler being used.
+#compilerArg=
+
+# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
+javacSource=1.5
+
+# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
+javacTarget=1.5
+
+#p2.flavor=tooling
+p2.category.definition=file:${buildWorkspace}/releng/category.xml
+#p2.metadata.repo=file:${buildDirectory}/p2_repository
+#p2.artifact.repo=file:${buildDirectory}/p2_repository
+		
+#collect the generated artifacts and place them inside the repository
+p2.gathering=true
+p2.build.repo=file:${buildDirectory}/build_local_repository
+p2.context.repos=https://builds.itemis.de/jenkins/job/XTEXT_UTILS/lastSuccessfulBuild/artifact/buildDirectory/build_local_repository/

+ 33 - 0
releng/org.yakindu.sct.releng/build/build.xml

@@ -0,0 +1,33 @@
+<project name="run.xml" default="all" basedir=".">
+
+	<!-- include additional libraries -->
+	<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${libs}/ant-contrib-1.0b3.jar" />
+
+	<property environment="env" />
+	<!-- change this property if the build.properties is placed in another folder -->
+	<property name="${builder}" value="${basedir}" />
+	
+	<!-- load the property configurations -->
+	<property file="${builder}/build.properties" />
+
+	<target name="pde-build">
+		<property name="compilerArg" value="-encoding UTF-8" />
+		
+		<!-- call PDE build script -->
+		<path id="pde.build.script.path">
+			<fileset dir="${launcherLocation}/plugins">
+				<include name="org.eclipse.pde.build_*/scripts/build.xml" />
+			</fileset>
+		</path>
+		<property name="pde.build.script.path" refid="pde.build.script.path" />
+		
+		<echo message="Calling pde build script: ${pde.build.script.path} with builder ${builder}" />
+		<ant antfile="${pde.build.script.path}" >
+			<property name="builder" value="${builder}" />
+		</ant>
+	</target>
+
+	<target name="all">
+		<antcall target="pde-build" />
+	</target>
+</project>

+ 163 - 0
releng/org.yakindu.sct.releng/build/customTargets.xml

@@ -0,0 +1,163 @@
+<project name="Build specific targets and properties" default="noDefault">
+
+	<!-- ===================================================================== -->
+	<!-- Run a given ${target} on all elements being built -->
+	<!-- Add on <ant> task for each top level element being built. -->
+	<!-- ===================================================================== -->
+	<available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml" />
+	<property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml" />
+
+	<import file="${allElementsFile}" />
+	<target name="allElements">
+		<antcall target="allElementsDelegator" />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- ===================================================================== -->
+	<target name="getBaseComponents" unless="skipBase">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Check out map files from correct repository -->
+	<!-- Replace values for mapsCheckoutTag as desired. -->
+	<!-- ===================================================================== -->
+	<target name="getMapFiles" depends="checkLocalMaps">
+	</target>
+
+	<target name="checkLocalMaps">
+		<available property="skipMaps" file="${buildDirectory}/maps" />
+	</target>
+
+	<!-- ===================================================================== -->
+
+	<target name="clean" unless="noclean">
+		<antcall target="allElements">
+			<param name="target" value="cleanElement" />
+		</antcall>
+	</target>
+
+	<target name="gatherLogs">
+		<mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
+		<antcall target="allElements">
+			<param name="target" value="gatherLogs" />
+		</antcall>
+		<unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
+			<fileset dir="${buildDirectory}/features">
+				<include name="**/*.log.zip" />
+			</fileset>
+		</unzip>
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before setup -->
+	<!-- ===================================================================== -->
+	<target name="preSetup">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after setup but before starting the build proper -->
+	<!-- ===================================================================== -->
+	<target name="postSetup">
+		<antcall target="getBaseComponents" />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before fetching the build elements -->
+	<!-- ===================================================================== -->
+	<target name="preFetch">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after fetching the build elements -->
+	<!-- ===================================================================== -->
+	<target name="postFetch">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before the repositories are being processed -->
+	<!-- ===================================================================== -->
+	<target name="preProcessRepos">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after the repositories have been processed -->
+	<!-- ===================================================================== -->
+	<target name="postProcessRepos">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before generating the build scripts. -->
+	<!-- ===================================================================== -->
+	<target name="preGenerate">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after generating the build scripts. -->
+	<!-- ===================================================================== -->
+	<target name="postGenerate">
+		<antcall target="clean" />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before running the build.xmls for the elements being built. -->
+	<!-- ===================================================================== -->
+	<target name="preProcess">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after running the build.xmls for the elements being built. -->
+	<!-- ===================================================================== -->
+	<target name="postProcess">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before running assemble. -->
+	<!-- ===================================================================== -->
+	<target name="preAssemble">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after  running assemble. -->
+	<!-- ===================================================================== -->
+	<target name="postAssemble">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before running package. -->
+	<!-- ===================================================================== -->
+	<target name="prePackage">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after  running package. -->
+	<!-- ===================================================================== -->
+	<target name="postPackage">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after the build is done. -->
+	<!-- ===================================================================== -->
+	<target name="postBuild">
+		<antcall target="gatherLogs" />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do to test the build results -->
+	<!-- ===================================================================== -->
+	<target name="test">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do to publish the build results -->
+	<!-- ===================================================================== -->
+	<target name="publish">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Default target                                                        -->
+	<!-- ===================================================================== -->
+	<target name="noDefault">
+		<echo message="You must specify a target when invoking this file" />
+	</target>
+
+</project>

+ 11 - 0
releng/org.yakindu.sct.releng/category.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+   <feature url="features/org.yakindu.sct_1.0.0.qualifier.jar" id="org.yakindu.sct" version="1.0.0.qualifier">
+      <category name="Yakindu SCT 2"/>
+   </feature>
+   <category-def name="Yakindu SCT 2" label="Yakindu SCT 2">
+      <description>
+         Yakindu Statechart Tools (SCT) Version 2
+      </description>
+   </category-def>
+</site>

+ 116 - 0
releng/org.yakindu.sct.releng/launcher.xml

@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="PDE-Build" default="launch" basedir=".">
+
+	<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="lib/ant-contrib-1.0b3.jar" />
+
+	<property environment="env" />
+	<property file="run.properties" />
+	<property file="buildConfiguration/build.properties" />
+	<property file="testConfiguration/test.properties" />
+
+	<target name="prepareLauncherAndProvisionerDirectory">
+		<if>
+			<not>
+				<or>
+					<available file="${launcher}" />
+					<available file="${provisioner}" />
+				</or>
+			</not>
+			<then>
+				<mkdir dir="${launcher}" />
+				<trycatch>
+					<try>
+						<antcall target="prepareLauncherAndProvisioner" />
+					</try>
+					<catch>
+						<echo message="Preparing launcher failed. Cleaning up..." />
+						<delete dir="${launcher}" />
+						<echo message="Done." />
+					</catch>
+				</trycatch>
+			</then>
+		</if>
+	</target>
+
+	<target name="prepareLauncherAndProvisioner">
+		<echo message="Preparing launcher and provisioner ..." />
+
+		<property name="download.eclipse.src" value="${downloadMirror}/eclipse/downloads/drops/${launcherBuildType}-${launcherBuildMilestone}-${launcherBuildID}" />
+		<property name="eclipse.sdk.filename" value="eclipse-SDK-${launcherBuildMilestone}-${launcheros}-${launcherws}-${launcherarch}.${launcherArchiveFormat}" />
+
+		<!-- download launcher if not already contained in downloads directory -->
+		<if>
+			<not>
+				<available file="${downloadDirectory}/${eclipse.sdk.filename}" property="downloadLauncherNeccessary" />
+			</not>
+			<then>
+				<get src="${download.eclipse.src}/${eclipse.sdk.filename}" dest="${downloadDirectory}/${eclipse.sdk.filename}" />
+			</then>
+		</if>
+
+		<!-- use unzip executable of choice -->
+		<if>
+			<equals arg1="${launcherArchiveFormat}" arg2="zip" />
+			<then>
+				<unzip src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${launcher}/" />
+				<unzip src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${provisioner}/" />
+			</then>
+			<else>
+				<untar src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${launcher}/" compression="gzip" />
+				<untar src="${downloadDirectory}/${eclipse.sdk.filename}" dest="${provisioner}/" compression="gzip" />
+			</else>
+		</if>
+
+		<!-- if we are on macosx or linux, ensure builder is executable -->
+		<if>
+			<or>
+				<equals arg1="${launcheros}" arg2="macosx" />
+				<equals arg1="${launcheros}" arg2="linux" />
+			</or>
+			<then>
+				<chmod file="${launcherLocation}/eclipse" perm="ugo+rx" />
+				<chmod file="${provisionerLocation}/eclipse" perm="ugo+rx" />
+			</then>
+		</if>
+
+		<echo message="Preparing launcher and provisioner done." />
+	</target>
+
+	<target name="launch">
+		<if>
+			<not>
+				<available file="${downloadDirectory}" property="downloadDirectoryExists" />
+			</not>
+			<then>
+				<mkdir dir="${downloadDirectory}" />
+			</then>
+		</if>
+
+		<echo message="Cleaning up report directory ${reportDirectory}" />
+		<delete dir="${reportDirectory}" />
+		<mkdir dir="${reportDirectory}" />
+
+		<echo message="Preparing Launcher and Provisioner" />
+		<antcall target="prepareLauncherAndProvisionerDirectory" />
+
+		<echo message="Starting PDE build with launcher: ${launcherLocation}" />
+		<java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
+			<arg value="-application" />
+			<arg value="org.eclipse.ant.core.antRunner" />
+			<arg value="-clean" />
+			<arg value="-nosplash" />
+			<arg value="-consoleLog" />
+			<arg value="-nl" />
+			<arg value="en_US" />
+			<arg value="-data" />
+			<arg value="${launcherWorkspace}" />
+			<arg value="-buildfile" />
+			<arg value="run.xml" />
+			<classpath>
+				<fileset dir="${launcherLocation}/plugins">
+					<include name="org.eclipse.equinox.launcher_*.jar" />
+				</fileset>
+			</classpath>
+		</java>
+	</target>
+</project>

二进制
releng/org.yakindu.sct.releng/lib/ant-contrib-1.0b3.jar


+ 29 - 0
releng/org.yakindu.sct.releng/run.properties

@@ -0,0 +1,29 @@
+buildWorkspace=${env.WORKSPACE}
+
+# Folder, into which the svn repository is checked out (by Hudson)
+buildRepository=${buildWorkspace}/repository
+
+# The eclipse instance used to run the build
+launcher=${buildWorkspace}/launcher
+launcherLocation=${launcher}/eclipse
+launcheros=linux
+launcherws=gtk
+launcherarch=x86_64
+launcherBuildID=201102101200
+launcherBuildMilestone=3.6.2
+launcherReleaseMilestone=3.6
+launcherBuildType=R
+launcherBuildSymbolicName=helios
+launcherArchiveFormat=tar.gz
+
+# p2 provisioner settings
+provisioner=${buildWorkspace}/provisioner
+provisionerLocation=${provisioner}/eclipse
+provisionerWorkspace=${provisioner}/workspace
+
+p2.builder = ${provisionerLocation}
+p2.builder.workspace = ${provisionerWorkspace}
+
+# mirror needed for downloads
+downloadDirectory=${buildWorkspace}/downloads
+downloadMirror=http://reserve.itemis.de/eclipse

+ 115 - 0
releng/org.yakindu.sct.releng/run.xml

@@ -0,0 +1,115 @@
+<project name="run.xml" default="all" basedir=".">
+
+	<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="lib/ant-contrib-1.0b3.jar" />
+
+	<tstamp>
+		<format property="buildTimestamp" pattern="yyyyMMddHHmm" />
+	</tstamp>
+
+	<property environment="env" />
+	<property file="run.properties" />
+	<property file="build/build.properties" />
+
+	<target name="prepareBuildDirectory">
+		<echo message="Preparing build directory..." />
+		<delete dir="${buildDirectory}" />
+		<mkdir dir="${buildDirectory}" />
+
+		<antcall target="prepareRepositoriesDirectory" />
+		<antcall target="prepareFeatures" />
+		<antcall target="preparePlugins" />
+	</target>
+
+	<target name="prepareRepositoriesDirectory">
+		<!-- base only has to be prepared, if it does not exist or if the user explicitly specifies to do so (skipBase=false) -->
+
+		<echo message="Skipping repositories: ${skipRepositories}" />
+		<if>
+			<or>
+				<equals arg1="${skipRepositories}" arg2="false" />
+				<not>
+					<available file="${repoBaseLocation}" />
+				</not>
+			</or>
+			<then>
+				<trycatch>
+					<try>
+						<mkdir dir="${repoBaseLocation}" />
+						<antcall target="prepareRepositories" />
+					</try>
+					<catch>
+						<echo message="Preparing repositories failed. Cleaning up..." />
+						<delete dir="${repoBaseLocation}" />
+						<echo message="Done." />
+					</catch>
+				</trycatch>
+			</then>
+		</if>
+	</target>
+
+	<target name="prepareRepositories">
+		<echo message="Preparing repositories ..." />
+
+		<!-- project updates -->
+		<p2.mirror source="${downloadMirror}/eclipse/updates/3.6" destination="file:${repoBaseLocation}/eclipse_updates_3_6">
+			<iu id="org.eclipse.platform.ide" />
+			<slicingOptions includeOptional="false" includeNonGreedy="false" followStrict="true" />
+		</p2.mirror>
+
+		<!-- helios releases -->
+		<p2.mirror source="${downloadMirror}/releases/helios" destination="file:${repoBaseLocation}/releases_helios">
+			<iu id="org.eclipse.emf.sdk.feature.group" />
+			<iu id="org.eclipse.gmf.runtime.notation.sdk.feature.group" />
+			<iu id="org.eclipse.gmf.runtime.sdk.feature.group" />
+			<iu id="org.eclipse.xtext.sdk.feature.group" />
+		</p2.mirror>
+
+		<echo message="Preparing repositories done." />
+	</target>
+
+	<target name="preparePlugins">
+		<delete dir="${buildDirectory}/plugins" />
+		<mkdir dir="${buildDirectory}/plugins" />
+		<!-- Copy plugins -->
+		<echo>Copy plugins from ${repository} to ${buildDirectory}/plugins</echo>
+		<copy todir="${buildDirectory}/plugins">
+			<fileset dir="${buildWorkspace}/svn_repository/plugins" />
+		</copy>
+	</target>
+
+	<target name="prepareFeatures">
+		<delete dir="${buildDirectory}/features" />
+		<mkdir dir="${buildDirectory}/features" />
+		<!-- Copy features -->
+		<echo>Copy features from ${repository} to ${buildDirectory}/features</echo>
+		<copy todir="${buildDirectory}/features">
+			<fileset dir="${buildWorkspace}/svn_repository/features" />
+		</copy>
+
+		<!-- remove the "-feature" suffix of all feature projects in the features folder -->
+		<for param="currentFeatureDir" keepgoing="true">
+			<path>
+				<dirset dir="${buildDirectory}/features">
+					<include name="*-feature" />
+				</dirset>
+			</path>
+			<sequential>
+				<propertyregex override="yes" property="renamedFeatureDir" input="@{currentFeatureDir}" regexp="(.*)-feature" select="\1" />
+				<echo message="Moving @{currentFeatureDir} to ${renamedFeatureDir}" />
+				<move todir="${renamedFeatureDir}">
+					<fileset dir="@{currentFeatureDir}" />
+				</move>
+			</sequential>
+		</for>
+	</target>
+
+	<target name="all">
+		<echo message="Preparing build directory ${buildDirectory}" />
+		<antcall target="prepareBuildDirectory" />
+
+		<ant antfile="build.xml" dir="build" target="all" inheritall="true">
+			<property name="builder" value="${basedir}/build" />
+			<property name="libs" value="${basedir}/lib" />
+		</ant>
+	</target>
+</project>

+ 83 - 0
releng/org.yakindu.sct.releng/scripts/p2.xml

@@ -0,0 +1,83 @@
+<project name="P2 related tasks">
+
+	<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="../lib/ant-contrib-1.0b3.jar" />
+
+	<target name="p2.director">
+		<echo message="Installing ${p2.installIU} in version ${p2.version} from ${p2.artifact.repo} into ${p2.install.path}" />
+
+		<!-- see if a version was specified or not -->
+		<var name="installIU" value="${p2.installIU}"/>
+		<if>
+			<and>
+				<isset property="p2.version" />
+				<not>
+					<equals arg1="${p2.version}" arg2="" />
+				</not>
+			</and>
+			<then>
+				<echo message="Setting install IU to ${p2.installIU}/${p2.version}." />
+				<var name="installIU" value="${p2.installIU}/${p2.version}" />
+			</then>
+		</if>
+
+		<exec executable="${p2.builder}/eclipse" dir="${p2.builder}" failonerror="true">
+			<!--<arg line="-vm ${JavaSE-1.6-dir}/bin/java" />-->
+			<arg line="-application org.eclipse.equinox.p2.director" />
+			<arg line="-data ${p2.builder.workspace}" />
+			<arg line="-clean" />
+			<arg line="-nosplash" />
+			<arg line="-debug" />
+			<arg line="-consoleLog" />
+			<arg line="--launcher.suppressErrors" />
+			<arg line="-installIU ${installIU}" />
+			<arg line="-profile ${p2.profile}" />
+			<arg line="-profileProperties org.eclipse.update.install.features=true" />
+			<arg line="-p2.os ${p2.os}" />
+			<arg line="-p2.ws ${p2.ws}" />
+			<arg line="-p2.arch ${p2.arch}" />
+			<arg line="-metadataRepository ${p2.metadata.repo}" />
+			<arg line="-artifactRepository ${p2.artifact.repo}" />
+			<arg line="-destination ${p2.install.path}" />
+			<arg line="-bundlepool ${p2.install.path}" />
+			<arg line="-roaming" />
+			<arg line="-vmargs" />
+			<arg line="-Xms256m -Xmx1024m -XX:MaxPermSize=256m" />
+			<!--<arg line="-Declipse.p2.data.area=${p2.install.path}/p2" />-->
+			<arg line="-Declipse.p2.MD5Check=false" />
+		</exec>
+
+		<!-- delete the metadata cache as well as the artifacts for unzipped bundles -->
+		<delete failonerror="false" includeEmptyDirs="true" dir="${p2.install.path}/p2/org.eclipse.equinox.p2.core/cache" />
+
+		<delete dir="${p2.builder.workspace}" />
+		<echo message="done." />
+	</target>
+
+
+	<target name="p2.metadata.generator">
+		<echo message="Generating P2 meta data from ${p2.generator.source} into ${p2.generator.repository}" />
+
+		<property name="p2.generator.workspace" value="${p2.builder.workspace}" />
+		<mkdir dir="${p2.generator.workspace}" />
+
+		<exec executable="${p2.builder}/eclipse" dir="${p2.builder}" failonerror="true">
+			<!--<arg line="-vm ${JavaSE-1.6-dir}/bin/java" />-->
+			<arg line="-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" />
+			<arg line="-data ${p2.generator.workspace}" />
+			<arg line="-clean" />
+			<arg line="-nosplash" />
+			<arg line="-debug" />
+			<arg line="-consoleLog" />
+			<arg line="--launcher.suppressErrors" />
+			<arg line="-source ${p2.generator.source}" />
+			<arg line="-publishArtifacts" />
+			<arg line="-metadataRepository ${p2.generator.repository}" />
+			<arg line="-artifactRepository ${p2.generator.repository}" />
+			<arg line="-vmargs" />
+			<arg line="-Xms256m -Xmx1024m -XX:MaxPermSize=256m" />
+		</exec>
+
+		<delete dir="${p2.generator.workspace}" />
+		<echo message="done." />
+	</target>
+</project>