Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/releng
diff options
context:
space:
mode:
authorRalf Sternberg2012-05-28 17:07:40 -0400
committerRalf Sternberg2012-05-28 17:07:40 -0400
commit697097cf1a5648473487aad4ba2a72a6ecd17f0c (patch)
tree658f445fa314ab29c6fe9829eb13684c2758deb9 /releng
parentea9d13073bcb930fccd360f8934cea387a6f49ed (diff)
downloadorg.eclipse.rap-697097cf1a5648473487aad4ba2a72a6ecd17f0c.tar.gz
org.eclipse.rap-697097cf1a5648473487aad4ba2a72a6ecd17f0c.tar.xz
org.eclipse.rap-697097cf1a5648473487aad4ba2a72a6ecd17f0c.zip
Sign runtime features in build (1st try)
bug 380516: Runtime features are not signed https://bugs.eclipse.org/bugs/show_bug.cgi?id=380516
Diffstat (limited to 'releng')
-rwxr-xr-xreleng/org.eclipse.rap.releng/scripts/runtime-build.sh11
-rw-r--r--releng/org.eclipse.rap.target.releng/repository/pom.xml112
2 files changed, 118 insertions, 5 deletions
diff --git a/releng/org.eclipse.rap.releng/scripts/runtime-build.sh b/releng/org.eclipse.rap.releng/scripts/runtime-build.sh
index 1e029a9348..cc85348952 100755
--- a/releng/org.eclipse.rap.releng/scripts/runtime-build.sh
+++ b/releng/org.eclipse.rap.releng/scripts/runtime-build.sh
@@ -13,7 +13,6 @@ else
sign=false
fi
-
######################################################################
# Cleanup left-overs from previous run
@@ -32,9 +31,9 @@ if [ "$exitcode" != "0" ]; then
fi
if [ -d repository/target/fixedPacked ]; then
- mv repository/target/fixedPacked "$WORKSPACE/runtimeRepo"
+ mv repository/target/fixedPacked "$WORKSPACE/runtimeRepo" || exit 1
else
- mv repository/target/repository "$WORKSPACE/runtimeRepo"
+ mv repository/target/repository "$WORKSPACE/runtimeRepo" || exit 1
fi
VERSION=$(ls "$WORKSPACE"/runtimeRepo/features/org.eclipse.rap.runtime_*.jar | sed 's/.*_\([0-9.-]\+\)\..*\.jar/\1/')
@@ -55,7 +54,11 @@ $MVN -e clean package -DruntimeRepo="file://$WORKSPACE/runtimeRepo" || exit 1
zipFileName=rap-runtime-$VERSION-$BUILD_TYPE-$TIMESTAMP.zip
compatZipFileName=rap-runtime-compatibility-$VERSION-$BUILD_TYPE-$TIMESTAMP.zip
-mv repository/target/*.zip "$WORKSPACE/$zipFileName" || exit 1
+if [ -d repository/target/fixedSigned ]; then
+ mv repository/target/fixedSigned/*.zip "$WORKSPACE/$zipFileName" || exit 1
+else
+ mv repository/target/*.zip "$WORKSPACE/$zipFileName" || exit 1
+fi
if [ "$sign" == "true" -a -d compatibility-repository/target ]; then
mv compatibility-repository/target/*.zip "$WORKSPACE/$compatZipFileName" || exit 1
diff --git a/releng/org.eclipse.rap.target.releng/repository/pom.xml b/releng/org.eclipse.rap.target.releng/repository/pom.xml
index aa917f4f6b..66ecb44d62 100644
--- a/releng/org.eclipse.rap.target.releng/repository/pom.xml
+++ b/releng/org.eclipse.rap.target.releng/repository/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, EclipseSource and others
+ Copyright (c) 2011, 2012 EclipseSource and others.
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
@@ -38,4 +38,114 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>pack-and-sign</id>
+ <activation>
+ <property>
+ <name>sign</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <!--
+ Create zip file with all features for signing
+ -->
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-pack-properties</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <zip destfile="${project.build.directory}/rap-features.zip">
+ <zipfileset src="${project.build.directory}/org.eclipse.rap.runtime-aggregation-repository.zip">
+ <include name="features/*.jar" />
+ </zipfileset>
+ </zip>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!--
+ Sign this zip file
+ -->
+ <plugin>
+ <groupId>org.eclipse.dash.maven</groupId>
+ <artifactId>eclipse-signing-maven-plugin</artifactId>
+ <version>${signing-plugin-version}</version>
+ <executions>
+ <execution>
+ <id>sign</id>
+ <configuration>
+ <inputFile>${project.build.directory}/rap-features.zip</inputFile>
+ <outputFile>${project.build.directory}/signed/rap-features.zip</outputFile>
+ </configuration>
+ <phase>package</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!--
+ Create copy of the original zip and update it with the signed features
+ -->
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-pack-properties</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <copy
+ src="${project.build.directory}/org.eclipse.rap.runtime-aggregation-repository.zip"
+ todir="${project.build.directory}/final/repository.zip"/>
+ <zip destfile="${project.build.directory}/final/repository.zip" update="true">
+ <zipfileset src="${project.build.directory}/signed/rap-features.zip">
+ <include name="features/*.jar" />
+ </zipfileset>
+ </zip>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!--
+ Fix checksums
+ -->
+ <plugin>
+ <groupId>org.eclipse.dash.maven</groupId>
+ <artifactId>eclipse-signing-maven-plugin</artifactId>
+ <version>${signing-plugin-version}</version>
+ <executions>
+ <execution>
+ <id>fix-checksums-for-signed-content</id>
+ <configuration>
+ <inputFile>${project.build.directory}/final/repository.zip</inputFile>
+ <unzipDir>${project.build.directory}/fixedSigned</unzipDir>
+ <artifactsXml>${project.build.directory}/fixedSigned/artifacts.xml</artifactsXml>
+ </configuration>
+ <phase>package</phase>
+ <goals>
+ <goal>fixCheckSums</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>

Back to the top