| <?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.17') must be defined for this script" /> |
| <fail |
| unless="previousStream" |
| message="maintenanceStream (such as '4.17') 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}/P-builds" |
| repotopointto="https://download.eclipse.org/eclipse/updates/${currentStream}-P-builds/" |
| reponame="Eclipse Project current Beta Java patch builds repository" /> |
| <updatecomposite |
| repotocreate="${workspace}/latest" |
| repotopointto="https://download.eclipse.org/eclipse/updates/${previousStream}/" |
| reponame="Eclipse Project latest release 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> |
| |