Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cje-production/scripts/updateGenericComposites.xml107
1 files changed, 107 insertions, 0 deletions
diff --git a/cje-production/scripts/updateGenericComposites.xml b/cje-production/scripts/updateGenericComposites.xml
new file mode 100644
index 000000000..310df7c1f
--- /dev/null
+++ b/cje-production/scripts/updateGenericComposites.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2020 IBM Corporation and others.
+
+ This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ David Williams - initial API and implementation
+-->
+
+<project
+ default="updateGenericComposites"
+ basedir=".">
+
+ <!--
+ updateGenericComposites is a utilty to use once a year or so,
+ when ever a new release is started.
+ It must be ran from "antRunner appliction"
+
+ -->
+ <target name="updateGenericComposites">
+
+ <fail
+ unless="currentStream"
+ message="currentStream (such as '4.16') must be defined for this script" />
+ <fail
+ unless="previousStream"
+ message="maintenanceStream (such as '4.15') must be defined for this script" />
+
+ <!-- Note: we do not put stream number in 'name', since once a 'name' is defined
+ in Eclipse's UI, it does not change. -->
+ <updatecomposite
+ repotocreate="${workspace}/I-builds"
+ repotopointto="https://download.eclipse.org/eclipse/updates/${currentStream}-I-builds/"
+ reponame="Eclipse Project current integration builds repository" />
+ <updatecomposite
+ repotocreate="${workspace}/milestones"
+ repotopointto="https://download.eclipse.org/eclipse/updates/${currentStream}milestones/"
+ reponame="Eclipse Project current milestone builds repository" />
+ <updatecomposite
+ repotocreate="${workspace}/Y-builds"
+ repotopointto="https://download.eclipse.org/eclipse/updates/${currentStream}-Y-builds/"
+ reponame="Eclipse Project current Beta Java builds repository" />
+ <updatecomposite
+ repotocreate="${workspace}/latest"
+ repotopointto="https://download.eclipse.org/eclipse/updates/${previousStream}/"
+ reponame="Eclipse Project current Beta Java builds repository" />
+
+ </target>
+
+ <!--
+ macro to create a "generic" composite site, that simply points to
+ annohter repository.
+
+ repoToCreate must be an absolute file path directory,
+ that is writeable.
+
+ repoToPointTo can be any repo, but must be in "full form", such as
+ https://download.eclipse.org/eclipse/updates/${currentStream}milestones/
+
+ -->
+ <macrodef name="updatecomposite">
+ <attribute name="repoToCreate" />
+ <attribute name="repoToPointTo" />
+ <attribute name="reponame" />
+ <sequential>
+ <!-- delete it, if already exists -->
+ <delete
+ dir="@{repoToCreate}"
+ failonerror="false" />
+ <!-- create it -->
+ <mkdir dir="@{repoToCreate}" />
+ <!-- now add the one child -->
+ <echo message="(re)creating repostory: @{repoToCreate}" />
+ <echo message="adding child repository: @{repoToPointTo}" />
+ <p2.composite.repository>
+ <repository location="file://@{repoToCreate}" name="@{reponame}"/>
+ <add location="@{repoToPointTo}" />
+ </p2.composite.repository>
+
+ <local name="p2IndexFilename" />
+ <property
+ name="p2IndexFilename"
+ value="@{repoToCreate}/p2.index" />
+ <echo message="creating p2.index file" />
+ <echo
+ file="${p2IndexFilename}"
+ message="version=1${line.separator}" />
+ <echo
+ file="${p2IndexFilename}"
+ append="true"
+ message="metadata.repository.factory.order=compositeContent.xml,!${line.separator}" />
+ <echo
+ file="${p2IndexFilename}"
+ append="true"
+ message="artifact.repository.factory.order=compositeArtifacts.xml,!${line.separator}" />
+
+ </sequential>
+ </macrodef>
+
+</project>
+

Back to the top