Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/releng
diff options
context:
space:
mode:
authorGoulwen Le Fur2014-08-04 09:26:21 +0000
committerGoulwen Le Fur2014-08-04 09:26:21 +0000
commit56baa013dedb5262c010087cbf111801da1d1b5e (patch)
treed2cfc53065d349705b6ca721c2b33a4b418f4df3 /releng
parent31de8fa7dacc96dd7265335b498f87994807db7c (diff)
downloadorg.eclipse.eef-56baa013dedb5262c010087cbf111801da1d1b5e.tar.gz
org.eclipse.eef-56baa013dedb5262c010087cbf111801da1d1b5e.tar.xz
org.eclipse.eef-56baa013dedb5262c010087cbf111801da1d1b5e.zip
UPDATED: settings to uml update site for new build system
Diffstat (limited to 'releng')
-rw-r--r--releng/org.eclipse.emf.eef.uml.update/pom.xml87
-rw-r--r--releng/org.eclipse.emf.eef.uml.update/promoter.xml288
-rw-r--r--releng/org.eclipse.emf.eef.uml.update/publisher.properties8
-rw-r--r--releng/org.eclipse.emf.eef.update/p2.xsl35
-rw-r--r--releng/org.eclipse.emf.eef.update/promoter.xml288
5 files changed, 46 insertions, 660 deletions
diff --git a/releng/org.eclipse.emf.eef.uml.update/pom.xml b/releng/org.eclipse.emf.eef.uml.update/pom.xml
index d5b84488b..2fcc6f05d 100644
--- a/releng/org.eclipse.emf.eef.uml.update/pom.xml
+++ b/releng/org.eclipse.emf.eef.uml.update/pom.xml
@@ -27,57 +27,46 @@
<name>EEF UML Repository</name>
<!-- see http://issues.sonatype.org/browse/TYCHO-313 -->
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.4.0-SNAPSHOT</version>
<build>
- <plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-resources</id>
- <phase>validate</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${basedir}/target/repository</outputDirectory>
- <resources>
- <resource>
- <directory>.</directory>
- <includes>
- <include>index.html</include>
- <include>web/*</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare_promotion</id>
- <phase>verify</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <!-- create a properties file for promotion process -->
- <mkdir dir="${project.build.directory}/promotion"/>
- <echo file="${project.build.directory}/promotion/promote.properties"
- message="#EEF promotion process.${line.separator}build.alias=${BUILD_ALIAS}${line.separator}build.qualifier=${env.BUILD_TYPE}${buildQualifier}${line.separator}version=${unqualifiedVersion}"/>
- <!-- copy necessary scripts to archive location -->
- <copy file="promoter.xml" todir="${project.build.directory}/promotion"/>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
+ <resources>
+ <resource>
+ <directory>.</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>publisher.properties</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <createArtifactRepository>true</createArtifactRepository>
+ <finalName>${project.artifactId}-${unqualifiedVersion}.${buildQualifier}</finalName>
+ <compress>true</compress>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
</project>
diff --git a/releng/org.eclipse.emf.eef.uml.update/promoter.xml b/releng/org.eclipse.emf.eef.uml.update/promoter.xml
deleted file mode 100644
index 7d3e38318..000000000
--- a/releng/org.eclipse.emf.eef.uml.update/promoter.xml
+++ /dev/null
@@ -1,288 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2011 Obeo.
- 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:
- Obeo - initial API and implementation
-
- $Id: promoter.xml,v 1.36 2012/03/21 08:40:06 sbouchet Exp $
--->
-<project name="Promoter" default="main">
- <!--
- This promotion script helps to automatically promote the last sucessful build of tycho based build to correct location.
-
- Be sure to use at least ant 1.8.2 to launch this script.
-
- Ant 1.8.2 is located here : /shared/common/apache-ant-1.8.2/
- on build.eclipse.org, do a
- $> export ANT_HOME=/shared/common/apache-ant-1.8.2/
- -->
-
- <property name="downloads.project.root" value="modeling/emft/eef" />
- <property name="build.root" value="/shared/jobs/emf-eef-1.3/lastSuccessful/archive/releng/org.eclipse.emf.eef.uml.update/target/" />
- <property name="thirdPartyJarsDir" value="/shared/modeling/emf/eef/3rdPartyJars" />
- <property name="project.name" value="EEF" />
- <property name="final.updatesite.name" value="emf-eef-uml-Update" />
- <property name="build.root.updatesite.name" value="org.eclipse.emf.eef.uml.update.zip" />
- <property name="group.owner" value="modeling.emf.eef" />
-
- <!--# To permit automatic downloads of non-EPL compatible code, override this to property to "Y" -->
- <property name="thirdPartyDownloadLicenseAcceptance" value="Y" />
-
- <property name="downloads.root" value="/home/data/httpd/download.eclipse.org/" />
- <property name="downloads.area" value="${downloads.root}/${downloads.project.root}" />
- <property name="property.file.location" location="${build.root}/promotion/promote.properties" />
- <antversion property="antversion" />
-
- <!--
- most of the code comes from Athena CBI.
- see http://wiki.eclipse.org/Common_Build_Infrastructure
- -->
- <target name="check.ant-contrib" if="antContribJarUnavailable">
- <condition property="thirdPartyDownloadLicenseAcceptanceOK">
- <and>
- <isset property="thirdPartyDownloadLicenseAcceptance" />
- <or>
- <equals arg1="${thirdPartyDownloadLicenseAcceptance}" arg2="Y" />
- <equals arg1="${thirdPartyDownloadLicenseAcceptance}" arg2="I accept" />
- <equals arg1="${thirdPartyDownloadLicenseAcceptance}" arg2="&quot;I accept&quot;" />
- </or>
- </and>
- </condition>
- <antcall target="get.ant-contrib" />
- <available file="${thirdPartyJarsDir}/ant-contrib.jar" property="antContribJarAvailable" />
- <fail unless="antContribJarAvailable">Error!
-
-Ant-Contrib is required. Download it from http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip/download,
-then place it in the following location. You can also redefine the path in the promote.properties file:
-
-$${thirdPartyJarsDir}/ant-contrib.jar = ${thirdPartyJarsDir}/ant-contrib.jar
-
-Or, to download this automatically, see promoter.xml#thirdPartyDownloadLicenseAcceptance property.
- </fail>
- </target>
-
- <target name="get.ant-contrib" if="thirdPartyDownloadLicenseAcceptanceOK">
- <get src="http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip/download" dest="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip" usetimestamp="true" />
- <mkdir dir="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip_" />
- <unzip src="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip" dest="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip_" overwrite="true" />
- <mkdir dir="${thirdPartyJarsDir}" />
- <copy file="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip_/ant-contrib/ant-contrib-1.0b3.jar" tofile="${thirdPartyJarsDir}/ant-contrib.jar" failonerror="true" />
- <delete dir="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip_" includeemptydirs="true" quiet="true" />
- <delete file="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip" quiet="true" />
- </target>
-
- <target name="init">
- <fail message="Please use at least ant 1.8.0. Modify your ANT_HOME path to point to a correct location">
- <condition>
- <not>
- <contains string="${antversion}" substring="1.8" />
- </not>
- </condition>
- </fail>
- <condition property="antContribJarUnavailable">
- <not>
- <available file="${thirdPartyJarsDir}/ant-contrib.jar" type="file" />
- </not>
- </condition>
- <antcall target="check.ant-contrib" />
- <!-- This will fail if ant-contrib.jar cannot be found. You can install Ant-Contrib via RPM, or download it here:
- http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip/download
- -->
- <taskdef resource="net/sf/antcontrib/antlib.xml">
- <classpath>
- <pathelement location="${thirdPartyJarsDir}/ant-contrib.jar" />
- </classpath>
- </taskdef>
- <available file="${property.file.location}" property="propertyFileAvailable" />
- <fail message="property.file.location property must be defined" unless="propertyFileAvailable" />
- </target>
-
- <target name="load.properties">
- <property file="${property.file.location}" />
- </target>
-
- <target name="init.properties">
- <fail message="build.qualifier property must be defined">
- <condition>
- <not>
- <and>
- <isset property="build.qualifier" />
- <length string="${build.qualifier}" trim="true" when="greater" length="0" />
- </and>
- </not>
- </condition>
- </fail>
- <propertyregex override="true" property="build.qualifier" input="${build.qualifier}" regexp="v" replace="" casesensitive="false" />
- <fail message="version property must be defined">
- <condition>
- <not>
- <and>
- <isset property="version" />
- <length string="${version}" trim="true" when="greater" length="0" />
- </and>
- </not>
- </condition>
- </fail>
- <if>
- <and>
- <isset property="build.alias" />
- <length string="${build.alias}" trim="true" when="greater" length="0" />
- </and>
- <then>
- <property name="final.version.qualifier" value="${build.alias}" />
- </then>
- <else>
- <property name="final.version.qualifier" value="${build.qualifier}" />
- </else>
- </if>
- <fail message="build.root property must be defined" unless="build.root" />
- <fail message="downloads.area property must be defined" unless="downloads.area" />
- </target>
-
- <target name="main" depends="init,load.properties,init.properties">
-
- <!-- publish into drops ( Zips ) -->
- <antcall target="-publish.build.drops" inheritall="true" />
-
- <!-- publish p2 repository -->
- <antcall target="-publish.build.repository" inheritall="true" />
- </target>
-
- <target name="-publish.build.drops">
- <property name="build.drop.directory" location="${downloads.area}/downloads/drops/${version}/${build.qualifier}" />
-
- <echo message="Currently working on the version ${version}"/>
- <delete dir="${build.drop.directory}" />
- <mkdir dir="${build.drop.directory}" />
-
- <!-- copy zip packages -->
- <copy todir="${build.drop.directory}">
- <fileset dir="${build.root}">
- <filename name="*.zip" />
- </fileset>
- </copy>
-
- <!-- rename UpdateSite zip package -->
- <move tofile="${build.drop.directory}/${final.updatesite.name}-${final.version.qualifier}.zip" file="${build.drop.directory}/${build.root.updatesite.name}" />
-
- <!-- genereate md5 checksums -->
- <checksum algorithm="MD5" fileext=".md5" format="MD5SUM">
- <fileset dir="${build.drop.directory}" />
- </checksum>
-
- <fileset id="drop.resources" dir="${build.drop.directory}">
- <or>
- <type type="dir" />
- <type type="file" />
- </or>
- </fileset>
-
- <!-- chgrp -->
- <chgrp group="${group.owner}" type="both" verbose="true">
- <fileset refid="drop.resources" />
- </chgrp>
-
- </target>
-
- <target name="-publish.build.repository">
- <!-- determine the base version -->
- <propertyregex property="base.version" input="${version}" regexp="^(\d+\.\d+)\.\d+.*$" select="\1" casesensitive="false" />
-
- <!-- setup composite.repository.base and composite.type according to the build type -->
- <condition property="composite.repository.base" value="interim/${base.version}">
- <matches pattern="^I" string="${build.qualifier}" />
- </condition>
- <condition property="composite.repository.base" value="milestones/${base.version}">
- <matches pattern="^[MS]" string="${build.qualifier}" />
- </condition>
- <condition property="composite.repository.base" value="releases/${base.version}">
- <matches pattern="^R" string="${build.qualifier}" />
- </condition>
- <condition property="composite.repository.base" value="nightly/${base.version}">
- <matches pattern="^N" string="${build.qualifier}" />
- </condition>
- <condition property="composite.type" value="Interim">
- <matches pattern="^I" string="${build.qualifier}" />
- </condition>
- <condition property="composite.type" value="Milestones">
- <matches pattern="^[MS]" string="${build.qualifier}" />
- </condition>
- <condition property="composite.type" value="Releases">
- <matches pattern="^R" string="${build.qualifier}" />
- </condition>
- <condition property="composite.type" value="Nightly">
- <matches pattern="^N" string="${build.qualifier}" />
- </condition>
-
- <property name="composite.repository.directory" location="${downloads.area}/updates/${composite.repository.base}" />
- <property name="composite.repository.url" value="file:/${composite.repository.directory}" />
- <property name="build.repository.directory" location="${composite.repository.directory}/${build.qualifier}" />
- <property name="mirror.repository.path" value="${downloads.project.root}/updates/${composite.repository.base}/${build.qualifier}" />
-
- <delete dir="${build.repository.directory}" />
- <mkdir dir="${build.repository.directory}" />
-
- <!-- unzip update site to final location -->
- <unzip dest="${build.repository.directory}">
- <fileset dir="${build.root}">
- <filename name="*.zip" />
- </fileset>
- </unzip>
-
- <!-- adding p2.index -->
- <echo file="${build.repository.directory}/p2.index" message="version = 1${line.separator}metadata.repository.factory.order = content.xml,\!${line.separator}artifact.repository.factory.order = artifacts.xml,\!" />
-
- <!-- adding p2.mirrorsURL and p2.statsURI to the repository -->
- <unzip dest="${build.repository.directory}">
- <fileset file="${build.repository.directory}/artifacts.jar" />
- </unzip>
-
- <move file="${build.repository.directory}/artifacts.xml" tofile="${build.repository.directory}/artifacts.original.xml" />
-
- <xslt style="p2.xsl" in="${build.repository.directory}/artifacts.original.xml" out="${build.repository.directory}/artifacts.xml">
- <param name="mirrorsURL" expression="http://www.eclipse.org/downloads/download.php?file=${mirror.repository.path}&amp;format=xml" />
- </xslt>
-
- <zip destfile="${build.repository.directory}/artifacts.jar" basedir="${build.repository.directory}" includes="artifacts.xml" />
-
- <delete file="${build.repository.directory}/artifacts.xml" />
- <delete file="${build.repository.directory}/artifacts.original.xml" />
-
- <!-- add to composite repo -->
- <ant antfile="/shared/modeling/tools/promotion/manage-composite.xml" target="add" dir="${composite.repository.directory}">
- <property name="user.dir" value="${composite.repository.directory}" />
- <property name="child.repository" value="${build.qualifier}" />
- <property name="composite.name" value="${project.name} ${base.version} ${composite.type} Update Site" />
- </ant>
-
- <!-- add p2.index on top of composite repo is needed -->
- <if>
- <not>
- <available file="${composite.repository.directory}/p2.index" type="file" />
- </not>
- <then>
- <echo file="${composite.repository.directory}/p2.index" message="version = 1${line.separator}metadata.repository.factory.order = compositeContent.xml,\!${line.separator}artifact.repository.factory.order = compositeArtifacts.xml,\!" />
- </then>
- </if>
-
- <fileset id="repository.resources" dir="${composite.repository.directory}">
- <or>
- <filename name="compositeContent.*" />
- <filename name="compositeArtifacts.*" />
- <filename name="p2.index" />
- <filename name="${build.qualifier}/**" />
- </or>
- </fileset>
-
- <!-- chgrp -->
- <chgrp group="${group.owner}" type="both" verbose="true">
- <fileset refid="repository.resources" />
- </chgrp>
- </target>
-
-</project>
diff --git a/releng/org.eclipse.emf.eef.uml.update/publisher.properties b/releng/org.eclipse.emf.eef.uml.update/publisher.properties
new file mode 100644
index 000000000..e827a9b8e
--- /dev/null
+++ b/releng/org.eclipse.emf.eef.uml.update/publisher.properties
@@ -0,0 +1,8 @@
+# EEF publisher properties
+UPDATE_SITE__UNQUALIFIED_VERSION=${unqualifiedVersion}
+UPDATE_SITE__QUALIFIED_VERSION=${unqualifiedVersion}.${buildQualifier}
+UPDATE_SITE__ARTIFACT_NAME=${project.artifactId}-${unqualifiedVersion}.${buildQualifier}.zip
+UPDATE_SITE__ARTIFACT_URL=${env.JOB_URL}${env.BUILD_NUMBER}/artifact/releng/org.eclipse.emf.eef.update.uml/target/${project.artifactId}-${unqualifiedVersion}.${buildQualifier}.zip
+
+
+ \ No newline at end of file
diff --git a/releng/org.eclipse.emf.eef.update/p2.xsl b/releng/org.eclipse.emf.eef.update/p2.xsl
deleted file mode 100644
index 8c804d3b7..000000000
--- a/releng/org.eclipse.emf.eef.update/p2.xsl
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="xml" indent="yes"/>
-
- <xsl:param name="mirrorsURL"/>
-
- <!-- add p2.mirrorsURL and p2.statsURI properties -->
- <xsl:template match="repository/properties">
- <properties size='{@size+2}'>
- <xsl:copy-of select="property"/>
- <property name='p2.statsURI' value='http://download.eclipse.org/stats'/>
- <xsl:element name="property">
- <xsl:attribute name="name">p2.mirrorsURL</xsl:attribute>
- <xsl:attribute name="value"><xsl:value-of select="$mirrorsURL"/></xsl:attribute>
- </xsl:element>
- </properties>
- </xsl:template>
-
- <!-- add p2.mirrorsURL property -->
- <xsl:template match="repository/artifacts/artifact/properties[../@classifier='org.eclipse.update.feature']">
- <properties size='{@size+1}'>
- <xsl:copy-of select="property"/>
- <property name='download.stats' value='{../@id}-{../@version}'/>
- </properties>
- </xsl:template>
-
- <!-- copy everything else -->
- <xsl:template match="* | @*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/releng/org.eclipse.emf.eef.update/promoter.xml b/releng/org.eclipse.emf.eef.update/promoter.xml
deleted file mode 100644
index e62074c46..000000000
--- a/releng/org.eclipse.emf.eef.update/promoter.xml
+++ /dev/null
@@ -1,288 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2011 Obeo.
- 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:
- Obeo - initial API and implementation
-
- $Id: promoter.xml,v 1.36 2012/03/21 08:40:06 sbouchet Exp $
--->
-<project name="Promoter" default="main">
- <!--
- This promotion script helps to automatically promote the last sucessful build of tycho based build to correct location.
-
- Be sure to use at least ant 1.8.2 to launch this script.
-
- Ant 1.8.2 is located here : /shared/common/apache-ant-1.8.2/
- on build.eclipse.org, do a
- $> export ANT_HOME=/shared/common/apache-ant-1.8.2/
- -->
-
- <property name="downloads.project.root" value="modeling/emft/eef" />
- <property name="build.root" value="/shared/jobs/emf-eef-1.3/lastSuccessful/archive/releng/org.eclipse.emf.eef.update/target/" />
- <property name="thirdPartyJarsDir" value="/shared/modeling/emf/eef/3rdPartyJars" />
- <property name="project.name" value="EEF" />
- <property name="final.updatesite.name" value="emf-eef-Update" />
- <property name="build.root.updatesite.name" value="org.eclipse.emf.eef.update.zip" />
- <property name="group.owner" value="modeling.emf.eef" />
-
- <!--# To permit automatic downloads of non-EPL compatible code, override this to property to "Y" -->
- <property name="thirdPartyDownloadLicenseAcceptance" value="Y" />
-
- <property name="downloads.root" value="/home/data/httpd/download.eclipse.org/" />
- <property name="downloads.area" value="${downloads.root}/${downloads.project.root}" />
- <property name="property.file.location" location="${build.root}/promotion/promote.properties" />
- <antversion property="antversion" />
-
- <!--
- most of the code comes from Athena CBI.
- see http://wiki.eclipse.org/Common_Build_Infrastructure
- -->
- <target name="check.ant-contrib" if="antContribJarUnavailable">
- <condition property="thirdPartyDownloadLicenseAcceptanceOK">
- <and>
- <isset property="thirdPartyDownloadLicenseAcceptance" />
- <or>
- <equals arg1="${thirdPartyDownloadLicenseAcceptance}" arg2="Y" />
- <equals arg1="${thirdPartyDownloadLicenseAcceptance}" arg2="I accept" />
- <equals arg1="${thirdPartyDownloadLicenseAcceptance}" arg2="&quot;I accept&quot;" />
- </or>
- </and>
- </condition>
- <antcall target="get.ant-contrib" />
- <available file="${thirdPartyJarsDir}/ant-contrib.jar" property="antContribJarAvailable" />
- <fail unless="antContribJarAvailable">Error!
-
-Ant-Contrib is required. Download it from http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip/download,
-then place it in the following location. You can also redefine the path in the promote.properties file:
-
-$${thirdPartyJarsDir}/ant-contrib.jar = ${thirdPartyJarsDir}/ant-contrib.jar
-
-Or, to download this automatically, see promoter.xml#thirdPartyDownloadLicenseAcceptance property.
- </fail>
- </target>
-
- <target name="get.ant-contrib" if="thirdPartyDownloadLicenseAcceptanceOK">
- <get src="http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip/download" dest="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip" usetimestamp="true" />
- <mkdir dir="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip_" />
- <unzip src="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip" dest="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip_" overwrite="true" />
- <mkdir dir="${thirdPartyJarsDir}" />
- <copy file="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip_/ant-contrib/ant-contrib-1.0b3.jar" tofile="${thirdPartyJarsDir}/ant-contrib.jar" failonerror="true" />
- <delete dir="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip_" includeemptydirs="true" quiet="true" />
- <delete file="${java.io.tmpdir}/ant-contrib-1.0b3-bin.zip" quiet="true" />
- </target>
-
- <target name="init">
- <fail message="Please use at least ant 1.8.0. Modify your ANT_HOME path to point to a correct location">
- <condition>
- <not>
- <contains string="${antversion}" substring="1.8" />
- </not>
- </condition>
- </fail>
- <condition property="antContribJarUnavailable">
- <not>
- <available file="${thirdPartyJarsDir}/ant-contrib.jar" type="file" />
- </not>
- </condition>
- <antcall target="check.ant-contrib" />
- <!-- This will fail if ant-contrib.jar cannot be found. You can install Ant-Contrib via RPM, or download it here:
- http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip/download
- -->
- <taskdef resource="net/sf/antcontrib/antlib.xml">
- <classpath>
- <pathelement location="${thirdPartyJarsDir}/ant-contrib.jar" />
- </classpath>
- </taskdef>
- <available file="${property.file.location}" property="propertyFileAvailable" />
- <fail message="property.file.location property must be defined" unless="propertyFileAvailable" />
- </target>
-
- <target name="load.properties">
- <property file="${property.file.location}" />
- </target>
-
- <target name="init.properties">
- <fail message="build.qualifier property must be defined">
- <condition>
- <not>
- <and>
- <isset property="build.qualifier" />
- <length string="${build.qualifier}" trim="true" when="greater" length="0" />
- </and>
- </not>
- </condition>
- </fail>
- <propertyregex override="true" property="build.qualifier" input="${build.qualifier}" regexp="v" replace="" casesensitive="false" />
- <fail message="version property must be defined">
- <condition>
- <not>
- <and>
- <isset property="version" />
- <length string="${version}" trim="true" when="greater" length="0" />
- </and>
- </not>
- </condition>
- </fail>
- <if>
- <and>
- <isset property="build.alias" />
- <length string="${build.alias}" trim="true" when="greater" length="0" />
- </and>
- <then>
- <property name="final.version.qualifier" value="${build.alias}" />
- </then>
- <else>
- <property name="final.version.qualifier" value="${build.qualifier}" />
- </else>
- </if>
- <fail message="build.root property must be defined" unless="build.root" />
- <fail message="downloads.area property must be defined" unless="downloads.area" />
- </target>
-
- <target name="main" depends="init,load.properties,init.properties">
-
- <!-- publish into drops ( Zips ) -->
- <antcall target="-publish.build.drops" inheritall="true" />
-
- <!-- publish p2 repository -->
- <antcall target="-publish.build.repository" inheritall="true" />
- </target>
-
- <target name="-publish.build.drops">
- <property name="build.drop.directory" location="${downloads.area}/downloads/drops/${version}/${build.qualifier}" />
-
- <echo message="Currently working on the version ${version}"/>
- <delete dir="${build.drop.directory}" />
- <mkdir dir="${build.drop.directory}" />
-
- <!-- copy zip packages -->
- <copy todir="${build.drop.directory}">
- <fileset dir="${build.root}">
- <filename name="*.zip" />
- </fileset>
- </copy>
-
- <!-- rename UpdateSite zip package -->
- <move tofile="${build.drop.directory}/${final.updatesite.name}-${final.version.qualifier}.zip" file="${build.drop.directory}/${build.root.updatesite.name}" />
-
- <!-- genereate md5 checksums -->
- <checksum algorithm="MD5" fileext=".md5" format="MD5SUM">
- <fileset dir="${build.drop.directory}" />
- </checksum>
-
- <fileset id="drop.resources" dir="${build.drop.directory}">
- <or>
- <type type="dir" />
- <type type="file" />
- </or>
- </fileset>
-
- <!-- chgrp -->
- <chgrp group="${group.owner}" type="both" verbose="true">
- <fileset refid="drop.resources" />
- </chgrp>
-
- </target>
-
- <target name="-publish.build.repository">
- <!-- determine the base version -->
- <propertyregex property="base.version" input="${version}" regexp="^(\d+\.\d+)\.\d+.*$" select="\1" casesensitive="false" />
-
- <!-- setup composite.repository.base and composite.type according to the build type -->
- <condition property="composite.repository.base" value="interim/${base.version}">
- <matches pattern="^I" string="${build.qualifier}" />
- </condition>
- <condition property="composite.repository.base" value="milestones/${base.version}">
- <matches pattern="^[MS]" string="${build.qualifier}" />
- </condition>
- <condition property="composite.repository.base" value="releases/${base.version}">
- <matches pattern="^R" string="${build.qualifier}" />
- </condition>
- <condition property="composite.repository.base" value="nightly/${base.version}">
- <matches pattern="^N" string="${build.qualifier}" />
- </condition>
- <condition property="composite.type" value="Interim">
- <matches pattern="^I" string="${build.qualifier}" />
- </condition>
- <condition property="composite.type" value="Milestones">
- <matches pattern="^[MS]" string="${build.qualifier}" />
- </condition>
- <condition property="composite.type" value="Releases">
- <matches pattern="^R" string="${build.qualifier}" />
- </condition>
- <condition property="composite.type" value="Nightly">
- <matches pattern="^N" string="${build.qualifier}" />
- </condition>
-
- <property name="composite.repository.directory" location="${downloads.area}/updates/${composite.repository.base}" />
- <property name="composite.repository.url" value="file:/${composite.repository.directory}" />
- <property name="build.repository.directory" location="${composite.repository.directory}/${build.qualifier}" />
- <property name="mirror.repository.path" value="${downloads.project.root}/updates/${composite.repository.base}/${build.qualifier}" />
-
- <delete dir="${build.repository.directory}" />
- <mkdir dir="${build.repository.directory}" />
-
- <!-- unzip update site to final location -->
- <unzip dest="${build.repository.directory}">
- <fileset dir="${build.root}">
- <filename name="*.zip" />
- </fileset>
- </unzip>
-
- <!-- adding p2.index -->
- <echo file="${build.repository.directory}/p2.index" message="version = 1${line.separator}metadata.repository.factory.order = content.xml,\!${line.separator}artifact.repository.factory.order = artifacts.xml,\!" />
-
- <!-- adding p2.mirrorsURL and p2.statsURI to the repository -->
- <unzip dest="${build.repository.directory}">
- <fileset file="${build.repository.directory}/artifacts.jar" />
- </unzip>
-
- <move file="${build.repository.directory}/artifacts.xml" tofile="${build.repository.directory}/artifacts.original.xml" />
-
- <xslt style="p2.xsl" in="${build.repository.directory}/artifacts.original.xml" out="${build.repository.directory}/artifacts.xml">
- <param name="mirrorsURL" expression="http://www.eclipse.org/downloads/download.php?file=${mirror.repository.path}&amp;format=xml" />
- </xslt>
-
- <zip destfile="${build.repository.directory}/artifacts.jar" basedir="${build.repository.directory}" includes="artifacts.xml" />
-
- <delete file="${build.repository.directory}/artifacts.xml" />
- <delete file="${build.repository.directory}/artifacts.original.xml" />
-
- <!-- add to composite repo -->
- <ant antfile="/shared/modeling/tools/promotion/manage-composite.xml" target="add" dir="${composite.repository.directory}">
- <property name="user.dir" value="${composite.repository.directory}" />
- <property name="child.repository" value="${build.qualifier}" />
- <property name="composite.name" value="${project.name} ${base.version} ${composite.type} Update Site" />
- </ant>
-
- <!-- add p2.index on top of composite repo is needed -->
- <if>
- <not>
- <available file="${composite.repository.directory}/p2.index" type="file" />
- </not>
- <then>
- <echo file="${composite.repository.directory}/p2.index" message="version = 1${line.separator}metadata.repository.factory.order = compositeContent.xml,\!${line.separator}artifact.repository.factory.order = compositeArtifacts.xml,\!" />
- </then>
- </if>
-
- <fileset id="repository.resources" dir="${composite.repository.directory}">
- <or>
- <filename name="compositeContent.*" />
- <filename name="compositeArtifacts.*" />
- <filename name="p2.index" />
- <filename name="${build.qualifier}/**" />
- </or>
- </fileset>
-
- <!-- chgrp -->
- <chgrp group="${group.owner}" type="both" verbose="true">
- <fileset refid="repository.resources" />
- </chgrp>
- </target>
-
-</project>

Back to the top