511226: Use native HttpClient SPNEGO/Kerberos support for Windows
Promotion scripts for HttpClient wrapper site
Bug: 511226
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=511226
diff --git a/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/pom.xml b/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/pom.xml
index 52792d0..5711d57 100644
--- a/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/pom.xml
+++ b/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/pom.xml
@@ -4,28 +4,52 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.eclipse.epp.mpc.apache.httpclient</groupId>
- <artifactId>org.eclipse.epp.mpc.apache.httpclient.parent</artifactId>
+ <groupId>org.eclipse.epp.mpc.apache.httpclient</groupId>
+ <artifactId>org.eclipse.epp.mpc.apache.httpclient.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
-
- <name>HttpClient Feature Site</name>
- <artifactId>org.eclipse.epp.mpc.apache.httpclient.site</artifactId>
- <packaging>eclipse-repository</packaging>
- <properties>
- <qualifier>${project.unqualifiedVersion}</qualifier>
+ <name>HttpClient Feature Site</name>
+ <artifactId>org.eclipse.epp.mpc.apache.httpclient.site</artifactId>
+ <packaging>eclipse-repository</packaging>
+
+ <properties>
+ <qualifier>${project.unqualifiedVersion}</qualifier>
</properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-repository-plugin</artifactId>
- <configuration>
- <includeAllDependencies>false</includeAllDependencies>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-promotion</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>promote/*</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <configuration>
+ <includeAllDependencies>false</includeAllDependencies>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/promote/promote.properties b/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/promote/promote.properties
new file mode 100644
index 0000000..3adda98
--- /dev/null
+++ b/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/promote/promote.properties
@@ -0,0 +1,2 @@
+version=${unqualifiedVersion}
+qualifier=${buildQualifier}
diff --git a/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/promote/promote.sh b/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/promote/promote.sh
new file mode 100644
index 0000000..88fa4de
--- /dev/null
+++ b/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/promote/promote.sh
@@ -0,0 +1,37 @@
+#!/bin/sh -e
+
+DIST=$1
+VERSION=$2
+QUALIFIER=$3
+SRC=$4
+ARCHIVE=$5
+SITE=$6
+
+DST=$ARCHIVE/$VERSION/$QUALIFIER
+
+
+if [ -e $DST ]; then
+ echo $DST already exists
+ exit 1
+fi
+
+echo Promoting $VERSION.$QUALIFIER to $DST
+
+mkdir -p $DST/
+unzip -d $DST/ $SRC
+cp $SRC $DST/$DIST-$VERSION.$QUALIFIER.zip
+
+chmod g+w -R $DST
+
+cd $(dirname $0)
+BASE=$(pwd)
+
+if [ -n "$SITE" ]; then
+ for i in $SITE $SITE/*; do
+ if [ -e $i/composite.index ]; then
+ echo "Updating $i"
+ cd $i
+ $BASE/update-composite.sh
+ fi
+ done
+fi
diff --git a/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/promote/update-composite.sh b/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/promote/update-composite.sh
new file mode 100644
index 0000000..cb06c15
--- /dev/null
+++ b/httpclient-target-site/org.eclipse.epp.mpc.apache.httpclient.site/promote/update-composite.sh
@@ -0,0 +1,57 @@
+#!/bin/bash -e
+
+BASE=$(dirname $0)
+source composite.index
+
+if [ "$DIRS" == "" ]; then
+ echo "missing DIRS"
+ exit 1
+fi
+
+if [ "$NAME" == "" ]; then
+ echo "missing NAME"
+ exit 1
+fi
+
+TIMESTAMP=$(date +%s)000
+
+compose() {
+cat > $FILE <<EOF
+<?xml version='1.0' encoding='UTF-8'?>
+<?TAG version='1.0.0'?>
+<repository name='NAME' type='TYPE' version='1.0.0'>
+ <properties size='2'>
+ <property name='p2.compressed' value='true'/>
+ <property name='p2.timestamp' value='TIMESTAMP'/>
+ </properties>
+ <children size='CHILD_COUNT'>
+EOF
+
+sed -i -e "s/TAG/$TAG/" -e "s/TYPE/$TYPE/" $FILE
+sed -i -e "s/NAME/$NAME/" -e "s/TIMESTAMP/$TIMESTAMP/" $FILE
+COUNT=0
+for i in $DIRS; do
+ echo " <child location='$i'/>" >> $FILE
+ COUNT=$((COUNT+1))
+done
+sed -i -e "s/CHILD_COUNT/$COUNT/" $FILE
+
+cat >> $FILE <<EOF
+ </children>
+</repository>
+EOF
+
+echo "Wrote $COUNT entries to $FILE"
+}
+
+FILE=compositeArtifacts.xml
+TAG=compositeArtifactRepository
+TYPE=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+
+compose
+
+FILE=compositeContent.xml
+TAG=compositeMetadataRepository
+TYPE=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+
+compose
diff --git a/httpclient-target-site/pom.xml b/httpclient-target-site/pom.xml
index 8263362..6af04ff 100644
--- a/httpclient-target-site/pom.xml
+++ b/httpclient-target-site/pom.xml
@@ -3,13 +3,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.epp.mpc.apache.httpclient</groupId>
- <artifactId>org.eclipse.epp.mpc.apache.httpclient.parent</artifactId>
- <name>HttpClient Wrapper Feature Parent</name>
+ <groupId>org.eclipse.epp.mpc.apache.httpclient</groupId>
+ <artifactId>org.eclipse.epp.mpc.apache.httpclient.parent</artifactId>
+ <name>HttpClient Wrapper Feature Parent</name>
<version>1.0.0-SNAPSHOT</version>
- <packaging>pom</packaging>
+ <packaging>pom</packaging>
- <properties>
+ <properties>
<tycho.version>0.24.0</tycho.version>
</properties>
@@ -19,13 +19,13 @@
<module>org.eclipse.epp.mpc.apache.httpclient.site</module>
</modules>
- <build>
- <plugins>
+ <build>
+ <plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
</plugin>
- </plugins>
+ </plugins>
<pluginManagement>
<plugins>
<plugin>
@@ -41,26 +41,26 @@
<configuration>
<resolver>p2</resolver>
<target>
- <artifact>
- <groupId>org.eclipse.epp.mpc.apache.httpclient</groupId>
- <artifactId>httpclient-target</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </artifact>
- </target>
- <environments>
- <environment>
- <os>*</os>
- <ws>*</ws>
- <arch>*</arch>
- </environment>
- <environment>
- <!-- This is needed to make the build work properly with
- our (osgi.os=win32) platform filter -->
- <os>win32</os>
- <ws>*</ws>
- <arch>*</arch>
- </environment>
- </environments>
+ <artifact>
+ <groupId>org.eclipse.epp.mpc.apache.httpclient</groupId>
+ <artifactId>httpclient-target</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </artifact>
+ </target>
+ <environments>
+ <environment>
+ <os>*</os>
+ <ws>*</ws>
+ <arch>*</arch>
+ </environment>
+ <environment>
+ <!-- This is needed to make the build work properly with
+ the (osgi.os=win32) platform filter in httpclient.win -->
+ <os>win32</os>
+ <ws>*</ws>
+ <arch>*</arch>
+ </environment>
+ </environments>
</configuration>
</plugin>
<plugin>
@@ -106,5 +106,5 @@
</plugin>
</plugins>
</pluginManagement>
- </build>
+ </build>
</project>