Update the build to use Corundum
Corundum is an extensible end-to-end build system for Eclipse plugins
based on Ant, p2 and PDE Build. It is an evolution of the build system
previously used for Sapphire.
diff --git a/features/org.eclipse.datatools.enablement.oda.feature/feature.xml b/features/org.eclipse.datatools.enablement.oda.feature/feature.xml
index 2c195e8..a0ce173 100644
--- a/features/org.eclipse.datatools.enablement.oda.feature/feature.xml
+++ b/features/org.eclipse.datatools.enablement.oda.feature/feature.xml
@@ -24,27 +24,6 @@
</requires>
<plugin
- id="org.apache.xerces"
- download-size="0"
- install-size="0"
- version="2.9.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.apache.xml.resolver"
- download-size="0"
- install-size="0"
- version="1.2.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.apache.xml.serializer"
- download-size="0"
- install-size="0"
- version="2.7.1.qualifier"
- unpack="false"/>
-
- <plugin
id="org.eclipse.datatools.enablement.oda.ws"
download-size="0"
install-size="0"
@@ -59,20 +38,6 @@
unpack="false"/>
<plugin
- id="javax.xml"
- download-size="0"
- install-size="0"
- version="1.3.4.qualifier"
- unpack="false"/>
-
- <plugin
- id="javax.wsdl"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.datatools.connectivity.oda.flatfile"
download-size="0"
install-size="0"
diff --git a/features/org.eclipse.datatools.sqldevtools.parsers.feature/feature.xml b/features/org.eclipse.datatools.sqldevtools.parsers.feature/feature.xml
index cfe4036..1492508 100644
--- a/features/org.eclipse.datatools.sqldevtools.parsers.feature/feature.xml
+++ b/features/org.eclipse.datatools.sqldevtools.parsers.feature/feature.xml
@@ -24,13 +24,6 @@
</requires>
<plugin
- id="net.sourceforge.lpg.lpgjavaruntime"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.datatools.sqltools.parsers.sql.lexer"
download-size="0"
install-size="0"
diff --git a/releng.new/build.properties b/releng.new/build.properties
index 4eac3b4..d5ae083 100644
--- a/releng.new/build.properties
+++ b/releng.new/build.properties
@@ -1,4 +1,88 @@
+# The name of the product for display purposes
+
+product.name = Eclipse Data Tools
+
+# The prefix to use when creating the product repository archive and other packages
+
+product.package.file.prefix = dtp
+
+# The feature that includes all other features
+
+root.feature = org.eclipse.datatools
+
+# The feature whose version determines the overall product version
+
+version.master.feature = org.eclipse.datatools.connectivity.feature
+
+# The names of the supported target configurations, separated by commas
+
configurations = neon
+
+# The minimal (oldest) supported configuration
+
configuration.min = neon
+
+# The maximum (newest) supported configuration
+
configuration.max = neon
+
+# The configuration to use for the main build as well as for dev-eclipse and dev-target
+
configuration.recommended = neon
+
+# The neon configuration
+
+neon.repositories = \
+${rep.eclipse-4.6-m6},\
+${rep.eclipse.gef-4-m6},\
+${rep.eclipse.emf-2.12-m6},\
+${rep.eclipse.orbit-S20160308060251},\
+file:../../org.eclipse.datatools.doc/packaged_jars
+
+# Automatically set Require-Bundle version ranges
+
+require.bundle.version.constraint.excludes = .*\.source
+
+require.bundle.version.constraint.rules = \
+com.ibm.icu=[M1.M2.M3,T1+10.0.0);\
+*=[M1.M2.M3,T1+1.0.0)
+
+# Verify that Bundle-RequiredExecutionEnvironment is set to the specified value
+
+verify.bundle.required.env = true
+verify.bundle.required.env.value = JavaSE-1.8
+
+# The components to install in build's target platform
+
+iu.orbit = net.sourceforge.lpg.lpgjavaruntime,\
+org.apache.xerces,\
+javax.wsdl/1.5.1.v201012040544
+
+iu.packaged.jars = org.eclipse.datatools.common.doc.user,\
+org.eclipse.datatools.connectivity.doc.user.contexts,\
+org.eclipse.datatools.connectivity.doc.user,\
+org.eclipse.datatools.doc.user,\
+org.eclipse.datatools.intro,\
+org.eclipse.datatools.sqltools.doc.user.contexts,\
+org.eclipse.datatools.sqltools.doc.user
+
+iu.build.target = \
+${iu.eclipse.jdt},\
+${iu.eclipse.pde},\
+${iu.eclipse.emf},\
+${iu.eclipse.gef},\
+${iu.orbit},\
+${iu.packaged.jars}
+
+# The components to install in dev-target (typically the same as build target, but with source)
+
+iu.dev.target = \
+${iu.eclipse.platform.source},\
+${iu.eclipse.jdt},\
+${iu.eclipse.jdt.source},\
+${iu.eclipse.pde},\
+${iu.eclipse.pde.source},\
+${iu.eclipse.emf.sdk},\
+${iu.eclipse.gef.sdk},\
+${iu.orbit},\
+${iu.packaged.jars}
diff --git a/releng.new/build.xml b/releng.new/build.xml
index 96bacaa..e3b7700 100644
--- a/releng.new/build.xml
+++ b/releng.new/build.xml
@@ -11,1145 +11,112 @@
******************************************************************************
-->
-<project name="dtp" default="build">
+<project name="dtp" default="full-build">
+ <dirname property="root.dir" file="${ant.file.dtp}"/>
+ <property name="build.dir" value="${root.dir}/build"/>
+ <property name="releng.dir" value="${root.dir}/releng"/>
- <!--
- *************************************************************************************************
- * Initialization *
- *************************************************************************************************
- -->
-
- <property environment="env"/>
- <import file="releng/ant-library/library.xml"/>
- <import file="releng/tools/build.xml"/>
+ <loadproperties>
+ <url url="https://www.eclipse.org/sapphire/corundum.properties"/>
+ </loadproperties>
+
+ <delete dir="releng/corundum" quiet="true"/>
+ <get src="${corundum-1}" dest="releng/corundum.zip" usetimestamp="true"/>
+ <unzip src="releng/corundum.zip" dest="releng/corundum"/>
- <echo message="Java Version: ${java.version}"/>
+ <import file="releng/corundum/corundum.xml"/>
+
+ <import>
+ <fileset dir="releng/corundum/extensions/eclipse.org" includes="*.xml"/>
+ </import>
-
- <target name="init" depends="init-library,build-sapphire-releng-tools,init-jdk">
-
- <dirname property="root.dir" file="${ant.file.dtp}"/>
- <property name="releng.dir" value="${root.dir}/releng"/>
- <property name="build.dir" value="${root.dir}/build"/>
-
- <property file="build.properties"/>
- <property file="${releng.dir}/installables.properties"/>
-
- </target>
-
-
- <target name="init-bootstrap-platform" depends="init">
-
- <property name="bootstrap.platform" value="${build.dir}/bootstrap"/>
-
- <if>
- <not><available file="${bootstrap.platform}"/></not>
- <then>
- <install-eclipse dest="${bootstrap.platform}"/>
- </then>
- </if>
-
- </target>
-
-
-
+
<!--
- *************************************************************************************************
- * Repository Build *
- *************************************************************************************************
+ locate-source
-->
-
- <target name="build-repository" depends="init,init-bootstrap-platform">
- <build-repository/>
- </target>
-
-
- <macrodef name="build-repository">
+
+ <macrodef name="locate-source">
<sequential>
<if>
- <not><isset property="build.repository.completed"/></not>
+ <not>
+ <and>
+ <isset property="source.location"/>
+ <available file="${source.location}"/>
+ </and>
+ </not>
<then>
- <if>
- <available file="${build.dir}/repository"/>
- <then>
- <echo message="Found existing DTP repository..."/>
- <var name="build.repository.completed" value="true"/>
- <load-build-repository url="file:${build.dir}/repository"/>
- </then>
- </if>
- </then>
- </if>
-
- <if>
- <not><isset property="build.repository.completed"/></not>
- <then>
-
- <delete dir="${build.dir}/repository" quiet="true"/>
- <mkdir dir="${build.dir}/repository"/>
-
- <!-- Stage 1 -->
-
- <echo message="Copying plugins and features to the staging area..."/>
+
+ <echo message="Copying plugins and features into a consolidated source folder..."/>
+
+ <var name="source.location" value="${build.dir}/source"/>
- <delete dir="${build.dir}/staging" quiet="true"/>
- <mkdir dir="${build.dir}/staging"/>
+ <delete dir="${source.location}" quiet="true"/>
+ <mkdir dir="${source.location}"/>
<for param="git.repo">
- <dirset dir="${root.dir}/../.." includes="org.eclipse.*"/>
+ <dirset dir="${root.dir}/../.." includes="org.eclipse.*" excludes="org.eclipse.datatools.nl"/>
<sequential>
- <copy todir="${build.dir}/staging">
+ <copy todir="${source.location}">
<fileset dir="@{git.repo}" includes="plugins/**"/>
<fileset dir="@{git.repo}" includes="features/**"/>
</copy>
</sequential>
</for>
- <copy todir="${build.dir}/staging/features">
+ <copy todir="${source.location}/features">
<fileset dir="${root.dir}/releng" includes="org.eclipse.datatools/**"/>
</copy>
-
- <!-- Stage 2 -->
- <echo message="Performing source code verification..."/>
-
- <verify-bundle-required-env source="${build.dir}/staging"/>
-
- <!-- Stage 3 -->
-
- <delete dir="${build.dir}/packaged_jars" quiet="true"/>
- <mkdir dir="${build.dir}/packaged_jars/plugins"/>
-
- <copy todir="${build.dir}/packaged_jars/plugins">
- <fileset dir="${root.dir}/../../org.eclipse.datatools.doc/packaged_jars"/>
- </copy>
-
- <p2.publish.FeaturesAndBundles location="${build.dir}/packaged_jars"/>
-
- <!-- Stage 4 -->
-
- <with-target-platform configuration="${configuration.recommended}">
- <pde-build build.id="${DSTAMP}" feature="org.eclipse.datatools" eclipse="${.target.platform}" root.dir="${build.dir}/staging"/>
- </with-target-platform>
-
- <unzip src="${build.dir}/staging/build/org.eclipse.datatools-${DSTAMP}.zip" dest="${build.dir}/repository">
- <mapper type="regexp" from="^eclipse/(.*)$$" to="\1"/>
- </unzip>
-
- <delete file="${build.dir}/staging/build/org.eclipse.datatools-${DSTAMP}.zip"/>
-
- <delete>
- <fileset dir="${build.dir}/repository" includes="epl-v10.html"/>
- <fileset dir="${build.dir}/repository" includes="notice.html"/>
- <fileset dir="${build.dir}/repository/features" includes="org.eclipse.datatools_*/**"/>
- </delete>
-
- <zip-dirs source.dir="${build.dir}/repository/features" suffix="jar"/>
-
- <!-- Stage 5 -->
-
- <echo message="Setting Require-Bundle version constraints..."/>
-
- <mkdir dir="${build.dir}/repository/temp"/>
-
- <expand-all source.dir="${build.dir}/repository/plugins" dest.dir="${build.dir}/repository/temp" suffix="jar">
- <delete file="@{archive.file}"/>
- </expand-all>
-
- <with-target-platform configuration="${configuration.min}">
- <create-inventory dest="${build.dir}/repository/temp/min-platform-inventory.txt">
- <plugins>
- <pathelement location="${.target.platform}/plugins"/>
- </plugins>
- </create-inventory>
- </with-target-platform>
-
- <with-target-platform configuration="${configuration.max}">
- <create-inventory dest="${build.dir}/repository/temp/max-platform-inventory.txt">
- <plugins>
- <pathelement location="${.target.platform}/plugins"/>
- </plugins>
- </create-inventory>
- </with-target-platform>
-
- <set-bundle-version-constraints
- minPlatformInventory="${build.dir}/repository/temp/min-platform-inventory.txt"
- targetPlatformInventory="${build.dir}/repository/temp/max-platform-inventory.txt"
- pluginsDirectory="${build.dir}/repository/temp">
- <exclude id=".*\.source"/>
- <exclude id="javax\..*"/>
- <exclude id="net\.sourceforge\..*"/>
- <exclude id="org\.apache\..*"/>
- <rule bundle="com.ibm.icu" expr="[M1.M2.M3,T1+10.0.0)"/>
- <rule bundle="*" expr="[M1.M2.M3,T1+1.0.0)"/>
- </set-bundle-version-constraints>
-
- <!-- Stage 6 -->
-
- <echo message="Setting versions of Export-Package entries..."/>
-
- <set-export-package-version bundles="${build.dir}/repository/temp">
- <exclude id=".*\.source"/>
- <exclude id="javax\..*"/>
- <exclude id="net\.sourceforge\..*"/>
- <exclude id="org\.apache\..*"/>
- </set-export-package-version>
-
- <zip-dirs source.dir="${build.dir}/repository/temp" dest.dir="${build.dir}/repository/plugins" suffix="jar"/>
-
- <delete dir="${build.dir}/repository/temp"/>
-
- <!-- Stage 7 -->
-
- <for param="jar">
- <path>
- <fileset dir="${build.dir}/repository" includes="**/org.eclipse.datatools.*.jar"/>
- </path>
- <sequential>
- <condition jar="@{jar}"/>
- <sign jar="@{jar}"/>
- <pack jar="@{jar}"/>
- </sequential>
- </for>
-
- <!-- Stage 8 -->
-
- <echo message="Packaging the repository..."/>
-
- <property-from-set property=".dtp.feature">
- <fileset dir="${build.dir}/repository/features" includes="org.eclipse.datatools.connectivity.feature_*.jar"/>
- </property-from-set>
-
- <var name="dtp.version" unset="true"/>
- <propertyregex property="dtp.version" input="${.dtp.feature}" regexp=".*_([0-9]*.[0-9]*.[0-9]*.[0-9]*).jar" select="\1"/>
-
- <var name="dtp.version.no.qualifier" unset="true"/>
- <propertyregex property="dtp.version.no.qualifier" input="${dtp.version}" regexp="([0-9]*.[0-9]*.[0-9]*).[0-9]*" select="\1"/>
-
- <copy file="${build.dir}/staging/plugins/org.eclipse.datatools.releng.builder/extras/site.xml" tofile="${build.dir}/repository/site.xml"/>
-
- <replace file="${build.dir}/repository/site.xml">
- <replacefilter token="@RELEASE.VERSION@" value="${dtp.version.no.qualifier}"/>
- <replacefilter token="@org.eclipse.datatools.sdk.feature@" value="${dtp.version}"/>
- <replacefilter token="@org.eclipse.datatools.enablement.sdk.feature@" value="${dtp.version}"/>
- </replace>
-
- <p2.publish.UpdateSite location="${build.dir}/repository" name="Eclipse Data Tools ${dtp.version.no.qualifier}"/>
-
- <delete file="${build.dir}/repository/site.xml"/>
-
- <load-build-repository url="file:${build.dir}/repository"/>
-
- <gen-repository-landing repository="${build.dir}/repository" name="Eclipse Data Tools ${dtp.version.no.qualifier}"/>
-
- <property name="build.repository.completed" value="true"/>
-
- </then>
- <else>
-
- <!-- Determine the version of DTP in repository. -->
-
- <property-from-set property=".dtp.feature">
- <fileset dir="${build.dir}/repository/features" includes="org.eclipse.datatools.connectivity.feature_*.jar"/>
- </property-from-set>
-
- <var name="dtp.version" unset="true"/>
- <propertyregex property="dtp.version" input="${.dtp.feature}" regexp=".*_([0-9]*.[0-9]*.[0-9]*.[0-9]*).jar" select="\1"/>
-
- </else>
- </if>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="verify-bundle-required-env">
- <attribute name="source"/>
- <sequential>
- <var name=".verify.bundle.required.env.failed" unset="true"/>
- <for param="file">
- <path>
- <fileset dir="@{source}">
- <include name="**/MANIFEST.MF"/>
- </fileset>
- </path>
- <sequential>
- <var name=".file.content" unset="true"/>
- <loadfile property=".file.content" srcfile="@{file}"/>
- <if>
- <and>
- <contains string="${.file.content}" substring="Bundle-SymbolicName" casesensitive="false"/>
- <not><contains string="${.file.content}" substring="Bundle-RequiredExecutionEnvironment: JavaSE-1.8" casesensitive="false"/></not>
- </and>
- <then>
- <var name=".file.relative" unset="true"/>
- <pathconvert property=".file.relative">
- <path location="@{file}"/>
- <map from="@{source}\" to=""/>
- <map from="@{source}/" to=""/>
- <map from="@{source}" to=""/>
- </pathconvert>
- <echo message="Missing Bundle-RequiredExecutionEnvironment: ${.file.relative}"/>
- <var name=".verify.bundle.required.env.failed" value="true"/>
- </then>
- </if>
- </sequential>
- </for>
- <if>
- <istrue value="${.verify.bundle.required.env.failed}"/>
- <then>
- <fail message="Found one or more bundles with missing Bundle-RequiredExecutionEnvironment."/>
</then>
</if>
- <var name=".file.content" unset="true"/>
- <var name=".file.relative" unset="true"/>
- <var name=".verify.bundle.required.env.failed" unset="true"/>
+
</sequential>
</macrodef>
<!--
- *************************************************************************************************
- * Alternative Configurations Build *
- *************************************************************************************************
+ clean-source
-->
+
+ <macrodef name="clean-source">
+ <sequential>
- <!-- Builds against alternative supported configurations. The list of alternative
- configurations is defined to exclude the recommended configuration, which is covered by the
- build-repository target. The purpose of this target is only to verify clean compilation. As
- such, unlike build-repository target, this target does not perform any of the post-build
- processing or produce consumable binaries. -->
+ <delete dir="${build.dir}/source" quiet="true"/>
+ <var name="source.location" unset="true"/>
- <target name="build-alt-configurations" unless="build.alt.configurations.completed" depends="init,init-bootstrap-platform,build-repository">
-
- <for-each-configuration>
- <if>
- <not><equals arg1="${.configuration}" arg2="${configuration.recommended}"/></not>
- <then>
-
- <echo message="Building DTP with ${.configuration} configuration..."/>
-
- <with-target-platform configuration="${.configuration}">
- <pde-build build.id="${DSTAMP}" feature="org.eclipse.datatools" eclipse="${.target.platform}" root.dir="${build.dir}/staging"/>
- </with-target-platform>
-
- <delete file="${build.dir}/org.eclipse.datatools-${DSTAMP}.zip"/>
-
- </then>
- </if>
- </for-each-configuration>
-
- <property name="build.alt.configurations.completed" value="true"/>
-
- </target>
-
+ </sequential>
+ </macrodef>
<!--
- *************************************************************************************************
- * Full Build *
- *************************************************************************************************
+ pre-finalize-repository
-->
-
- <target name="build" depends="build-repository">
-
- <delete dir="${build.dir}/packages" quiet="true"/>
- <mkdir dir="${build.dir}/packages"/>
-
- <zip destfile="${build.dir}/packages/dtp-repository-${dtp.version}.zip" filesonly="true">
- <fileset dir="${build.dir}/repository" excludes=".artifactlock/**/*"/>
- </zip>
-
- </target>
-
- <!--
- *************************************************************************************************
- * Development Environment *
- *************************************************************************************************
- -->
-
- <target name="create-dev-eclipse" depends="build-repository">
-
- <property name="dev.eclipse.dir" value="${root.dir}/dev-eclipse"/>
- <install-eclipse dest="${dev.eclipse.dir}" extensions="${iu.dev.env}"/>
-
- </target>
-
-
- <target name="create-dev-target" depends="build-repository">
-
- <property name="dev.target.dir" value="${root.dir}/dev-target"/>
-
- <if>
- <isset property="iu.dev.target.${configuration.recommended}"/>
- <then>
- <propertycopy property=".extensions" from="iu.dev.target.${configuration.recommended}" override="true"/>
- </then>
- <else>
- <var name=".extensions" value="${iu.dev.target}"/>
- </else>
- </if>
-
- <install-eclipse dest="${dev.target.dir}" extensions="${.extensions}"/>
-
- <var name=".extensions" unset="true"/>
-
- </target>
-
-
- <target name="clean-start" depends="clean,create-dev-eclipse,create-dev-target,prune-downloads-from-eclipse">
- </target>
-
-
-
- <!--
- *************************************************************************************************
- * Cleanup *
- *************************************************************************************************
- -->
-
- <target name="clean" depends="clean-bootstrap,clean-repository,clean-target-platforms">
-
- <delete dir="${build.dir}"/>
-
- </target>
-
-
- <target name="clean-bootstrap" depends="init">
-
- <delete dir="${build.dir}/bootstrap" quiet="true"/>
- <var name="bootstrap.platform" unset="true"/>
-
- </target>
-
-
- <target name="clean-repository" depends="init">
-
- <delete dir="${build.dir}/repository" quiet="true"/>
- <var name="build.repository.completed" unset="true"/>
-
- </target>
-
-
- <target name="clean-target-platforms" depends="init">
-
- <for-each-configuration>
- <delete dir="${build.dir}/target-@{configuration}" quiet="true"/>
- <var name="target-@{configuration}" unset="true"/>
- </for-each-configuration>
-
- </target>
-
-
-
- <!--
- *************************************************************************************************
- * Target Platform *
- *************************************************************************************************
- -->
-
-
- <macrodef name="create-target-platform">
- <attribute name="configuration"/>
+ <macrodef name="pre-finalize-repository">
<sequential>
- <if>
- <not><isset property="target-@{configuration}"/></not>
- <then>
+ <delete>
+ <fileset dir="${build.dir}/repository">
+ <include name="epl-v10.html"/>
+ <include name="notice.html"/>
+ <include name="${root.feature}_*.jar"/>
+ </fileset>
+ </delete>
- <property name="target-@{configuration}" value="${build.dir}/target-@{configuration}"/>
-
- <if>
- <not><available file="${build.dir}/target-@{configuration}"/></not>
- <then>
- <install-eclipse dest="${build.dir}/target-@{configuration}" configuration="@{configuration}" extensions="${iu.build.target}"/>
- </then>
- </if>
-
- </then>
- </if>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="with-target-platform">
- <attribute name="configuration"/>
- <element name="body" implicit="yes"/>
- <sequential>
-
- <create-target-platform configuration="@{configuration}"/>
- <propertycopy property=".target.platform" from="target-@{configuration}" override="true"/>
- <body/>
- <var name=".target.platform" unset="true"/>
-
- </sequential>
- </macrodef>
-
-
-
-
- <!--
- *************************************************************************************************
- * Configuration and Repository Macros *
- *************************************************************************************************
- -->
-
- <macrodef name="load-configuration">
- <attribute name="name"/>
- <sequential>
-
- <if>
- <not><isset property="repositories.@{name}"/></not>
- <then>
-
- <echo message="Loading configuration @{name}..."/>
-
- <property file="${releng.dir}/repositories-@{name}.properties" prefix="."/>
-
- <var name="eclipse.platform.build.@{name}" value="${.eclipse.platform.build}"/>
-
- <if>
- <isset property=".p2.repositories"/>
- <then>
- <for list="${.p2.repositories}" param="repo">
- <sequential>
- <if>
- <or>
- <matches pattern="http:.*" string="@{repo}"/>
- <matches pattern="https:.*" string="@{repo}"/>
- <matches pattern="file:.*" string="@{repo}"/>
- </or>
- <then>
- <load-repository url="@{repo}" property="repositories.@{name}"/>
- </then>
- <else>
- <with-download-from-eclipse file="@{repo}">
- <load-repository-archive file="${.download}" property="repositories.@{name}"/>
- </with-download-from-eclipse>
- </else>
- </if>
- </sequential>
- </for>
- </then>
- </if>
-
- <if>
- <isset property=".legacy.packages"/>
- <then>
- <for list="${.legacy.packages}" param="repo">
- <sequential>
- <echo message="@{repo}"/>
- <with-download-from-eclipse file="@{repo}">
- <load-repository-legacy file="${.download}" property="repositories.@{name}"/>
- </with-download-from-eclipse>
- </sequential>
- </for>
- </then>
- </if>
-
- <var name=".eclipse.platform.build" unset="true"/>
- <var name=".p2.repositories" unset="true"/>
- <var name=".legacy.packages" unset="true"/>
-
- </then>
- </if>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="with-configuration">
- <attribute name="name"/>
- <element name="body" implicit="yes"/>
- <sequential>
-
- <load-configuration name="@{name}"/>
- <propertycopy property=".eclipse.platform.build" from="eclipse.platform.build.@{name}" override="true"/>
- <propertycopy property=".repositories" from="repositories.@{name}" override="true"/>
- <body/>
- <var name=".eclipse.platform.build" unset="true"/>
- <var name=".repositories" unset="true"/>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="for-each-configuration">
- <element name="body" implicit="yes"/>
- <sequential>
-
- <for list="${configurations}" param="configuration">
- <sequential>
- <var name=".configuration" value="@{configuration}"/>
- <body/>
- <var name=".configuration" unset="true"/>
- </sequential>
- </for>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="init-download-from-eclipse">
- <sequential>
-
- <!-- Set "downloads" property or SAPPHIRE_DOWNLOADS environment variable to share downloads folder. -->
-
- <if>
- <not><isset property="downloads"/></not>
- <then>
- <if>
- <isset property="env.SAPPHIRE_DOWNLOADS"/>
- <then>
- <var name="downloads" value="${env.SAPPHIRE_DOWNLOADS}"/>
- </then>
- <else>
- <var name="downloads" value="${basedir}/downloads"/>
- </else>
- </if>
- </then>
- </if>
+ <with-target name="${configuration.recommended}">
+ <for list="javax.wsdl,javax.xml,net.sourceforge.lpg.lpgjavaruntime,org.apache.xerces,org.apache.xml.resolver,org.apache.xml.serializer" param="bundle">
+ <sequential>
+ <echo message="Mirroring @{bundle} bundle"/>
+ <find-eclipse-bundle property=".bundle" eclipse="${.target}" bundle="@{bundle}"/>
+ <copy file="${.bundle}" todir="${build.dir}/repository/plugins"/>
+ <var name=".bundle" unset="true"/>
+ </sequential>
+ </for>
+ </with-target>
- <!-- Set "ignore.checksum.issues" property or SAPPHIRE_IGNORE_CHECKSUM_ISSUES environment variable to
- not fail build if eclipse.org download fails checksum verification. -->
-
- <if>
- <not><isset property="ignore.checksum.issues"/></not>
- <then>
- <if>
- <isset property="env.SAPPHIRE_IGNORE_CHECKSUM_ISSUES"/>
- <then>
- <var name="ignore.checksum.issues" value="${env.SAPPHIRE_IGNORE_CHECKSUM_ISSUES}"/>
- </then>
- <else>
- <var name="ignore.checksum.issues" value="false"/>
- </else>
- </if>
- </then>
- </if>
-
- <!-- Lookup the set of downloads with known checksum issues that should be ignored. -->
-
- <if>
- <not><isset property="ignore.checksum.issues.list"/></not>
- <then>
- <loadfile srcfile="${basedir}/releng/ignore-checksum-issues.txt" property="ignore.checksum.issues.list"/>
- </then>
- </if>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="download-from-eclipse">
- <attribute name="file"/>
- <attribute name="property"/>
- <sequential>
-
- <init-download-from-eclipse/>
-
- <mkdir dir="${downloads}"/>
-
- <echo message="Downloading from Eclipse... @{file}"/>
-
- <echo message="@{file}" file="${downloads}/url-checksum.txt"/>
- <checksum file="${downloads}/url-checksum.txt" property=".url.checksum"/>
- <delete file="${downloads}/url-checksum.txt"/>
-
- <echo message="URL checksum... ${.url.checksum}"/>
-
- <var name=".content.valid" value="false"/>
-
- <for list="1,2,3,4,5" param="counter">
- <sequential>
- <if>
- <not><istrue value="${.content.valid}"/></not>
- <then>
-
- <if>
- <available file="${downloads}/${.url.checksum}"/>
- <then>
-
- <!-- Download the expected checksum. -->
-
- <delete file="${downloads}/content-checksum.txt" quiet="true"/>
-
- <for list="1,2,3,4,5" param="retry">
- <sequential>
- <if>
- <not><available file="${downloads}/content-checksum.txt"/></not>
- <then>
- <trycatch>
- <try>
- <get src="http://www.eclipse.org/downloads/sums.php?file=@{file}&type=sha512" dest="${downloads}/content-checksum.txt"/>
- </try>
- <catch>
- <echo message="Failed to retrieve the checksum on try @{retry}."/>
- </catch>
- </trycatch>
- </then>
- </if>
- </sequential>
- </for>
-
- <loadfile srcfile="${downloads}/content-checksum.txt" property=".content.checksum"/>
- <delete file="${downloads}/content-checksum.txt"/>
- <propertyregex property=".content.checksum" override="true" input="${.content.checksum}" regexp="([^ ]*).*" select="\1"/>
-
- <!-- Verify the local file againsted the expected checksum. -->
-
- <checksum file="${downloads}/${.url.checksum}" property=".content.checksum.actual" algorithm="SHA-512"/>
-
- <if>
- <equals arg1="${.content.checksum}" arg2="${.content.checksum.actual}"/>
- <then>
- <var name=".content.valid" value="true"/>
- </then>
- <else>
- <echo message="Checksums did not match. Expected ${.content.checksum}. Got ${.content.checksum.actual}."/>
- <if>
- <or>
- <istrue value="${ignore.checksum.issues}"/>
- <contains string="${ignore.checksum.issues.list}" substring="@{file}"/>
- </or>
- <then>
- <var name=".content.valid" value="true"/>
- </then>
- </if>
- </else>
- </if>
-
- <var name=".content.checksum" unset="true"/>
- <var name=".content.checksum.actual" unset="true"/>
-
- </then>
- </if>
-
- <if>
- <not><istrue value="${.content.valid}"/></not>
- <then>
- <if>
- <istrue value="${force.eclipse.org}"/>
- <then>
- <get src="http://www.eclipse.org/downloads/download.php?file=@{file}&mirror_id=1" dest="${downloads}/${.url.checksum}"/>
- </then>
- <else>
- <get src="http://www.eclipse.org/downloads/download.php?file=@{file}&r=1&protocol=http" dest="${downloads}/${.url.checksum}"/>
- </else>
- </if>
- </then>
- </if>
-
- </then>
- </if>
- </sequential>
- </for>
-
- <if>
- <istrue value="${.content.valid}"/>
- <then>
-
- <propertyfile file="${downloads}/${.url.checksum}.properties">
- <entry key="LastUsed" type="date" value="now" pattern="yyyy-MM-dd"/>
- </propertyfile>
-
- <var name="@{property}" value="${downloads}/${.url.checksum}"/>
- <var name=".url.checksum" unset="true"/>
- <var name=".content.valid" unset="true"/>
- <var name=".file" unset="true"/>
- <var name=".archived" unset="true"/>
-
- </then>
- <else>
- <fail message="Failed to download @{file} from Eclipse Foundation."/>
- </else>
- </if>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="prune-downloads-from-eclipse">
- <sequential>
-
- <init-download-from-eclipse/>
-
- <if>
- <available file="${downloads}" type="dir"/>
- <then>
-
- <echo message="Removing Eclipse downloads that haven't been used recently..."/>
-
- <for param="dfe.file">
- <path>
- <fileset dir="${downloads}">
- <include name="*"/>
- <exclude name="*.properties"/>
- </fileset>
- </path>
- <sequential>
-
- <basename file="@{dfe.file}" property=".dfe.file.name"/>
- <property name=".dfe.file.metadata" value="${downloads}/${.dfe.file.name}.properties"/>
-
- <if>
- <available file="${.dfe.file.metadata}"/>
- <then>
- <property file="${.dfe.file.metadata}" prefix=".dfe.metadata."/>
- </then>
- </if>
-
- <if>
- <isset property=".dfe.metadata.LastUsed"/>
- <then>
-
- <if>
- <scriptcondition language="javascript">
- <![CDATA[
- var dateParts = project.getProperty( ".dfe.metadata.LastUsed" ).split( "-" );
-
- if( dateParts.length == 3 )
- {
- var lastUsed = new Date( dateParts[ 0 ], dateParts[ 1 ] - 1, dateParts[ 2 ] );
- var today = new Date();
-
- if( today.getTime() - lastUsed.getTime() < ( 30 * 24 * 60 * 60 * 1000 ) )
- {
- self.value = false;
- }
- else
- {
- self.value = true;
- }
- }
- else
- {
- self.value = false;
- }
- ]]>
- </scriptcondition>
- <then>
- <delete file="@{dfe.file}"/>
- <delete file="${.dfe.file.metadata}"/>
- </then>
- </if>
-
- </then>
- <else>
- <propertyfile file="${.dfe.file.metadata}">
- <entry key="LastUsed" type="date" value="now" pattern="yyyy-MM-dd"/>
- </propertyfile>
- </else>
- </if>
-
- <var name=".dfe.file.name" unset="true"/>
- <var name=".dfe.file.metadata" unset="true"/>
- <var name=".dfe.metadata.LastUsed" unset="true"/>
-
- </sequential>
- </for>
-
- </then>
- </if>
-
- </sequential>
- </macrodef>
-
-
- <target name="prune-downloads-from-eclipse" depends="init">
-
- <prune-downloads-from-eclipse/>
-
- </target>
-
-
- <macrodef name="wipe-download-from-eclipse">
- <attribute name="file"/>
- <sequential>
-
- <init-download-from-eclipse/>
-
- <echo message="@{file}" file="${downloads}/url-checksum.txt"/>
- <checksum file="${downloads}/url-checksum.txt" property=".url.checksum"/>
- <delete file="${downloads}/url-checksum.txt"/>
-
- <delete file="${downloads}/${.url.checksum}"/>
-
- </sequential>
- </macrodef>
-
-
- <target name="wipe-download-from-eclipse" depends="init">
-
- <wipe-download-from-eclipse file="${file}"/>
-
- </target>
-
-
- <macrodef name="with-download-from-eclipse">
- <attribute name="file"/>
- <element name="body" implicit="yes"/>
- <sequential>
-
- <download-from-eclipse file="@{file}" property=".download"/>
- <body/>
- <var name=".download" unset="true"/>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="load-build-repository">
- <attribute name="url"/>
- <sequential>
- <load-repository url="@{url}" property="build.repositories"/>
- </sequential>
- </macrodef>
-
-
- <macrodef name="load-repository">
- <attribute name="url"/>
- <attribute name="property"/>
- <sequential>
- <echo message="Loading repository @{url} ..."/>
- <prepend property="@{property}" value="@{url}"/>
- </sequential>
- </macrodef>
-
-
- <macrodef name="load-repository-archive">
- <attribute name="file"/>
- <attribute name="property"/>
- <sequential>
- <load-repository url="jar:file:@{file}!/" property="@{property}"/>
- </sequential>
- </macrodef>
-
-
- <macrodef name="load-repository-legacy">
- <attribute name="file"/>
- <attribute name="property"/>
- <sequential>
-
- <if>
- <not><available file="@{file}.repo"/></not>
- <then>
-
- <unzip src="@{file}" dest="@{file}.repo">
- <mapper type="regexp" from="^eclipse/(.*)$$" to="\1"/>
- </unzip>
-
- <delete includeemptydirs="true">
- <fileset dir="@{file}.repo">
- <exclude name="plugins/**"/>
- <exclude name="features/**"/>
- </fileset>
- </delete>
-
- <p2.publish.FeaturesAndBundles location="@{file}.repo"/>
-
- <delete includeemptydirs="true">
- <fileset dir="@{file}.repo">
- <exclude name="*.jar"/>
- <exclude name="plugins/*.jar"/>
- <exclude name="features/*.jar"/>
- </fileset>
- </delete>
-
- </then>
- </if>
-
- <load-repository url="file:@{file}.repo" property="@{property}"/>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="install-eclipse">
- <attribute name="dest"/>
- <attribute name="configuration" default="${configuration.recommended}"/>
- <attribute name="platform" default="${current.platform}"/>
- <attribute name="extensions" default=""/>
- <sequential>
-
- <delete dir="@{dest}" quiet="true"/>
- <mkdir dir="@{dest}"/>
-
- <with-configuration name="@{configuration}">
- <if>
- <contains string="@{platform}" substring="win32"/>
- <then>
- <var name=".format" value="zip"/>
- </then>
- <else>
- <var name=".format" value="tar.gz"/>
- </else>
- </if>
- <with-download-from-eclipse file="${.eclipse.platform.build}-@{platform}.${.format}">
- <if>
- <equals arg1="${.format}" arg2="zip"/>
- <then>
- <unzip src="${.download}" dest="@{dest}">
- <mapper type="regexp" from="^eclipse/(.*)$$" to="\1"/>
- </unzip>
- </then>
- <else>
- <delete file="${.download}.tar" quiet="true"/>
- <gunzip src="${.download}" dest="${.download}.tar"/>
- <untar src="${.download}.tar" dest="@{dest}">
- <mapper type="regexp" from="^eclipse/(.*)$$" to="\1"/>
- </untar>
- <delete file="${.download}.tar"/>
- <chmod file="@{dest}/eclipse" perm="777"/>
- </else>
- </if>
- </with-download-from-eclipse>
- <var name=".format" unset="true"/>
- </with-configuration>
-
- <if>
- <not><equals arg1="@{extensions}" arg2=""/></not>
- <then>
- <install-extensions dest="@{dest}" configuration="@{configuration}" extensions="@{extensions}"/>
- </then>
- </if>
-
- <adjust-eclipse-ini install="@{dest}" platform="@{platform}"/>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="install-extensions">
- <attribute name="dest"/>
- <attribute name="configuration" default="${configuration.recommended}"/>
- <attribute name="extensions"/>
- <sequential>
- <with-configuration name="@{configuration}">
- <if>
- <isset property="build.repositories"/>
- <then>
- <append property=".repositories" value="${build.repositories}"/>
- </then>
- </if>
- <java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true">
- <classpath>
- <fileset dir="${bootstrap.platform}/plugins">
- <include name="**/org.eclipse.equinox.launcher_*.jar"/>
- </fileset>
- </classpath>
- <arg line="-application org.eclipse.equinox.p2.director"/>
- <arg line="-repository ${.repositories}"/>
- <arg line="-destination @{dest}"/>
- <arg line="-installIU @{extensions}"/>
- <arg line="-vmargs"/>
- <arg line="-Declipse.p2.data.area=@{dest}/p2"/>
- <jvmarg line="-Xmx512m"/>
- </java>
- </with-configuration>
- </sequential>
- </macrodef>
-
-
- <macrodef name="adjust-eclipse-ini">
- <attribute name="install"/>
- <attribute name="platform"/>
- <sequential>
- <var name=".eclipse.ini" value="@{install}/eclipse.ini"/>
- <if>
- <not><available file="${.eclipse.ini}"/></not>
- <then>
- <var name=".eclipse.ini" value="@{install}/Eclipse.app/Contents/MacOS/eclipse.ini"/>
- </then>
- </if>
- <if>
- <available file="${.eclipse.ini}"/>
- <then>
- <if>
- <contains string="@{platform}" substring="win32"/>
- <then>
- <var name=".nl" value=" "/>
- </then>
- <else>
- <var name=".nl" value=" "/>
- </else>
- </if>
- <if>
- <contains string="@{platform}" substring="x86_64"/>
- <then>
- <replaceregexp file="${.eclipse.ini}" match="([\n|\r]*)-Xmx[0-9]*m" replace="\1-Xmx1024m\1${.nl}-Djava.net.preferIPv4Stack=true"/>
- </then>
- <else>
- <replaceregexp file="${.eclipse.ini}" match="([\n|\r]*)-Xmx[0-9]*m" replace="\1-Xmx512m\1${.nl}-Djava.net.preferIPv4Stack=true"/>
- </else>
- </if>
- <var name=".eclipse.ini" unset="true"/>
- <var name=".nl" unset="true"/>
- </then>
- <else>
- <fail message="Could not locate eclipse.ini file in @{install}"/>
- </else>
- </if>
- </sequential>
- </macrodef>
-
-
- <macrodef name="condition">
- <attribute name="jar"/>
- <sequential>
- <basename property=".filename" file="@{jar}"/>
- <echo message="Conditioning ${.filename}"/>
- <exec executable="pack200">
- <arg value="-r"/>
- <arg value="@{jar}"/>
- </exec>
- <var name=".filename" unset="true"/>
- </sequential>
- </macrodef>
-
-
- <macrodef name="pack">
- <attribute name="jar"/>
- <sequential>
- <basename property=".filename" file="@{jar}"/>
- <echo message="Packing ${.filename}"/>
- <exec executable="pack200">
- <arg value="-E9"/>
- <arg value="@{jar}.pack.gz"/>
- <arg value="@{jar}"/>
- </exec>
- <var name=".filename" unset="true"/>
- </sequential>
- </macrodef>
-
-
- <macrodef name="sign">
- <attribute name="jar"/>
- <sequential>
- <if>
- <istrue value="${sign}"/>
- <then>
- <basename property=".filename" file="@{jar}"/>
- <dirname property=".dirname" file="@{jar}"/>
- <echo message="Signing ${.filename}"/>
- <exec dir="${.dirname}" executable="curl">
- <arg value="--output"/>
- <arg value="${.filename}"/>
- <arg value="--form"/>
- <arg value="filedata=@${.filename}"/>
- <arg value="--silent"/>
- <arg value="--show-error"/>
- <arg value="--fail"/>
- <arg value="http://build.eclipse.org:31338/sign"/>
- </exec>
- <var name=".filename" unset="true"/>
- <var name=".dirname" unset="true"/>
- </then>
- </if>
</sequential>
</macrodef>
diff --git a/releng.new/releng/.gitignore b/releng.new/releng/.gitignore
new file mode 100644
index 0000000..a58c63a
--- /dev/null
+++ b/releng.new/releng/.gitignore
@@ -0,0 +1,2 @@
+/corundum/
+/corundum.zip
diff --git a/releng.new/releng/ant-contrib/ant-contrib-1.0b3.jar b/releng.new/releng/ant-contrib/ant-contrib-1.0b3.jar
deleted file mode 100644
index 0625376..0000000
--- a/releng.new/releng/ant-contrib/ant-contrib-1.0b3.jar
+++ /dev/null
Binary files differ
diff --git a/releng.new/releng/ant-library/.classpath b/releng.new/releng/ant-library/.classpath
deleted file mode 100644
index b390f88..0000000
--- a/releng.new/releng/ant-library/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
- <classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/releng.new/releng/ant-library/.gitignore b/releng.new/releng/ant-library/.gitignore
deleted file mode 100644
index 5d01f1d..0000000
--- a/releng.new/releng/ant-library/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin
-/sapphire-releng-antlib.jar
diff --git a/releng.new/releng/ant-library/.project b/releng.new/releng/ant-library/.project
deleted file mode 100644
index 4abdf84..0000000
--- a/releng.new/releng/ant-library/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>sapphire-releng-antlib</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/releng.new/releng/ant-library/.settings/org.eclipse.jdt.core.prefs b/releng.new/releng/ant-library/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index ace45ce..0000000
--- a/releng.new/releng/ant-library/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
diff --git a/releng.new/releng/ant-library/library.xml b/releng.new/releng/ant-library/library.xml
deleted file mode 100644
index 8f7e255..0000000
--- a/releng.new/releng/ant-library/library.xml
+++ /dev/null
@@ -1,457 +0,0 @@
-<!--
- ******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************
--->
-
-<project name="sapphire-releng-antlib">
-
- <target name="init-library" unless="init.library.completed">
-
- <property environment="env"/>
-
- <dirname property=".base.dir" file="${ant.file.sapphire-releng-antlib}"/>
-
- <taskdef resource="net/sf/antcontrib/antlib.xml">
- <classpath>
- <pathelement location="${.base.dir}/../ant-contrib/ant-contrib-1.0b3.jar"/>
- </classpath>
- </taskdef>
-
- <property name=".src.dir" value="${.base.dir}/src"/>
- <property name=".classes.dir" value="${.base.dir}/bin"/>
- <property name=".antlib.jar" value="${.base.dir}/sapphire-releng-antlib.jar"/>
-
- <if>
- <uptodate targetfile="${.antlib.jar}">
- <srcfiles dir="${.src.dir}" includes="**/*"/>
- </uptodate>
- <then>
- <echo message="Found an up-to-date version of Sapphire releng Ant library. Skipping build..."/>
- </then>
- <else>
- <echo message="Building Sapphire releng Ant library..."/>
- <delete dir="${.classes.dir}" quiet="true"/>
- <mkdir dir="${.classes.dir}"/>
- <javac debug="true" destdir="${.classes.dir}" source="1.8" target="1.8">
- <src path="${.src.dir}"/>
- </javac>
- <jar destfile="${.antlib.jar}">
- <fileset dir="${.classes.dir}"/>
- <fileset dir="${.src.dir}" excludes="**/*.java"/>
- </jar>
- </else>
- </if>
-
- <taskdef resource="org/eclipse/sapphire/releng/ant/library.xml">
- <classpath>
- <pathelement location="${.antlib.jar}"/>
- </classpath>
- </taskdef>
-
- <var name="DSTAMP" unset="true"/>
-
- <tstamp>
- <format property="DSTAMP" pattern="yyyyMMddHHmm"/>
- </tstamp>
-
- <if>
- <os family="windows"/>
- <then>
- <if>
- <os arch="x86"/>
- <then>
- <property name="current.platform" value="win32"/>
- <property name="current.platform.x64" value="false"/>
- </then>
- <else>
- <property name="current.platform" value="win32-x86_64"/>
- <property name="current.platform.x64" value="true"/>
- </else>
- </if>
- </then>
- <elseif>
- <os family="mac"/>
- <then>
- <property name="current.platform" value="macosx-cocoa-x86_64"/>
- </then>
- </elseif>
- <elseif>
- <os family="unix"/>
- <then>
- <if>
- <equals arg1="${os.arch}" arg2="i386"/>
- <then>
- <property name="current.platform" value="linux-gtk"/>
- </then>
- <else>
- <property name="current.platform" value="linux-gtk-x86_64"/>
- </else>
- </if>
- </then>
- </elseif>
- <else>
- <fail message="Unable to identify the operating system."/>
- </else>
- </if>
-
- <property name="init.library.completed" value="true"/>
-
- <var name=".base.dir" unset="true"/>
- <var name=".src.dir" unset="true"/>
- <var name=".classes.dir" unset="true"/>
- <var name=".antlib.jar" unset="true"/>
-
- </target>
-
-
- <target name="init-jdk" depends="init-library">
- <init-jdk version="8"/>
- </target>
-
-
- <macrodef name="init-jdk">
- <attribute name="version"/>
- <sequential>
-
- <if>
- <not><isset property="env.JDK_@{version}_HOME"/></not>
- <then>
- <fail message="Could not locate JDK @{version}. Environment variable JDK_@{version}_HOME not set."/>
- </then>
- </if>
-
- <var name=".location" unset="true"/>
- <var name=".prefix" unset="true"/>
- <var name=".compiler.path" unset="true"/>
- <var name=".system.classpath" unset="true"/>
-
- <propertycopy property=".location" from="env.JDK_@{version}_HOME"/>
- <property name=".prefix" value="java.@{version}"/>
-
- <if>
- <os family="windows"/>
- <then>
- <property name=".compiler.path" value="${.location}/bin/javac.exe"/>
- </then>
- <else>
- <property name=".compiler.path" value="${.location}/bin/javac"/>
- </else>
- </if>
-
- <pathconvert property=".system.classpath">
- <fileset dir="${.location}">
- <include name="lib/*.jar"/>
- <include name="jre/lib/*.jar"/>
- </fileset>
- </pathconvert>
-
- <property name="${.prefix}.compiler.path" value="${.compiler.path}"/>
- <property name="${.prefix}.system.classpath" value="${.system.classpath}"/>
-
- <echo message="Java @{version} Compiler Path : ${.compiler.path}"/>
- <echo message="Java @{version} System Classpath : ${.system.classpath}"/>
-
- <var name=".location" unset="true"/>
- <var name=".prefix" unset="true"/>
- <var name=".compiler.path" unset="true"/>
- <var name=".system.classpath" unset="true"/>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="append">
- <attribute name="property"/>
- <attribute name="value"/>
- <attribute name="separator" default=","/>
- <sequential>
- <if>
- <isset property="@{property}"/>
- <then>
- <propertycopy property=".value" from="@{property}" override="true"/>
- <var name="@{property}" value="${.value}@{separator}@{value}"/>
- <var name=".value" unset="true"/>
- </then>
- <else>
- <var name="@{property}" value="@{value}"/>
- </else>
- </if>
- </sequential>
- </macrodef>
-
-
- <macrodef name="prepend">
- <attribute name="property"/>
- <attribute name="value"/>
- <attribute name="separator" default=","/>
- <sequential>
- <if>
- <isset property="@{property}"/>
- <then>
- <propertycopy property=".value" from="@{property}" override="true"/>
- <var name="@{property}" value="@{value}@{separator}${.value}"/>
- <var name=".value" unset="true"/>
- </then>
- <else>
- <var name="@{property}" value="@{value}"/>
- </else>
- </if>
- </sequential>
- </macrodef>
-
-
- <macrodef name="property-from-set">
- <attribute name="property"/>
- <element name="set" implicit="true"/>
- <sequential>
- <pathconvert property="@{property}">
- <first count="1">
- <sort>
- <set/>
- <reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
- <name/>
- </reverse>
- </sort>
- </first>
- </pathconvert>
- </sequential>
- </macrodef>
-
-
- <macrodef name="expand-all">
- <attribute name="source.dir"/>
- <attribute name="dest.dir" default="@{source.dir}"/>
- <attribute name="suffix" default="jar"/>
- <attribute name="includes" default="*.@{suffix}"/>
- <attribute name="excludes" default=""/>
- <element name="do" implicit="true" optional="true"/>
- <sequential>
- <for param="archive.file">
- <path>
- <fileset dir="@{source.dir}" includes="@{includes}" excludes="@{excludes}"/>
- </path>
- <sequential>
- <basename property="base.name" file="@{archive.file}" suffix="@{suffix}"/>
- <unzip src="@{archive.file}" dest="@{dest.dir}/${base.name}" overwrite="true"/>
- <do/>
- <var name="base.name" unset="true"/>
- </sequential>
- </for>
- </sequential>
- </macrodef>
-
-
- <macrodef name="zip-dirs">
- <attribute name="source.dir"/>
- <attribute name="dest.dir" default="@{source.dir}"/>
- <attribute name="suffix" default="zip"/>
- <attribute name="includes" default="*"/>
- <attribute name="excludes" default=""/>
- <element name="do" optional="true" implicit="true"/>
- <sequential>
- <if>
- <available file="@{source.dir}"/>
- <then>
- <for param="dir">
- <path>
- <dirset dir="@{source.dir}" includes="@{includes}" excludes="@{excludes}"/>
- </path>
- <sequential>
- <basename property="dir.name" file="@{dir}"/>
- <property name="zip.file" value="@{dest.dir}/${dir.name}.@{suffix}"/>
- <zip destfile="${zip.file}">
- <fileset dir="@{dir}"/>
- </zip>
- <delete dir="@{dir}"/>
- <do/>
- <var name="zip.file" unset="true"/>
- <var name="dir.name" unset="true"/>
- </sequential>
- </for>
- </then>
- </if>
- </sequential>
- </macrodef>
-
-
- <macrodef name="eclipse">
- <attribute name="location"/>
- <attribute name="application"/>
- <attribute name="failonerror" default="true"/>
- <attribute name="resultproperty" default=""/>
- <element name="args" optional="true" implicit="true"/>
- <sequential>
- <java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="@{failonerror}" resultproperty="@{resultproperty}">
- <classpath>
- <fileset dir="@{location}/plugins">
- <include name="**/org.eclipse.equinox.launcher_*.jar"/>
- </fileset>
- </classpath>
- <jvmarg value="-Xmx1024m"/>
- <arg line="-application @{application}"/>
- <args/>
- </java>
- </sequential>
- </macrodef>
-
-
- <macrodef name="p2.publish.FeaturesAndBundles">
- <attribute name="location"/>
- <attribute name="name" default="repository"/>
- <sequential>
- <eclipse location="${bootstrap.platform}" application="org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher">
- <arg line="-metadataRepository file:@{location}"/>
- <arg line="-artifactRepository file:@{location}"/>
- <arg line="-metadataRepositoryName "@{name}""/>
- <arg line="-artifactRepositoryName "@{name}""/>
- <arg line="-source @{location}"/>
- <arg line="-compress"/>
- <arg line="-publishArtifacts"/>
- <arg line="-reusePack200Files"/>
- </eclipse>
- </sequential>
- </macrodef>
-
-
- <macrodef name="p2.publish.UpdateSite">
- <attribute name="location"/>
- <attribute name="name" default="repository"/>
- <sequential>
- <eclipse location="${bootstrap.platform}" application="org.eclipse.equinox.p2.publisher.UpdateSitePublisher">
- <arg line="-metadataRepository file:@{location}"/>
- <arg line="-artifactRepository file:@{location}"/>
- <arg line="-metadataRepositoryName "@{name}""/>
- <arg line="-artifactRepositoryName "@{name}""/>
- <arg line="-source @{location}"/>
- <arg line="-compress"/>
- <arg line="-publishArtifacts"/>
- <arg line="-reusePack200Files"/>
- </eclipse>
- </sequential>
- </macrodef>
-
-
- <macrodef name="pde-build">
- <attribute name="root.dir"/>
- <attribute name="build.id"/>
- <attribute name="eclipse"/>
- <attribute name="feature"/>
- <attribute name="warnings" default="false"/>
- <element name="java-args" optional="true" implicit="true"/>
- <sequential>
-
- <clean-pde-build root.dir="@{root.dir}"/>
-
- <property-from-set property=".pdeBuildDir">
- <dirset dir="@{eclipse}/plugins" includes="org.eclipse.pde.build_*"/>
- </property-from-set>
-
- <delete dir="@{root.dir}/build/pde" quiet="true"/>
- <delete dir="@{root.dir}/build/compilelogs" quiet="true"/>
-
- <mkdir dir="@{root.dir}/build/pde"/>
-
- <copy
- file="${.pdeBuildDir}/templates/headless-build/build.properties"
- todir="@{root.dir}/build/pde/builder"
- overwrite="true"/>
-
- <copy
- file="${.pdeBuildDir}/templates/headless-build/customTargets.xml"
- todir="@{root.dir}/build/pde/builder"
- overwrite="true"/>
-
- <if>
- <and>
- <istrue value="@{warnings}"/>
- <istrue value="${warnings}"/>
- </and>
- <then>
- <property name="pde.build.compiler.arg" value=""/>
- </then>
- <else>
- <property name="pde.build.compiler.arg" value="-nowarn"/>
- </else>
- </if>
-
- <eclipse location="@{eclipse}" application="org.eclipse.ant.core.antRunner">
- <arg line="-clean"/>
- <arg line="-data @{root.dir}/build/pde/workspace"/>
- <arg line="-configuration @{root.dir}/build/pde/configuration"/>
- <arg line="-buildfile ${.pdeBuildDir}/scripts/build.xml"/>
- <arg value="-DtopLevelElementId=@{feature}"/>
- <arg value="-DarchivePrefix=eclipse"/>
- <arg value="-DbaseLocation=@{eclipse}"/>
- <arg value="-DbuildDirectory=@{root.dir}"/>
- <arg value="-Dbuilder=@{root.dir}/build/pde/builder"/>
- <arg value="-DcollectingFolder=collecting"/>
- <arg value="-DbuildId=@{build.id}"/>
- <arg value="-DbuildType=I"/>
- <arg value="-DbuildLabel=build"/>
- <arg value="-DforceContextQualifier=@{build.id}"/>
- <arg value="-DgenerateFeatureVersionSuffix=false"/>
- <arg value="-DindividualSourceBundles=true"/>
- <arg value="-DallowBinaryCycles=true" />
- <arg value="-DcompilerArg=${pde.build.compiler.arg}"/>
- <arg value="-DJavaSE-1.8=${java.8.system.classpath}"/>
- <arg value="-DjavacFailOnError=true"/>
- <arg value="-DjavacVerbose=${javacVerbose}"/>
- <arg value="-DjavacDebugInfo=true"/>
- <java-args/>
- </eclipse>
-
- <var name="pde.build.compiler.arg" unset="true"/>
- <var name=".pdeBuildDir" unset="true"/>
-
- <delete dir="@{root.dir}/build/pde" quiet="true"/>
- <delete dir="@{root.dir}/build/compilelogs" quiet="true"/>
-
- <clean-pde-build root.dir="@{root.dir}"/>
-
- </sequential>
- </macrodef>
-
-
- <macrodef name="clean-pde-build">
- <attribute name="root.dir"/>
- <sequential>
- <delete includeEmptyDirs="true" quiet="false" failOnError="false">
- <fileset dir="@{root.dir}">
- <include name="final*.*"/>
- <include name="package*.*"/>
- <include name="assemble*.*"/>
- </fileset>
- <fileset dir="@{root.dir}/plugins">
- <include name="**/javaCompiler.*.args"/>
- <include name="*/build.xml"/>
- <include name="*/@dot/**"/>
- <include name="*/temp.folder/**"/>
- <include name="*.source/**"/>
- <include name="*/src.zip"/>
- <include name="*/build/**"/>
- <include name="*/bin/**"/>
- <include name="*/@dot.log"/>
- <include name="*/.apt_generated/**"/>
- <include name="*/.resources/**"/>
- <include name="org.eclipse.*.source_*/**"/>
- <exclude name="**/.do-not-delete"/>
- </fileset>
- <fileset dir="@{root.dir}/features">
- <include name="*/*.log.zip"/>
- <include name="*/build.xml"/>
- <include name="*/feature.temp.folder/**"/>
- </fileset>
- </delete>
- </sequential>
- </macrodef>
-
-
-</project>
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/AbstractTask.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/AbstractTask.java
deleted file mode 100644
index b11b077..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/AbstractTask.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public abstract class AbstractTask extends Task
-{
- protected void info( final String str )
- {
- log( str, org.apache.tools.ant.Project.MSG_INFO );
- }
-
- protected void warning( final String str )
- {
- log( str, org.apache.tools.ant.Project.MSG_WARN );
- }
-
- protected void error( final String str )
- {
- log( str, org.apache.tools.ant.Project.MSG_ERR );
- }
-
- protected void fail( final String str )
- {
- error( str );
- throw new BuildException( "Build failed." );
- }
-
- @Override
- public void log( final String str,
- final int level )
- {
- StringBuffer line = new StringBuffer();
-
- for( int i = 0; i < str.length(); i++ )
- {
- final char ch = str.charAt( i );
-
- if( ch == '\n' )
- {
- if( line.length() == 0 ) line.append( ' ' );
- super.log( line.toString(), level );
- line = new StringBuffer();
- }
- else
- {
- line.append( ch );
- }
- }
-
- if( line.length() > 0 )
- {
- super.log( line.toString(), level );
- }
- }
-
-}
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/BundleInfo.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/BundleInfo.java
deleted file mode 100644
index b49e260..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/BundleInfo.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-
-import org.apache.tools.ant.BuildException;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class BundleInfo
-{
- private static final String BUNDLE_SYMBOLIC_NAME = "Bundle-SymbolicName";
- private static final String BUNDLE_VERSION = "Bundle-Version";
-
- private final File location;
- private final String id;
- private final BundleVersion version;
-
- public BundleInfo( final File location ) throws Exception
- {
- this.location = location;
-
- final Map<String,String> manifest;
-
- try
- {
- manifest = ManifestUtil.readManifest( this.location );
- }
- catch( IOException e )
- {
- throw new BuildException( e );
- }
-
- String bundleId = manifest.get( BUNDLE_SYMBOLIC_NAME );
- if( bundleId == null ){
- System.out.println("WARNING: Bundle " + location.getName() + " does not have a valid id!");
- throw new Exception("Missing Bundle-SymbolicName in plugin manifest.mf file: " + location.getName() );
- }
-
- int semicolon = bundleId.indexOf( ';' );
-
- if( semicolon != -1 )
- {
- bundleId = bundleId.substring( 0, semicolon );
- }
-
- this.id = bundleId;
-
- final String vstr = manifest.get( BUNDLE_VERSION );
- if( vstr == null ){
- System.out.println("WARNING: Bundle "+ location.getName() + " version is null " );
- throw new Exception("Missing Bundle-Version in plugin manifest.mf file: " + location.getName() );
- }
- this.version = new BundleVersion( vstr );
- }
-
- public BundleInfo( final String id,
- final BundleVersion version )
- {
- this.location = null;
- this.id = id;
- this.version = version;
- }
-
- public static boolean isValidBundle( final File location )
- {
- return ( location.isDirectory() ) ||
- ( location.isFile() && location.getName().endsWith( ".jar" ) );
- }
-
- public File getLocation()
- {
- return this.location;
- }
-
- public String getId()
- {
- return this.id;
- }
-
- public BundleVersion getVersion()
- {
- return this.version;
- }
-}
-
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/BundleInventory.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/BundleInventory.java
deleted file mode 100644
index 35f0eed..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/BundleInventory.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.Comparator;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class BundleInventory
-{
- private static final String NL = System.getProperty( "line.separator" );
-
- private static final Comparator<BundleInfo> BUNDLE_COMPARATOR = new Comparator<BundleInfo>()
- {
- public int compare( final BundleInfo b1,
- final BundleInfo b2 )
- {
- int result = b1.getId().compareTo( b2.getId() );
-
- if( result == 0 )
- {
- result = b1.getVersion().compareTo( b2.getVersion() );
- }
-
- return result;
- }
- };
-
- private final SortedSet<BundleInfo> bundles = new TreeSet<BundleInfo>( BUNDLE_COMPARATOR );
-
- public Set<BundleInfo> getBundles()
- {
- return this.bundles;
- }
-
- public BundleInfo getBundle( final String bundleId )
- {
- for( BundleInfo bundle : this.bundles )
- {
- if( bundle.getId().equals( bundleId ) )
- {
- return bundle;
- }
- }
-
- return null;
- }
-
- public void addBundle( final BundleInfo bundle )
- {
- this.bundles.add( bundle );
- }
-
- public void write( final File f ) throws IOException
- {
- try( BufferedWriter w = new BufferedWriter( new FileWriter( f ) ) )
- {
- for( BundleInfo bundle : this.bundles )
- {
- w.write( bundle.getId() );
- w.write( " : " );
- w.write( bundle.getVersion().toString() );
- w.write( NL );
- }
-
- w.flush();
- }
- }
-
- public void read( final File f ) throws IOException
- {
- this.bundles.clear();
-
- try( BufferedReader r = new BufferedReader( new FileReader( f ) ) )
- {
- for( String line = r.readLine(); line != null; line = r.readLine() )
- {
- final String[] segments = line.split( ":" );
- final String id = segments[ 0 ].trim();
- final BundleVersion version = new BundleVersion( segments[ 1 ] );
-
- this.bundles.add( new BundleInfo( id, version ) );
- }
- }
- }
-
-}
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/BundleVersion.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/BundleVersion.java
deleted file mode 100644
index e6cf63c..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/BundleVersion.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import static java.lang.Math.min;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class BundleVersion implements Comparable<BundleVersion>
-{
- private static final String SEPARATOR = ".";
- private static final String SEPARATOR_REGEX = "\\.";
-
- private long[] segments = null;
-
- public BundleVersion( final long... segments )
- {
- this.segments = segments;
- }
-
- public BundleVersion( final String version )
- {
- if( version == null ){
- System.out.println("WARNING: Bundle veriosn is null");
- segments = new long[]{1L, 0L, 0L};
- return;
- }
- final String trimmed = version.trim();
-
- final String[] stringSegments = trimmed.split( SEPARATOR_REGEX );
- final int length = Math.min( stringSegments.length, 3 );
- this.segments = new long[ length ];
-
- for( int i = 0; i < length; i++ )
- {
- this.segments[ i ] = Long.parseLong( stringSegments[ i ] );
- }
- }
-
- public int length()
- {
- return this.segments.length;
- }
-
- public long segment( final int position )
- {
- return this.segments[ position ];
- }
-
- @Override
- public String toString()
- {
- final StringBuilder buf = new StringBuilder();
-
- for( long segment : this.segments )
- {
- if( buf.length() > 0 ) buf.append( SEPARATOR );
- buf.append( segment );
- }
-
- return buf.toString();
- }
-
- @Override
- public int hashCode()
- {
- int hashCode = 0;
-
- for( long segment : this.segments )
- {
- hashCode += segment;
- }
-
- return hashCode;
- }
-
- @Override
- public boolean equals( final Object object )
- {
- if( this == object )
- {
- return true;
- }
-
- if( ! ( object instanceof BundleVersion ) )
- {
- return false;
- }
-
- final BundleVersion other = (BundleVersion) object;
-
- if( this.segments.length != other.segments.length )
- {
- return false;
- }
-
- for( int i = 0; i < this.segments.length; i++ )
- {
- if( this.segments[ i ] != other.segments[ i ] )
- {
- return false;
- }
- }
-
- return true;
- }
-
- public int compareTo( final BundleVersion other )
- {
- if( this == other )
- {
- return 0;
- }
-
- for( int i = 0, n = min( this.segments.length, other.segments.length );
- i < n; i++ )
- {
- final long result = this.segments[ i ] - other.segments[ i ];
-
- if( result < 0 )
- {
- return -1;
- }
- else if( result > 0 )
- {
- return 1;
- }
- }
-
- if( this.segments.length > other.segments.length )
- {
- return 1;
- }
- else if( this.segments.length < other.segments.length )
- {
- return -1;
- }
-
- return 0;
- }
-}
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/CreateInventoryTask.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/CreateInventoryTask.java
deleted file mode 100644
index f0f2aa5..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/CreateInventoryTask.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.types.Path;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class CreateInventoryTask extends AbstractTask
-{
- private Path pluginSearchPath = null;
- private File destination = null;
-
- public void setDest( final File destination )
- {
- this.destination = destination;
- }
-
- public Path createPlugins()
- {
- this.pluginSearchPath = new Path( getProject() );
- return this.pluginSearchPath.createPath();
- }
-
- @Override
- public void execute()
-
- throws BuildException
-
- {
- final BundleInventory inventory = new BundleInventory();
-
- for( String path : this.pluginSearchPath.list() )
- {
- final File dir = new File( path );
-
- if( ! dir.exists() )
- {
- fail( path + " does not exist!" );
- }
-
- if( dir.exists() )
- {
- for( File location : dir.listFiles() )
- {
- if( BundleInfo.isValidBundle( location ) )
- {
- try{
- inventory.addBundle( new BundleInfo( location ) );
- }catch(Exception e){
- if( "true".equals( System.getProperty("debug") ))
- e.printStackTrace();
- }
- }
- }
- }
- }
-
- try
- {
- inventory.write( this.destination );
- }
- catch( IOException e )
- {
- throw new BuildException( e );
- }
- }
-
-}
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ExportDocumentationTask.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ExportDocumentationTask.java
deleted file mode 100644
index fc2ef2d..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ExportDocumentationTask.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.tools.ant.BuildException;
-
-public final class ExportDocumentationTask extends AbstractTask
-{
- private String server;
- private File destination;
-
- public void setServer( final String server )
- {
- this.server = server;
- }
-
- public void setDest( final File destination )
- {
- this.destination = destination;
- }
-
- @Override
- public void execute() throws BuildException
- {
- final String base = this.server + "/help/topic/org.eclipse.sapphire.doc/html/";
- final String url = base + "index.html";
-
- try
- {
- export( url, base, this.destination );
- }
- catch( final Exception e )
- {
- throw new BuildException( e );
- }
- }
-
- private void export( final String url, final String base, final File destination ) throws Exception
- {
- export( url, base, destination, new HashSet<String>() );
- }
-
- private void export( final String url, final String base, final File destination, final Set<String> captured ) throws Exception
- {
- if( captured.contains( url ) )
- {
- return;
- }
-
- info( "Exporting " + url );
-
- captured.add( url );
-
- final File f = new File( destination, url.substring( base.length() ) );
- final File fp = f.getParentFile();
-
- if( ! fp.exists() && ! fp.mkdirs() )
- {
- throw new RuntimeException();
- }
-
- final URLConnection connection = ( new URL( url ) ).openConnection();
-
- try( InputStream stream = connection.getInputStream() )
- {
- if( connection.getContentType().equals( "text/html" ) )
- {
- final Reader r = new InputStreamReader( stream, "UTF-8" );
- final StringBuilder content = new StringBuilder();
-
- char[] buffer = new char[ 1024 ];
-
- for( int count; ( count = r.read( buffer ) ) != -1; )
- {
- content.append( buffer, 0, count );
- }
-
- String html = content.toString();
-
- html = html.replaceAll( "<script[^>]*>[^<]*</script>", "" );
- html = html.replaceFirst( "<link[^>]+breadcrumbs\\.css[^>]+></link>", "" );
-
- final Matcher hrefMatcher = Pattern.compile( "href=\"((\\.\\./)*topic/org\\.eclipse\\.sapphire\\.doc/html/([^\"]+))\"" ).matcher( html );
-
- while( hrefMatcher.find() )
- {
- final String href = hrefMatcher.group( 3 );
- final File hrefFile = new File( destination, href );
- final File hrefFolder = hrefFile.getParentFile();
- final int level = fp.getAbsolutePath().split( "\\\\" ).length - hrefFolder.getAbsolutePath().split( "\\\\" ).length;
- final StringBuilder relative = new StringBuilder();
-
- for( int i = 0; i < level; i++ )
- {
- relative.append( "../" );
- }
-
- relative.append( hrefFile.getName() );
-
- html = html.replace( hrefMatcher.group( 1 ), relative );
- }
-
- final Set<String> references = new HashSet<String>();
-
- references.addAll( references( html, "a", "href" ) );
- references.addAll( references( html, "img", "src" ) );
- references.addAll( references( html, "link", "href" ) );
-
- final int urlLastSlash = url.lastIndexOf( "/" );
- final String urlParent = url.substring( 0, urlLastSlash + 1 );
-
- for( final String ref : references )
- {
- export( url( urlParent, ref ), base, destination, captured );
- }
-
- try( OutputStreamWriter fw = new OutputStreamWriter( new FileOutputStream( f ), "UTF-8" ) )
- {
- fw.write( html );
- }
- }
- else
- {
- try( FileOutputStream fout = new FileOutputStream( f ) )
- {
- byte[] buffer = new byte[ 1024 ];
-
- for( int count; ( count = stream.read( buffer ) ) != -1; )
- {
- fout.write( buffer, 0, count );
- }
- }
- }
- }
- }
-
- private static final Set<String> references( final String html, final String tag, final String attribute )
- {
- final Set<String> urls = new HashSet<String>();
- final Matcher tagMatcher = Pattern.compile( "(<" + tag + "\\s+[^>]+>)" ).matcher( html );
-
- while( tagMatcher.find() )
- {
- final String link = tagMatcher.group( 1 );
- final Matcher hrefMatcher = Pattern.compile( attribute + "\\s*=\\s*\"([^\"]+)\"" ).matcher( link );
-
- if( hrefMatcher.find() )
- {
- final String href = hrefMatcher.group( 1 );
-
- if( ! href.startsWith( "#" ) && ! href.startsWith( "http://" ) && ! href.startsWith( "https://" ) )
- {
- urls.add( href );
- }
- }
- }
-
- return urls;
- }
-
- private static final String url( final String base, final String relative )
- {
- String b = base;
- String r = relative;
-
- if( b.endsWith( "/" ) )
- {
- b = b.substring( 0, b.length() - 1 );
- }
-
- while( r.startsWith( "../" ) )
- {
- final int bLastSlash = b.lastIndexOf( '/' );
- b = b.substring( 0, bLastSlash );
- r = r.substring( 3 );
- }
-
- final int rLastHash = r.lastIndexOf( '#' );
-
- if( rLastHash != -1 )
- {
- r = r.substring( 0, rLastHash );
- }
-
- return b + "/" + r;
- }
-
-}
\ No newline at end of file
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ManifestBundlesListEntry.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ManifestBundlesListEntry.java
deleted file mode 100644
index d56eb93..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ManifestBundlesListEntry.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class ManifestBundlesListEntry
-{
- private String bundleId;
- private final List<String> attributes = new CopyOnWriteArrayList<String>();
-
- public ManifestBundlesListEntry( String bundleId,
- final List<String> attributes )
- {
- this.bundleId = bundleId;
- this.attributes.addAll( attributes );
- }
-
- public String bundle()
- {
- return this.bundleId;
- }
-
- public List<String> attributes()
- {
- return this.attributes;
- }
-
- public String toString()
- {
- final StringBuilder buf = new StringBuilder();
-
- buf.append( this.bundleId );
-
- for( String attribute : attributes )
- {
- buf.append( ';' );
- buf.append( attribute );
- }
-
- return buf.toString();
- }
-
- public static List<ManifestBundlesListEntry> parse( final String string )
- {
- final List<ManifestBundlesListEntry> entries = new ArrayList<ManifestBundlesListEntry>();
- final int length = string.length();
- final MutableReference<Integer> position = new MutableReference<Integer>( 0 );
-
- while( position.get() < length )
- {
- final ManifestBundlesListEntry entry = parse( string, position );
-
- if( entry != null )
- {
- entries.add( entry );
- }
- }
-
- return entries;
- }
-
- private static ManifestBundlesListEntry parse( final String string,
- final MutableReference<Integer> position )
- {
- int stopChar;
-
- final StringBuilder bundleIdBuffer = new StringBuilder();
- stopChar = readUntil( string, position, bundleIdBuffer, ";," );
-
- if( stopChar == -1 )
- {
- return null;
- }
-
- final List<String> attributes = new ArrayList<String>();
-
- while( stopChar == ';' )
- {
- final StringBuilder attribute = new StringBuilder();
- stopChar = readUntil( string, position, attribute, ";," );
- attributes.add( attribute.toString() );
- }
-
- final String bundleId = bundleIdBuffer.toString().trim();
-
- if( bundleId.length() > 0 )
- {
- return new ManifestBundlesListEntry( bundleId, attributes );
- }
- else
- {
- return null;
- }
- }
-
- private static int readUntil( final String string,
- final MutableReference<Integer> position,
- final StringBuilder buffer,
- final String stopChars )
- {
- int pos = position.get();
- int ch = -1;
- boolean stop = false;
-
- for( int len = string.length(); pos < len && ! stop; pos++ )
- {
- ch = string.charAt( pos );
-
- if( stopChars.indexOf( ch ) != -1 )
- {
- stop = true;
- }
- else
- {
- buffer.append( (char) ch );
-
- if( ch == '"' )
- {
- position.set( pos + 1 );
-
- if( readUntil( string, position, buffer, "\"" ) != -1 )
- {
- buffer.append( '"' );
- }
-
- pos = position.get() - 1;
- }
- }
- }
-
- position.set( pos );
-
- return ch;
- }
-}
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ManifestUtil.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ManifestUtil.java
deleted file mode 100644
index 6cfd904..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ManifestUtil.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class ManifestUtil
-{
- public static final String MANIFEST_FILE_NAME = "MANIFEST.MF";
- public static final String MANIFEST_PATH = "META-INF/" + MANIFEST_FILE_NAME;
-
- public static final String ATTR_CLASSPATH = "Class-Path";
- public static final String ATTR_IMPLEMENTATION_VERSION = "Implementation-Version";
-
- private ManifestUtil() {}
-
- public static File findManifestFile( final File baseDir )
- {
- return new File( baseDir, MANIFEST_PATH );
- }
-
- public static Map<String,String> readManifest( final File location )
-
- throws IOException
-
- {
- if( location.isFile() )
- {
- try( ZipFile zip = ZipUtil.open( location ) )
- {
- return readManifest( zip );
- }
- }
- else
- {
- final File manifestFile = new File( location, MANIFEST_PATH );
-
- if( manifestFile.exists() )
- {
- try( InputStream in = new FileInputStream( manifestFile ) )
- {
- return readManifest( new BufferedInputStream( in ) );
- }
- }
- else
- {
- return Collections.emptyMap();
- }
- }
- }
-
- public static String readManifestEntry( File location,
- final String key )
-
- throws IOException
-
- {
- final Map<String,String> manifest = readManifest( location );
-
- if( manifest != null )
- {
- return manifest.get( key );
- }
-
- return null;
- }
-
- public static Map<String,String> readManifest( final ZipFile zip )
-
- throws IOException
-
- {
- final ZipEntry zipentry = ZipUtil.getZipEntry( zip, MANIFEST_PATH );
-
- if( zipentry != null )
- {
- try( InputStream in = zip.getInputStream( zipentry ) )
- {
- return readManifest( in );
- }
- }
- else
- {
- return Collections.emptyMap();
- }
- }
-
- public static Map<String,String> readManifest( final InputStream stream )
-
- throws IOException
-
- {
- final Map<String,String> entries = new HashMap<String,String>();
- final Manifest manifest = new Manifest();
-
- manifest.read( stream );
-
- for( Map.Entry<Object,Object> entry
- : manifest.getMainAttributes().entrySet() )
- {
- final Attributes.Name name = (Attributes.Name) entry.getKey();
- entries.put( name.toString(), (String) entry.getValue() );
- }
-
- return entries;
- }
-
- public static List<File> readManifestClasspath( final File archive )
-
- throws IOException
-
- {
- final String manifestClasspathEntry = readManifestEntry( archive, ATTR_CLASSPATH );
-
- if( manifestClasspathEntry == null )
- {
- return Collections.emptyList();
- }
-
- final List<File> manifestClasspath = new ArrayList<File>();
- final File baseDir = archive.getParentFile();
-
- for( String entry : manifestClasspathEntry.split( " " ) )
- {
- final String trimmedEntry = entry.trim();
-
- if( trimmedEntry.length() > 0 )
- {
- final File f = new File( baseDir, trimmedEntry );
- manifestClasspath.add( f );
- }
- }
-
- return manifestClasspath;
- }
-
- public static void setManifestEntry( File manifestFile,
- final String entryKey,
- final String entryValue )
-
- throws IOException
-
- {
- setManifestEntries( manifestFile, Collections.singletonMap( entryKey, entryValue ) );
- }
-
- public static void setManifestEntries( final File manifestFile,
- final Map<String,String> entries )
-
- throws IOException
-
- {
- final Manifest manifest = new Manifest();
-
- if( manifestFile.exists() )
- {
- try( InputStream in = new FileInputStream( manifestFile ) )
- {
- manifest.read( new BufferedInputStream( in ) );
- }
- }
-
- final Attributes mainAttributes = manifest.getMainAttributes();
-
- for( Map.Entry<String,String> entry : entries.entrySet() )
- {
- mainAttributes.putValue( entry.getKey(), entry.getValue() );
- }
-
- try( BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream( manifestFile ) ) )
- {
- manifest.write( out );
- out.flush();
- }
- }
-
-}
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/MutableReference.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/MutableReference.java
deleted file mode 100644
index a384577..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/MutableReference.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public class MutableReference<T>
-{
- private T value;
- private final Set<Listener> listeners;
-
- public MutableReference()
- {
- this( null );
- }
-
- public MutableReference( final T value )
- {
- this.value = value;
- this.listeners = new CopyOnWriteArraySet<Listener>();
- }
-
- public T get()
- {
- return this.value;
- }
-
- public void set( final T value )
- {
- final T oldValue = this.value;
- this.value = value;
-
- notifyListeners( oldValue, this.value );
- }
-
- public void addListener( final Listener listener )
- {
- this.listeners.add( listener );
- }
-
- public void removeListener( final Listener listener )
- {
- this.listeners.remove( listener );
- }
-
- private void notifyListeners( final T oldValue,
- final T newValue )
- {
- for( Listener listener : this.listeners )
- {
- listener.handleReferenceChanged( oldValue, newValue );
- }
- }
-
- public static abstract class Listener
- {
- public abstract void handleReferenceChanged( final Object oldValue,
- final Object newValue );
- }
-
-}
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/SetBundleVersionConstraintsTask.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/SetBundleVersionConstraintsTask.java
deleted file mode 100644
index 7bdbe9a..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/SetBundleVersionConstraintsTask.java
+++ /dev/null
@@ -1,572 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Pattern;
-
-import org.apache.tools.ant.BuildException;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class SetBundleVersionConstraintsTask extends AbstractTask
-{
- private static final String PROP_REQUIRE_BUNDLE = "Require-Bundle";
- private static final String ATTR_BUNDLE_VERSION = "bundle-version";
-
- private static final Rule DEFAULT_RULE = new Rule( "[M1.M2.M3,T1.T2+1.0)" );
-
- private File minPlatformInventoryFile = null;
- private File targetPlatformInventoryFile = null;
- private File pluginsDirectory = null;
- private boolean failIfVersionSpecified = true;
- private boolean failOnUnknownBundle = true;
- private final List<ExcludeEntry> excludes = new ArrayList<ExcludeEntry>();
- private final List<Rule> rules = new ArrayList<Rule>();
-
- public void setMinPlatformInventory( final File minPlatformInventory )
- {
- this.minPlatformInventoryFile = minPlatformInventory;
- }
-
- public void setTargetPlatformInventory( final File targetPlatformInventory )
- {
- this.targetPlatformInventoryFile = targetPlatformInventory;
- }
-
- public void setPluginsDirectory( final File pluginsDirectory )
- {
- this.pluginsDirectory = pluginsDirectory;
- }
-
- public void setFailIfVersionSpecified( final boolean failIfVersionSpecified )
- {
- this.failIfVersionSpecified = failIfVersionSpecified;
- }
-
- public void setFailOnUnknownBundle( final boolean failOnUnknownBundle )
- {
- this.failOnUnknownBundle = failOnUnknownBundle;
- }
-
- public ExcludeEntry createExclude()
- {
- final ExcludeEntry exclude = new ExcludeEntry();
- this.excludes.add( exclude );
- return exclude;
- }
-
- private boolean isExcluded( final String id )
- {
- for( ExcludeEntry entry : this.excludes )
- {
- final String pattern = entry.getId();
-
- if( pattern != null && id.matches( pattern ) )
- {
- return true;
- }
- }
-
- return false;
- }
-
- public Rule createRule()
- {
- final Rule rule = new Rule();
- this.rules.add( rule );
- return rule;
- }
-
- private Rule getRule( final String bundleId )
- {
- for( Rule rule : this.rules )
- {
- if( rule.matchBundleId( bundleId ) )
- {
- return rule;
- }
- }
-
- return DEFAULT_RULE;
- }
-
- @Override
- public void execute()
-
- throws BuildException
-
- {
- try
- {
- final BundleInventory inventory = new BundleInventory();
-
- if( ! this.pluginsDirectory.exists() )
- {
- fail( this.pluginsDirectory.toString() + " does not exist!" );
- }
-
- if( this.pluginsDirectory.exists() )
- {
- for( File location : this.pluginsDirectory.listFiles() )
- {
- if( BundleInfo.isValidBundle( location ) )
- {
- try
- {
- inventory.addBundle( new BundleInfo( location ) );
- }
- catch( Exception e )
- {
- if( "true".equals( System.getProperty( "debug" ) ) )
- {
- e.printStackTrace();
- }
- }
- }
- }
- }
-
- final BundleInventory minPlatformInventory = new BundleInventory();
- minPlatformInventory.read( this.minPlatformInventoryFile );
-
- final BundleInventory targetPlatformInventory = new BundleInventory();
- targetPlatformInventory.read( this.targetPlatformInventoryFile );
-
- for( BundleInfo bundle : inventory.getBundles() )
- {
- final String id = bundle.getId();
-
- if( isExcluded( id ) )
- {
- info( id + " : excluded" );
- continue;
- }
-
- final File location = bundle.getLocation();
-
- final String existingRequireBundle
- = ManifestUtil.readManifestEntry( location, PROP_REQUIRE_BUNDLE );
-
- if( existingRequireBundle == null )
- {
- info( id + " : no Require-Bundle found" );
- continue;
- }
-
- info( id + " : processing..." );
-
- final List<ManifestBundlesListEntry> entries = ManifestBundlesListEntry.parse( existingRequireBundle );
-
- for( ManifestBundlesListEntry entry : entries )
- {
- boolean hasVersionConstraint = false;
-
- for( String attribute : entry.attributes() )
- {
- if( attribute.startsWith( ATTR_BUNDLE_VERSION ) )
- {
- hasVersionConstraint = true;
- }
- }
-
- if( hasVersionConstraint )
- {
- final String message = "Manifest of bundle " + bundle.getId() + " contains bundle version constraints!";
-
- if( this.failIfVersionSpecified )
- {
- fail( message );
- }
- else
- {
- error( message );
- continue;
- }
- }
-
- final String bundleId = entry.bundle();
-
- BundleInfo minPlatformBundleInfo;
- BundleInfo targetPlatformBundleInfo;
-
- final BundleInfo productBundle = inventory.getBundle( bundleId );
-
- if( productBundle != null )
- {
- minPlatformBundleInfo = productBundle;
- targetPlatformBundleInfo = productBundle;
- }
- else
- {
- minPlatformBundleInfo = minPlatformInventory.getBundle( bundleId );
-
- if( minPlatformBundleInfo == null )
- {
- final String message = "Minimum platform inventory does not contain bundle " + bundleId;
-
- if( this.failOnUnknownBundle )
- {
- fail( message );
- }
- else
- {
- error( message );
- continue;
- }
- }
-
- targetPlatformBundleInfo = targetPlatformInventory.getBundle( bundleId );
-
- if( targetPlatformBundleInfo == null )
- {
- final String message = "Build platform inventory does not contain bundle " + bundleId;
-
- if( this.failOnUnknownBundle )
- {
- fail( message );
- }
- else
- {
- error( message );
- continue;
- }
- }
- }
-
- final BundleVersion minVersion = minPlatformBundleInfo.getVersion();
- final int minVersionLen = minVersion.length();
- final BundleVersion targetVersion = targetPlatformBundleInfo.getVersion();
- final int targetVersionLen = targetVersion.length();
-
- final Map<RuleVariable,Long> substitutions = new HashMap<RuleVariable,Long>();
- substitutions.put( RuleVariable.M1, minVersion.segment( 0 ) );
- substitutions.put( RuleVariable.M2, minVersionLen > 1 ? minVersion.segment( 1 ) : 0 );
- substitutions.put( RuleVariable.M3, minVersionLen > 2 ? minVersion.segment( 2 ) : 0 );
- substitutions.put( RuleVariable.T1, targetVersion.segment( 0 ) );
- substitutions.put( RuleVariable.T2, targetVersionLen > 1 ? targetVersion.segment( 1 ) : 0 );
- substitutions.put( RuleVariable.T3, targetVersionLen > 2 ? targetVersion.segment( 2 ) : 0 );
-
- final String range = getRule( bundleId ).evaluate( substitutions );
-
- final StringBuilder constraint = new StringBuilder();
- constraint.append( ATTR_BUNDLE_VERSION );
- constraint.append( "=\"" );
- constraint.append( range );
- constraint.append( "\"" );
-
- entry.attributes().add( constraint.toString() );
- }
-
- final StringBuilder newRequireBundle = new StringBuilder();
- boolean isFirst = true;
-
- for( ManifestBundlesListEntry entry : entries )
- {
- if( isFirst )
- {
- isFirst = false;
- }
- else
- {
- newRequireBundle.append( ',' );
- }
-
- newRequireBundle.append( entry.toString() );
- }
-
- final File manifestFile = new File( location, ManifestUtil.MANIFEST_PATH );
-
- ManifestUtil.setManifestEntry( manifestFile, PROP_REQUIRE_BUNDLE,
- newRequireBundle.toString() );
- }
- }
- catch( IOException e )
- {
- throw new BuildException( e );
- }
- }
-
- public static final class ExcludeEntry
- {
- private String id;
-
- public String getId()
- {
- return this.id;
- }
-
- public void setId( final String id )
- {
- this.id = id;
- }
- }
-
- public enum RuleVariable
- {
- M1,
- M2,
- M3,
- T1,
- T2,
- T3
- }
-
- public static final class Rule
- {
- private String bundleId;
- private Pattern bundleIdPattern;
- private boolean startInclusive;
- private List<Particle> startVersion;
- private boolean endInclusive;
- private List<Particle> endVersion;
-
- public Rule()
- {
- }
-
- public Rule( final String expr )
- {
- setExpr( expr );
- }
-
- public String getBundle()
- {
- return this.bundleId;
- }
-
- public void setBundle( final String bundleId )
- {
- this.bundleId = bundleId;
-
- final String bundleIdExpr = this.bundleId.replace( ".", "\\." ).replace( "*", ".*" );
- this.bundleIdPattern = Pattern.compile( bundleIdExpr );
- }
-
- public boolean matchBundleId( final String bundleId )
- {
- return ( this.bundleIdPattern.matcher( bundleId ).matches() );
- }
-
- public void setExpr( final String expr )
- {
- if( expr.startsWith( "[" ) )
- {
- this.startInclusive = true;
- }
- else if( expr.startsWith( "(" ) )
- {
- this.startInclusive = false;
- }
- else
- {
- throw new IllegalArgumentException( expr );
- }
-
- if( expr.endsWith( "]" ) )
- {
- this.endInclusive = true;
- }
- else if( expr.endsWith( ")" ) )
- {
- this.endInclusive = false;
- }
- else
- {
- throw new IllegalArgumentException( expr );
- }
-
- final int comma = expr.indexOf( ',' );
-
- if( comma == -1 )
- {
- throw new IllegalArgumentException( expr );
- }
-
- final String vStart = expr.substring( 1, comma );
- final String vEnd = expr.substring( comma + 1, expr.length() - 1 );
-
- this.startVersion = parseVersion( vStart );
- this.endVersion = parseVersion( vEnd );
- }
-
- private List<Particle> parseVersion( final String string )
- {
- final List<Particle> particles = new ArrayList<Particle>();
-
- for( String particle : string.split( "\\." ) )
- {
- particles.add( parseParticle( particle ) );
- }
-
- return particles;
- }
-
- private Particle parseParticle( final String string )
- {
- if( string.indexOf( '+' ) != -1 )
- {
- final int operand = string.indexOf( '+' );
- final String aString = string.substring( 0, operand ).trim();
- final String bString = string.substring( operand + 1 ).trim();
- return new SumParticle( parseParticle( aString ), parseParticle( bString ) );
- }
- else if( string.indexOf( '-' ) != -1 )
- {
- final int operand = string.indexOf( '-' );
- final String aString = string.substring( 0, operand ).trim();
- final String bString = string.substring( operand + 1 ).trim();
- return new DifferenceParticle( parseParticle( aString ), parseParticle( bString ) );
- }
- else
- {
- RuleVariable variable = null;
-
- try
- {
- variable = RuleVariable.valueOf( string );
- }
- catch( IllegalArgumentException e ) {}
-
- if( variable == null )
- {
- final long literal = Long.parseLong( string );
- return new LiteralParticle( literal );
- }
- else
- {
- return new VariableParticle( variable );
- }
- }
- }
-
- public String evaluate( final Map<RuleVariable,Long> substitutions )
- {
- final StringBuilder buf = new StringBuilder();
-
- buf.append( this.startInclusive ? '[' : '(' );
-
- for( int i = 0, n = this.startVersion.size(); i < n; i++ )
- {
- final Particle particle = this.startVersion.get( i );
-
- if( i > 0 )
- {
- buf.append( '.' );
- }
-
- buf.append( String.valueOf( particle.evaluate( substitutions ) ) );
- }
-
- buf.append( ',' );
-
- for( int i = 0, n = this.endVersion.size(); i < n; i++ )
- {
- final Particle particle = this.endVersion.get( i );
-
- if( i > 0 )
- {
- buf.append( '.' );
- }
-
- buf.append( String.valueOf( particle.evaluate( substitutions ) ) );
- }
-
- buf.append( this.endInclusive ? ']' : ')' );
-
- return buf.toString();
- }
-
- private static abstract class Particle
- {
- public abstract long evaluate( Map<RuleVariable,Long> substitutions );
- }
-
- private static final class LiteralParticle extends Particle
- {
- private final long literal;
-
- public LiteralParticle( final long literal )
- {
- this.literal = literal;
- }
-
- @Override
- public long evaluate( final Map<RuleVariable,Long> substitutions )
- {
- return this.literal;
- }
- }
-
- private static final class VariableParticle extends Particle
- {
- private final RuleVariable variable;
-
- public VariableParticle( final RuleVariable variable )
- {
- this.variable = variable;
- }
-
- @Override
- public long evaluate( final Map<RuleVariable,Long> substitutions )
- {
- return substitutions.get( this.variable );
- }
- }
-
- private static final class SumParticle extends Particle
- {
- private final Particle a;
- private final Particle b;
-
- public SumParticle( final Particle a,
- final Particle b )
- {
- this.a = a;
- this.b = b;
- }
-
- @Override
- public long evaluate( final Map<RuleVariable,Long> substitutions )
- {
- return this.a.evaluate( substitutions ) + this.b.evaluate( substitutions );
- }
- }
-
- private static final class DifferenceParticle extends Particle
- {
- private final Particle a;
- private final Particle b;
-
- public DifferenceParticle( final Particle a,
- final Particle b )
- {
- this.a = a;
- this.b = b;
- }
-
- @Override
- public long evaluate( final Map<RuleVariable,Long> substitutions )
- {
- return this.a.evaluate( substitutions ) - this.b.evaluate( substitutions );
- }
- }
- }
-
-}
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/SetExportPackageVersionTask.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/SetExportPackageVersionTask.java
deleted file mode 100644
index ef095f5..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/SetExportPackageVersionTask.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.ArrayList;
-
-import org.apache.tools.ant.BuildException;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class SetExportPackageVersionTask extends AbstractTask
-{
- private static final String PROP_BUNDLE_VERSION = "Bundle-Version";
- private static final String PROP_EXPORT_PACKAGE = "Export-Package";
-
- private File bundlesLocation = null;
- private final List<ExcludeEntry> excludes = new ArrayList<ExcludeEntry>();
-
- public void setBundles( final File bundlesLocation )
- {
- this.bundlesLocation = bundlesLocation;
- }
-
- public ExcludeEntry createExclude()
- {
- final ExcludeEntry exclude = new ExcludeEntry();
- this.excludes.add( exclude );
- return exclude;
- }
-
- private boolean isExcluded( final String id )
- {
- for( ExcludeEntry entry : this.excludes )
- {
- final String pattern = entry.getId();
-
- if( pattern != null && id.matches( pattern ) )
- {
- return true;
- }
- }
-
- return false;
- }
-
- private boolean isExcluded( final File bundle )
- {
- try
- {
- return isExcluded( ( new BundleInfo( bundle ) ).getId() );
- }
- catch( Exception e )
- {
- if( "true".equals( System.getProperty( "debug" ) ) )
- {
- e.printStackTrace();
- }
- }
-
- return true;
- }
-
- @Override
- public void execute() throws BuildException
- {
- try
- {
- if( ! this.bundlesLocation.exists() )
- {
- fail( this.bundlesLocation.toString() + " does not exist!" );
- }
-
- if( this.bundlesLocation.exists() )
- {
- for( File location : this.bundlesLocation.listFiles() )
- {
- if( BundleInfo.isValidBundle( location ) && ! isExcluded( location ) )
- {
- final String originalExportPackage = ManifestUtil.readManifestEntry( location, PROP_EXPORT_PACKAGE );
-
- if( originalExportPackage != null )
- {
- final String bundleVersion = ManifestUtil.readManifestEntry( location, PROP_BUNDLE_VERSION );
-
- if( bundleVersion == null )
- {
- fail( "Bundle located at \"" + location.toString() + "\" does not specify Bundle-Version." );
- }
-
- final StringBuilder modifiedExportPackage = new StringBuilder();
-
- for( ManifestBundlesListEntry entry : ManifestBundlesListEntry.parse( originalExportPackage ) )
- {
- for( String attr : entry.attributes() )
- {
- if( attr.startsWith( "version=" ) )
- {
- fail( "Bundle located at \"" + location.toString() + "\" manually specifies an exported package version for \"" + entry.bundle() + "\"." );
- }
- }
-
- entry.attributes().add( 0, "version=\"" + bundleVersion + "\"" );
-
- if( modifiedExportPackage.length() > 0 )
- {
- modifiedExportPackage.append( ',' );
- }
-
- modifiedExportPackage.append( entry );
- }
-
- final File manifestFile = new File( location, ManifestUtil.MANIFEST_PATH );
-
- ManifestUtil.setManifestEntry( manifestFile, PROP_EXPORT_PACKAGE, modifiedExportPackage.toString() );
- }
- }
- }
- }
- }
- catch( IOException e )
- {
- throw new BuildException( e );
- }
- }
-
- public static final class ExcludeEntry
- {
- private String id;
-
- public String getId()
- {
- return this.id;
- }
-
- public void setId( final String id )
- {
- this.id = id;
- }
- }
-
-}
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ZipUtil.java b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ZipUtil.java
deleted file mode 100644
index ab7a3a2..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/ZipUtil.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.ant;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class ZipUtil
-{
- /**
- * This class is a container for static methods and is not meant to be
- * instantiated.
- */
-
- private ZipUtil() {}
-
- public static ZipFile open( final File file )
-
- throws IOException
-
- {
- try
- {
- return new ZipFile( file );
- }
- catch( FileNotFoundException e )
- {
- final FileNotFoundException fnfe
- = new FileNotFoundException( file.getAbsolutePath() );
-
- fnfe.initCause( e );
-
- throw fnfe;
- }
- }
-
- public static ZipEntry getZipEntry( ZipFile zip,
- final String name )
-
- throws IOException
-
- {
- final String lcasename = name.toLowerCase();
-
- for( Enumeration<?> itr = zip.entries(); itr.hasMoreElements(); )
- {
- final ZipEntry zipentry = (ZipEntry) itr.nextElement();
-
- if( zipentry.getName().toLowerCase().equals( lcasename ) )
- {
- return zipentry;
- }
- }
-
- return null;
- }
-
-}
diff --git a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/library.xml b/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/library.xml
deleted file mode 100644
index cee0b68..0000000
--- a/releng.new/releng/ant-library/src/org/eclipse/sapphire/releng/ant/library.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- ******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************
--->
-
-<antlib>
-
- <taskdef name="create-inventory"
- classname="org.eclipse.sapphire.releng.ant.CreateInventoryTask"/>
-
- <taskdef name="set-bundle-version-constraints"
- classname="org.eclipse.sapphire.releng.ant.SetBundleVersionConstraintsTask"/>
-
- <taskdef name="set-export-package-version"
- classname="org.eclipse.sapphire.releng.ant.SetExportPackageVersionTask"/>
-
- <taskdef name="export-documentation"
- classname="org.eclipse.sapphire.releng.ant.ExportDocumentationTask"/>
-
-</antlib>
diff --git a/releng.new/releng/ignore-checksum-issues.txt b/releng.new/releng/ignore-checksum-issues.txt
deleted file mode 100644
index e69de29..0000000
--- a/releng.new/releng/ignore-checksum-issues.txt
+++ /dev/null
diff --git a/releng.new/releng/installables.properties b/releng.new/releng/installables.properties
deleted file mode 100644
index 8ccb0b8..0000000
--- a/releng.new/releng/installables.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-# Components
-
-iu.platform.source = org.eclipse.platform.source.feature.group
-
-iu.jdt = org.eclipse.jdt.feature.group
-iu.jdt.source = org.eclipse.jdt.source.feature.group
-
-iu.pde = org.eclipse.pde.feature.group
-iu.pde.source = org.eclipse.pde.source.feature.group
-
-iu.emf = \
-org.eclipse.emf.feature.group,\
-org.eclipse.xsd.feature.group,\
-org.eclipse.xsd.mapping.feature.group
-
-iu.emf.sdk = \
-org.eclipse.emf.sdk.feature.group,\
-org.eclipse.xsd.sdk.feature.group
-
-iu.gef = org.eclipse.gef.feature.group
-iu.gef.sdk = org.eclipse.gef.sdk.feature.group
-
-iu.orbit = net.sourceforge.lpg.lpgjavaruntime,\
-org.apache.xerces,\
-javax.wsdl/1.5.1.v201012040544
-
-iu.packaged.jars = org.eclipse.datatools.common.doc.user,\
-org.eclipse.datatools.connectivity.doc.user.contexts,\
-org.eclipse.datatools.connectivity.doc.user,\
-org.eclipse.datatools.doc.user,\
-org.eclipse.datatools.intro,\
-org.eclipse.datatools.sqltools.doc.user.contexts,\
-org.eclipse.datatools.sqltools.doc.user
-
-
-# Compositions
-
-iu.dev.env = \
-${iu.jdt},\
-${iu.pde}
-
-iu.dev.target = \
-${iu.platform.source},\
-${iu.jdt},\
-${iu.jdt.source},\
-${iu.pde},\
-${iu.pde.source},\
-${iu.emf.sdk},\
-${iu.gef.sdk},\
-${iu.orbit},\
-${iu.packaged.jars}
-
-iu.build.target = \
-${iu.jdt},\
-${iu.pde},\
-${iu.emf},\
-${iu.gef},\
-${iu.orbit},\
-${iu.packaged.jars}
\ No newline at end of file
diff --git a/releng.new/releng/repositories-neon.properties b/releng.new/releng/repositories-neon.properties
deleted file mode 100644
index 9270daf..0000000
--- a/releng.new/releng/repositories-neon.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-eclipse.platform.build = /eclipse/downloads/drops4/S-4.6M5-201601282000/eclipse-platform-4.6M5
-
-p2.repositories = \
-/eclipse/downloads/drops4/S-4.6M5-201601282000/org.eclipse.platform.source-4.6M5.zip,\
-/eclipse/downloads/drops4/S-4.6M5-201601282000/org.eclipse.jdt.source-4.6M5.zip,\
-/eclipse/downloads/drops4/S-4.6M5-201601282000/org.eclipse.pde.source-4.6M5.zip,\
-/eclipse/downloads/drops4/S-4.6M5-201601282000/eclipse-test-framework-4.6M5.zip,\
-/modeling/emf/emf/downloads/drops/2.12.0/S201509280952/emf-xsd-Update-2.12.0M2.zip,\
-/tools/gef/downloads/drops/3.11.0/S201509280204/GEF-Update-3.11.0M2.zip,\
-/tools/orbit/downloads/drops/R20150821153341/orbit-buildrepo-R20150821153341.zip,\
-file:build/packaged_jars
diff --git a/releng.new/releng/site.xml b/releng.new/releng/site.xml
new file mode 100644
index 0000000..c8e0821
--- /dev/null
+++ b/releng.new/releng/site.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <feature url="features/org.eclipse.datatools.sdk.feature_##version##.jar" id="org.eclipse.datatools.sdk.feature" version="##version##">
+ <category name="org.eclipse.datatools"/>
+ </feature>
+ <feature url="features/org.eclipse.datatools.enablement.sdk.feature_##version.jar" id="org.eclipse.datatools.enablement.sdk.feature" version="##version##">
+ <category name="org.eclipse.datatools"/>
+ </feature>
+ <category-def name="org.eclipse.datatools" label="Eclipse Data Tools">
+ <description>
+ Tools for working with databases in Eclipse.
+ </description>
+ </category-def>
+</site>
diff --git a/releng.new/releng/tools/.classpath b/releng.new/releng/tools/.classpath
deleted file mode 100644
index b390f88..0000000
--- a/releng.new/releng/tools/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
- <classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/releng.new/releng/tools/.gitignore b/releng.new/releng/tools/.gitignore
deleted file mode 100644
index 9eb3ec6..0000000
--- a/releng.new/releng/tools/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin
-/sapphire-releng-tools.jar
diff --git a/releng.new/releng/tools/.project b/releng.new/releng/tools/.project
deleted file mode 100644
index 9158c6b..0000000
--- a/releng.new/releng/tools/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>sapphire-releng-tools</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/releng.new/releng/tools/.settings/org.eclipse.jdt.core.prefs b/releng.new/releng/tools/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index ace45ce..0000000
--- a/releng.new/releng/tools/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
diff --git a/releng.new/releng/tools/build.xml b/releng.new/releng/tools/build.xml
deleted file mode 100644
index e6597ce..0000000
--- a/releng.new/releng/tools/build.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<!--
- ******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************
--->
-
-<project name="sapphire-releng-tools-build">
-
- <dirname property="basedir.sapphire-releng-tools-build" file="${ant.file.sapphire-releng-tools-build}"/>
- <property name="sapphire.releng.tools.jar" value="${basedir.sapphire-releng-tools-build}/sapphire-releng-tools.jar"/>
-
- <taskdef resource="net/sf/antcontrib/antlib.xml">
- <classpath>
- <pathelement location="${basedir.sapphire-releng-tools-build}/../ant-contrib/ant-contrib-1.0b3.jar"/>
- </classpath>
- </taskdef>
-
- <target name="build-sapphire-releng-tools" unless="build.sapphire.releng.tools.completed">
-
- <property name=".src.dir" value="${basedir.sapphire-releng-tools-build}/src"/>
- <property name=".classes.dir" value="${basedir.sapphire-releng-tools-build}/bin"/>
-
- <if>
- <uptodate targetfile="${sapphire.releng.tools.jar}">
- <srcfiles dir="${.src.dir}" includes="**/*"/>
- </uptodate>
- <then>
- <echo message="Found an up-to-date version of Sapphire releng tools. Skipping build..."/>
- </then>
- <else>
- <echo message="Building Sapphire releng tools..."/>
- <delete dir="${.classes.dir}" quiet="true"/>
- <mkdir dir="${.classes.dir}"/>
- <javac debug="true" destdir="${.classes.dir}" classpath="${ant.home}/lib/ant.jar" includeAntRuntime="false" source="1.8" target="1.8">
- <src path="${.src.dir}"/>
- </javac>
- <jar destfile="${sapphire.releng.tools.jar}">
- <fileset dir="${.classes.dir}"/>
- <fileset dir="${.src.dir}" excludes="**/*.java"/>
- </jar>
- </else>
- </if>
-
- <taskdef resource="org/eclipse/sapphire/releng/antlib.xml">
- <classpath>
- <pathelement location="${basedir.sapphire-releng-tools-build}/sapphire-releng-tools.jar"/>
- </classpath>
- </taskdef>
-
- <var name=".src.dir" unset="true"/>
- <var name=".classes.dir" unset="true"/>
-
- <property name="build.sapphire.releng.tools.completed" value="true"/>
-
- </target>
-
- <target name="clean-sapphire-releng-tools">
- <delete file="${sapphire.releng.tools.jar}" quiet="true"/>
- <var name="build.sapphire.releng.tools.completed" unset="true"/>
- </target>
-
- <target name="gen-folder-listing" depends="build-sapphire-releng-tools">
- <fail unless="folder" message="Property "folder" must be specified."/>
- <gen-folder-listing folder="${folder}">
- <excludes><path><pathelement path="${excludes}"/></path></excludes>
- </gen-folder-listing>
- </target>
-
- <target name="gen-repository-landing" depends="build-sapphire-releng-tools">
- <fail unless="repository" message="Property "repository" must be specified."/>
- <fail unless="name" message="Property "name" must be specified."/>
- <gen-repository-landing repository="${repository}" name="${name}">
- <excludes><path><pathelement path="${excludes}"/></path></excludes>
- </gen-repository-landing>
- </target>
-
-</project>
diff --git a/releng.new/releng/tools/sapphire-releng-tools.xml b/releng.new/releng/tools/sapphire-releng-tools.xml
deleted file mode 100644
index 4fdb5b4..0000000
--- a/releng.new/releng/tools/sapphire-releng-tools.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<!--
- ******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************
--->
-
-<project name="sapphire-releng-tools">
-
- <dirname property="basedir.sapphire-releng-tools" file="${ant.file.sapphire-releng-tools}"/>
-
- <taskdef resource="org/eclipse/sapphire/releng/antlib.xml">
- <classpath>
- <pathelement location="${basedir.sapphire-releng-tools}/sapphire-releng-tools.jar"/>
- </classpath>
- </taskdef>
-
- <target name="gen-folder-listing">
- <fail unless="folder" message="Property "folder" must be specified."/>
- <gen-folder-listing folder="${folder}">
- <excludes><path><pathelement path="${excludes}"/></path></excludes>
- </gen-folder-listing>
- </target>
-
- <target name="gen-repository-landing">
- <fail unless="repository" message="Property "repository" must be specified."/>
- <fail unless="name" message="Property "name" must be specified."/>
- <gen-repository-landing repository="${repository}" name="${name}">
- <excludes><path><pathelement path="${excludes}"/></path></excludes>
- </gen-repository-landing>
- </target>
-
-</project>
diff --git a/releng.new/releng/tools/src/license.html b/releng.new/releng/tools/src/license.html
deleted file mode 100644
index 3998fce..0000000
--- a/releng.new/releng/tools/src/license.html
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Public License - Version 1.0</title>
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style>
-
-</head>
-
-<body lang="EN-US">
-
-<h2>Eclipse Public License - v 1.0</h2>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body>
-
-</html>
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/AntTaskOperationContext.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/AntTaskOperationContext.java
deleted file mode 100644
index f05c4ec..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/AntTaskOperationContext.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng;
-
-import org.apache.tools.ant.Task;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class AntTaskOperationContext extends OperationContext
-{
- private final Task task;
-
- public AntTaskOperationContext( final Task task )
- {
- if( task == null )
- {
- throw new IllegalArgumentException();
- }
-
- this.task = task;
- }
-
- @Override
- public void log( final String message )
- {
- this.task.log( message );
- }
-
-}
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/ClassResourceLoader.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/ClassResourceLoader.java
deleted file mode 100644
index 65911ca..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/ClassResourceLoader.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class ClassResourceLoader
-{
- private Class<?> context;
-
- public ClassResourceLoader( final Class<?> context )
- {
- if( context == null )
- {
- throw new IllegalArgumentException();
- }
-
- this.context = context;
- }
-
- public Resource resource( final String name )
- {
- if( name == null )
- {
- throw new IllegalArgumentException();
- }
-
- return new Resource( this.context.getResource( name ), name );
- }
-
-}
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/DelegatingOperationContext.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/DelegatingOperationContext.java
deleted file mode 100644
index 3cda999..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/DelegatingOperationContext.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng;
-
-import java.io.File;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public class DelegatingOperationContext extends OperationContext
-{
- private final OperationContext delegate;
-
- public DelegatingOperationContext( final OperationContext delegate )
- {
- this.delegate = delegate;
- }
-
- public void log( final String message )
- {
- this.delegate.log( message );
- }
-
- public File file( final File file )
- {
- return this.delegate.file( file );
- }
-
-}
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/FileSystemExcludes.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/FileSystemExcludes.java
deleted file mode 100644
index 8860fae..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/FileSystemExcludes.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.tools.ant.types.Resource;
-import org.apache.tools.ant.types.ResourceCollection;
-import org.apache.tools.ant.types.resources.FileResource;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class FileSystemExcludes
-{
- private final List<ResourceCollection> rcs = new ArrayList<ResourceCollection>();
-
- public void add( final ResourceCollection rc )
- {
- this.rcs.add( rc );
- }
-
- public List<File> list()
- {
- final List<File> list = new ArrayList<File>();
-
- for( final ResourceCollection rc : this.rcs )
- {
- for( final Iterator<Resource> itr = rc.iterator(); itr.hasNext(); )
- {
- final Resource resource = itr.next();
-
- if( resource instanceof FileResource )
- {
- list.add( ( (FileResource) resource ).getFile() );
- }
- }
- }
-
- return list;
- }
-
-}
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/FileUtil.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/FileUtil.java
deleted file mode 100644
index 7384710..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/FileUtil.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class FileUtil
-{
- public static void write( final File file, final InputStream content ) throws IOException
- {
- byte[] buffer = new byte[ 16 * 1024 ];
- int bufferUsedLength = 0;
- int bytesRead = 0;
-
- while( ( bytesRead = content.read( buffer, bufferUsedLength, buffer.length - bufferUsedLength ) ) != -1 )
- {
- bufferUsedLength += bytesRead;
-
- if( buffer.length - bufferUsedLength < 1024 )
- {
- byte[] newBuffer = new byte[ buffer.length * 2 ];
- System.arraycopy( buffer, 0, newBuffer, 0, bufferUsedLength );
- buffer = newBuffer;
- }
- }
-
- byte[] array = new byte[ bufferUsedLength ];
- System.arraycopy( buffer, 0, array, 0, bufferUsedLength );
-
- write( file, array );
- }
-
- public static void write( final File file, final String content ) throws IOException
- {
- write( file, content.getBytes( "UTF-8" ) );
- }
-
- public static void write( final File file, final byte[] content ) throws IOException
- {
- boolean write = true;
-
- if( file.exists() )
- {
- final int length = content.length;
-
- if( file.length() == length )
- {
- try( InputStream in = new FileInputStream( file ) )
- {
- byte[] buffer = new byte[ 4 * 1024 ];
- int count = 0;
- int position = 0;
- write = false;
-
- while( ! write && ( count = in.read( buffer ) ) != -1 )
- {
- for( int i = 0; ! write && i < count; i++, position++ )
- {
- if( buffer[ i ] != content[ position ] )
- {
- write = true;
- }
- }
- }
- }
- }
- }
-
- if( write )
- {
- try( OutputStream out = new FileOutputStream( file ) )
- {
- out.write( content );
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/Operation.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/Operation.java
deleted file mode 100644
index c893cb8..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/Operation.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public abstract class Operation
-{
- public final void execute()
- {
- execute( new OperationContext() );
- }
-
- public abstract void execute( OperationContext context );
-
-}
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/OperationContext.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/OperationContext.java
deleted file mode 100644
index 114cd9d..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/OperationContext.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng;
-
-import java.io.File;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public class OperationContext
-{
- public void log( final String message )
- {
- System.err.println( message );
- }
-
- public File file( final File file )
- {
- return file;
- }
-
-}
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/Resource.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/Resource.java
deleted file mode 100644
index fd7ba3e..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/Resource.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.URL;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class Resource
-{
- private final URL url;
- private final String name;
-
- public Resource( final URL url, final String name )
- {
- if( url == null )
- {
- throw new IllegalArgumentException();
- }
-
- if( name == null )
- {
- throw new IllegalArgumentException();
- }
-
- this.url = url;
- this.name = name;
- }
-
- public String text()
- {
- try( Reader reader = new InputStreamReader( this.url.openStream(), "UTF-8" ) )
- {
- final StringBuilder content = new StringBuilder();
-
- char[] buffer = new char[ 1024 ];
- int count = 0;
-
- while( ( count = reader.read( buffer ) ) != -1 )
- {
- content.append( buffer, 0, count );
- }
-
- return content.toString();
- }
- catch( final Exception e )
- {
- throw new RuntimeException( e );
- }
- }
-
- public void copy( final File folder )
- {
- if( folder == null || ! folder.isDirectory() )
- {
- throw new IllegalArgumentException();
- }
-
- try( InputStream in = this.url.openStream() )
- {
- FileUtil.write( new File( folder, this.name ), in );
- }
- catch( final IOException e )
- {
- throw new RuntimeException( e );
- }
- }
-
-}
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/antlib.xml b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/antlib.xml
deleted file mode 100644
index d76b135..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/antlib.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- ******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************
--->
-
-<antlib>
-
- <taskdef name="gen-repository-landing"
- classname="org.eclipse.sapphire.releng.landing.GenRepositoryLandingTask"/>
-
- <taskdef name="gen-folder-listing"
- classname="org.eclipse.sapphire.releng.listing.GenFolderListingTask"/>
-
-</antlib>
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/GenRepositoryLandingOp.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/GenRepositoryLandingOp.java
deleted file mode 100644
index 4933aa4..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/GenRepositoryLandingOp.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.landing;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.sapphire.releng.ClassResourceLoader;
-import org.eclipse.sapphire.releng.DelegatingOperationContext;
-import org.eclipse.sapphire.releng.FileUtil;
-import org.eclipse.sapphire.releng.Operation;
-import org.eclipse.sapphire.releng.OperationContext;
-import org.eclipse.sapphire.releng.listing.GenFolderListingOp;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class GenRepositoryLandingOp extends Operation
-{
- private static final String NL = System.getProperty( "line.separator" );
-
- private static final ClassResourceLoader RESOURCE_LOADER = new ClassResourceLoader( GenRepositoryLandingOp.class );
- private static final String LANDING_PAGE_TEMPLATE = RESOURCE_LOADER.resource( "LandingPageTemplate.txt" ).text();
-
- private File repository;
- private String name = "Repository";
- private final Set<File> excludes = new HashSet<File>();
-
- public File getRepository()
- {
- return this.repository;
- }
-
- public void setRepository( final File repository )
- {
- this.repository = repository;
- }
-
- public String getName()
- {
- return this.name;
- }
-
- public void setName( final String name )
- {
- this.name = ( name == null ? "Repository" : name );
- }
-
- public final Set<File> getExcludes()
- {
- return this.excludes;
- }
-
- @Override
- public void execute( final OperationContext context )
- {
- final File listingPage = context.file( new File( this.repository, "content.html" ) );
-
- if( listingPage.exists() && ! listingPage.delete() )
- {
- throw new RuntimeException();
- }
-
- final File imagesFolder = context.file( new File( this.repository, "images" ) );
-
- if( ! imagesFolder.exists() && ! imagesFolder.mkdirs() )
- {
- throw new RuntimeException();
- }
-
- final GenFolderListingOp genFolderListingOp = new GenFolderListingOp();
- genFolderListingOp.setFolder( this.repository );
- genFolderListingOp.getExcludes().addAll( this.excludes );
- genFolderListingOp.getExcludes().add( imagesFolder );
-
- genFolderListingOp.execute
- (
- new DelegatingOperationContext( context )
- {
- @Override
- public File file( final File file )
- {
- if( file.getParentFile().equals( GenRepositoryLandingOp.this.repository ) && file.getName().equals( "index.html" ) )
- {
- return listingPage;
- }
-
- return super.file( file );
- }
- }
- );
-
- context.log( "Generating repository landing page for " + this.repository.getPath() );
-
- RESOURCE_LOADER.resource( "InstallDialog.png" ).copy( imagesFolder );
-
- final String text = LANDING_PAGE_TEMPLATE
- .replace( "${repository-name}", this.name )
- .replace( "\n", NL );
-
- try
- {
- FileUtil.write( context.file( new File( this.repository, "index.html" ) ), text );
- }
- catch( final IOException e )
- {
- throw new RuntimeException( e );
- }
- }
-
- public static void main( final String[] args )
- {
- if( args.length != 1 && args.length != 2 )
- {
- System.err.println( "USAGE: java -cp sapphire-releng-tools.jar org.eclipse.sapphire.releng.landing.GenRepositoryLandingOp [repository] [name]" );
- System.exit( 1 );
- }
-
- final File target = new File( args[ 0 ] );
-
- if( ! target.isDirectory() )
- {
- System.err.println( "The specified path is not a folder or is not accessible." );
- System.exit( 2 );
- }
-
- final GenRepositoryLandingOp op = new GenRepositoryLandingOp();
- op.setRepository( new File( args[ 0 ] ) );
-
- if( args.length == 2 )
- {
- op.setName( args[ 1 ] );
- }
-
- final String excludes = System.getProperty( "excludes" );
-
- if( excludes != null )
- {
- for( final String exclude : excludes.split( ";" ) )
- {
- op.getExcludes().add( new File( exclude ) );
- }
- }
-
- op.execute();
- }
-
-}
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/GenRepositoryLandingTask.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/GenRepositoryLandingTask.java
deleted file mode 100644
index 9bea579..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/GenRepositoryLandingTask.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.landing;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.sapphire.releng.AntTaskOperationContext;
-import org.eclipse.sapphire.releng.FileSystemExcludes;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class GenRepositoryLandingTask extends Task
-{
- private File repository;
- private String name;
- private final FileSystemExcludes excludes = new FileSystemExcludes();
-
- public void setRepository( final File repository )
- {
- this.repository = repository;
- }
-
- public void setName( final String name )
- {
- this.name = name;
- }
-
- public FileSystemExcludes createExcludes()
- {
- return this.excludes;
- }
-
- @Override
- public void execute() throws BuildException
- {
- if( this.repository == null )
- {
- throw new BuildException( "The \"repository\" attribute must be specified." );
- }
-
- final GenRepositoryLandingOp op = new GenRepositoryLandingOp();
- op.setRepository( this.repository );
- op.setName( this.name );
- op.getExcludes().addAll( this.excludes.list() );
- op.execute( new AntTaskOperationContext( this ) );
- }
-
-}
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/InstallDialog.png b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/InstallDialog.png
deleted file mode 100644
index 011ee4e..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/InstallDialog.png
+++ /dev/null
Binary files differ
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/LandingPageTemplate.txt b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/LandingPageTemplate.txt
deleted file mode 100644
index a4e4dc6..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/landing/LandingPageTemplate.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-<html>
-
- <head>
- <title>${repository-name}</title>
- <style>
- body
- {
- font-family: Tahoma,Arial,sans-serif;
- font-size: 0.9em;
- color: black;
- background-color: white;
- padding-bottom: 30px;
- }
- li
- {
- padding-top: 10px;
- padding-bottom: 10px;
- }
- </style>
- </head>
-
- <body>
-
- <h1>${repository-name}</h1>
-
- <p>This location contains a repository of Eclipse plugins. Follow these installation instructions or <a href="content.html">browse</a> the repository content.</p>
-
- <ol>
- <li>Open Eclipse and select the <b>Install New Software</b> menu item under the <b>Help</b> menu.</li>
- <li>Copy and paste this URL into the <b>Work with</b> text box, then press <b>ENTER</b>.<br/><br/><img src="images/InstallDialog.png"/></li>
- <li>Once the repository is loaded, the available features should show up in the table.</li>
- <li>Select the desired features and follow the wizard to install them.</li>
- </ol>
-
- <h2>Troubleshooting</h2>
-
- <ol>
- <li>
- If unable to connect dialog is displayed and you access Internet through a proxy, ensure that Eclipse is properly
- configured to use this proxy.<br/><br/>
- <ol type="A">
- <li>Select the <b>Preferences</b> menu item under the <b>Window</b> menu.</li>
- <li>Expand the <b>General</b> node in the preferences tree and select <b>Network Connections</b>.</li>
- </ol>
- </li>
- <li>If after the repository is loaded, the features table displays <b>There are no categorized items</b> message, uncheck
- the <b>Group items by category</b> check box.</li>
- </li>
- </ol>
-
- </body>
-
-</html>
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/GenFolderListingOp.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/GenFolderListingOp.java
deleted file mode 100644
index 4f3f6f2..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/GenFolderListingOp.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.listing;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.sapphire.releng.ClassResourceLoader;
-import org.eclipse.sapphire.releng.FileUtil;
-import org.eclipse.sapphire.releng.Operation;
-import org.eclipse.sapphire.releng.OperationContext;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class GenFolderListingOp extends Operation
-{
- private static final long KB = 1024;
- private static final long MB = KB * 1024;
- private static final long GB = MB * 1024;
-
- private static final String NL = System.getProperty( "line.separator" );
-
- private static final ClassResourceLoader RESOURCE_LOADER = new ClassResourceLoader( GenFolderListingOp.class );
- private static final String LISTING_PAGE_TEMPLATE = RESOURCE_LOADER.resource( "ListingPageTemplate.txt" ).text();
- private static final String LISTING_ENTRY_TEMPLATE = RESOURCE_LOADER.resource( "ListingEntryTemplate.txt" ).text();
- private static final String LISTING_ENTRY_WITHOUT_SPARKLINE_TEMPLATE = RESOURCE_LOADER.resource( "ListingEntryWithoutSparklineTemplate.txt" ).text();
- private static final String SUMMARY_ENTRY_TEMPLATE = RESOURCE_LOADER.resource( "SummaryEntryTemplate.txt" ).text();
-
- private File folder;
- private final Set<File> excludes = new HashSet<File>();
-
- public File getFolder()
- {
- return this.folder;
- }
-
- public void setFolder( final File folder )
- {
- this.folder = folder;
- }
-
- public final Set<File> getExcludes()
- {
- return this.excludes;
- }
-
- @Override
- public void execute( final OperationContext context )
- {
- generate( context, this.folder );
- }
-
- private Entry generate( final OperationContext context, final File target )
- {
- context.log( "Generating listing for " + target.getPath() );
-
- final List<Entry> entries = new ArrayList<Entry>();
-
- Date overallDateModified = new Date( 0 );
- long maxSize = 0;
- long totalSize = 0;
- int folderCount = 0;
- int fileCount = 0;
-
- for( final File f : target.listFiles() )
- {
- final boolean isFile = f.isFile();
- final boolean isDirectory = f.isDirectory();
- final String name = f.getName();
-
- if( ( isFile || isDirectory ) && ! name.equals( "index.html" ) && ! this.excludes.contains( f ) )
- {
- final Entry entry;
-
- if( isFile )
- {
- entry = new Entry( name, new Date( f.lastModified() ), f.length() );
- fileCount++;
- }
- else
- {
- entry = generate( context, f );
- folderCount++;
- }
-
- entries.add( entry );
-
- final Date dateModified = entry.getDateModified();
-
- if( dateModified.compareTo( overallDateModified ) > 0 )
- {
- overallDateModified = dateModified;
- }
-
- final long size = entry.getSize();
-
- if( size > maxSize )
- {
- maxSize = size;
- }
-
- totalSize += size;
- }
- }
-
- Collections.sort
- (
- entries,
- new Comparator<Entry>()
- {
- @Override
- public int compare( final Entry x, Entry y )
- {
- int result = ( x.isFolder() ? 0 : 1 ) - ( y.isFolder() ? 0 : 1 );
-
- if( result == 0 )
- {
- result = x.getName().compareTo( y.getName() );
- }
-
- return result;
- }
- }
- );
-
- final int count = fileCount + folderCount;
- final long segmentSize = maxSize / 200;
- final StringBuilder listing = new StringBuilder();
-
- for( final Entry entry : entries )
- {
- String block = ( count > 1 ? LISTING_ENTRY_TEMPLATE : LISTING_ENTRY_WITHOUT_SPARKLINE_TEMPLATE )
- .replace( "${name}", entry.getName() )
- .replace( "${href}", entry.getName() + ( entry.isFolder() ? "/index.html" : "" ) )
- .replace( "${type}", entry.isFolder() ? "folder" : "file" )
- .replace( "${size}", toSizeForDisplay( entry.getSize() ) );
-
- if( count > 1 )
- {
- int segments = (int) Math.round( (double) entry.getSize() / segmentSize );
- segments = segments == 0 ? 1 : segments;
-
- block = block.replace( "${segments}", String.valueOf( segments ) );
- }
-
- append( listing, block, "\n" );
- }
-
- final StringBuilder summary = new StringBuilder();
-
- if( folderCount > 0 )
- {
- appendSummaryLine( summary, "Folders", String.valueOf( folderCount ) );
- }
-
- if( fileCount > 0 )
- {
- appendSummaryLine( summary, "Files", String.valueOf( fileCount ) );
- }
-
- appendSummaryLine( summary, "Size", toSizeForDisplay( totalSize ) );
- appendSummaryLine( summary, "Date Modified", new SimpleDateFormat( "yyyy-MM-dd" ).format( overallDateModified ) );
-
- final String text = LISTING_PAGE_TEMPLATE
- .replace( "${listing}", listing.toString() )
- .replace( "${summary}", summary.toString() )
- .replace( "\n", NL );
-
- try
- {
- FileUtil.write( context.file( new File( target, "index.html" ) ), text );
- }
- catch( final IOException e )
- {
- throw new RuntimeException( e );
- }
-
- return new Entry( target.getName(), overallDateModified, totalSize, true );
- }
-
- private static String toSizeForDisplay( final long size )
- {
- final String text;
-
- if( size < KB )
- {
- text = String.valueOf( size ) + " b";
- }
- else if( size < MB )
- {
- text = String.valueOf( Math.round( (double) size / KB ) ) + " kb";
- }
- else if( size < GB )
- {
- text = String.valueOf( Math.round( (double) size / MB ) ) + " mb";
- }
- else
- {
- text = String.valueOf( Math.round( (double) size / GB ) ) + " gb";
- }
-
- return text;
- }
-
- private static void appendSummaryLine( final StringBuilder summary, final String key, final String value )
- {
- final String block = SUMMARY_ENTRY_TEMPLATE
- .replace( "${key}", key )
- .replace( "${value}", value );
-
- append( summary, block, "\n" );
- }
-
- private static void append( final StringBuilder string, final String segment, final String separator )
- {
- if( string.length() > 0 )
- {
- string.append( separator );
- }
-
- string.append( segment );
- }
-
- private static final class Entry
- {
- private final String name;
- private final long size;
- private final boolean folder;
- private final Date dateModified;
-
- public Entry( String name, final Date dateModified, final long size )
- {
- this( name, dateModified, size, false );
- }
-
- public Entry( String name, final Date dateModified, final long size, final boolean folder )
- {
- if( name == null )
- {
- throw new IllegalArgumentException();
- }
-
- if( dateModified == null )
- {
- throw new IllegalArgumentException();
- }
-
- this.name = name;
- this.dateModified = dateModified;
- this.size = size;
- this.folder = folder;
- }
-
- public String getName()
- {
- return this.name;
- }
-
- public Date getDateModified()
- {
- return this.dateModified;
- }
-
- public long getSize()
- {
- return this.size;
- }
-
- public boolean isFolder()
- {
- return this.folder;
- }
- }
-
- public static void main( final String[] args )
- {
- if( args.length != 1 )
- {
- System.err.println( "USAGE: java -cp sapphire-releng-tools.jar org.eclipse.sapphire.releng.listing.GenFolderListingOp [folder]" );
- System.exit( 1 );
- }
-
- final File target = new File( args[ 0 ] );
-
- if( ! target.isDirectory() )
- {
- System.err.println( "The specified path is not a folder or is not accessible." );
- System.exit( 2 );
- }
-
- final GenFolderListingOp op = new GenFolderListingOp();
-
- op.setFolder( new File( args[ 0 ] ) );
-
- final String excludes = System.getProperty( "excludes" );
-
- if( excludes != null )
- {
- for( final String exclude : excludes.split( ";" ) )
- {
- op.getExcludes().add( new File( exclude ) );
- }
- }
-
- op.execute();
- }
-
-}
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/GenFolderListingTask.java b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/GenFolderListingTask.java
deleted file mode 100644
index 5587196..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/GenFolderListingTask.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2015 Oracle
- * 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:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.sapphire.releng.listing;
-
-import java.io.File;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.sapphire.releng.AntTaskOperationContext;
-import org.eclipse.sapphire.releng.FileSystemExcludes;
-
-/**
- * @author <a href="konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public final class GenFolderListingTask extends Task
-{
- private File folder;
- private final FileSystemExcludes excludes = new FileSystemExcludes();
-
- public void setFolder( final File folder )
- {
- this.folder = folder;
- }
-
- public FileSystemExcludes createExcludes()
- {
- return this.excludes;
- }
-
- @Override
- public void execute() throws BuildException
- {
- if( this.folder == null )
- {
- throw new BuildException( "The \"folder\" attribute must be specified." );
- }
-
- final GenFolderListingOp op = new GenFolderListingOp();
- op.setFolder( this.folder );
- op.getExcludes().addAll( this.excludes.list() );
- op.execute( new AntTaskOperationContext( this ) );
- }
-
-}
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/ListingEntryTemplate.txt b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/ListingEntryTemplate.txt
deleted file mode 100644
index fbeae79..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/ListingEntryTemplate.txt
+++ /dev/null
@@ -1,5 +0,0 @@
- <tr>
- <td class="name-${type}"><a href="${href}">${name}</a></td>
- <td class="size">${size}</td>
- <td><div class="sparkline" style="width: ${segments}px;"/></td>
- </tr>
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/ListingEntryWithoutSparklineTemplate.txt b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/ListingEntryWithoutSparklineTemplate.txt
deleted file mode 100644
index 04d8c32..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/ListingEntryWithoutSparklineTemplate.txt
+++ /dev/null
@@ -1,4 +0,0 @@
- <tr>
- <td class="name-${type}"><a href="${href}">${name}</a></td>
- <td class="size">${size}</td>
- </tr>
\ No newline at end of file
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/ListingPageTemplate.txt b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/ListingPageTemplate.txt
deleted file mode 100644
index 99cd193..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/ListingPageTemplate.txt
+++ /dev/null
@@ -1,121 +0,0 @@
-<html>
-
- <head>
- <title>Folder Content</title>
- <style>
- body
- {
- font-family: Tahoma,Arial,sans-serif;
- color: black;
- background-color: white;
- }
- td
- {
- font-family: Consolas,"courier new";
- font-size: 0.9em;
- vertical-align: middle;
- white-space: nowrap;
- }
- table
- {
- border-spacing: 0;
- border-collapse: collapse;
- }
- table.listing tr:hover
- {
- background: #eeeeee;
- }
- table.listing td
- {
- padding: 5px;
- }
- table.listing td.name-file
- {
- padding-left: 10px;
- padding-right: 30px;
- min-width: 600px;
- }
- table.listing td.name-folder
- {
- padding-left: 10px;
- padding-right: 30px;
- min-width: 600px;
- font-weight: bold
- }
- table.listing td.size
- {
- text-align: right;
- }
- table.listing td:last-child
- {
- padding-right: 10px;
- }
- div.sparkline
- {
- height: 10px;
- background-color: #aaaaaa;
- margin-bottom: 1px;
- }
- table.summary td
- {
- padding: 2px;
- }
- table.summary td.key
- {
- padding-left: 10px;
- padding-right: 30px;
- }
- table.summary td.value
- {
- text-align: right;
- }
- a
- {
- color: black;
- }
- a:link
- {
- text-decoration: none;
- }
- a:visited
- {
- text-decoration: none;
- }
- a:hover
- {
- text-decoration: none;
- color: blue;
- }
- a:active
- {
- text-decoration: none;
- color: blue;
- }
- </style>
- </head>
-
- <body>
-
- <table>
- <tr>
- <td>
- <table class="listing">
-${listing}
- </table>
- <br/><br/>
- </td>
- </tr>
- <tr>
- <td>
- <table class="summary">
-${summary}
- </table>
- </td>
- </tr>
- </table>
-
- <br/><br/>
-
- </body>
-
-</html>
diff --git a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/SummaryEntryTemplate.txt b/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/SummaryEntryTemplate.txt
deleted file mode 100644
index cccdc78..0000000
--- a/releng.new/releng/tools/src/org/eclipse/sapphire/releng/listing/SummaryEntryTemplate.txt
+++ /dev/null
@@ -1 +0,0 @@
- <tr><td class="key">${key}:</td><td class="value">${value}</td></tr>
\ No newline at end of file