]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Support signing of platform external dependencies and SDK
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sat, 22 Feb 2020 16:30:28 +0000 (18:30 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sat, 22 Feb 2020 16:30:28 +0000 (18:30 +0200)
Swiched to Tycho 1.5.0 and removed broken category.xml files
that broke the build with Tycho 1.5.0 compared to 1.0.0.

gitlab #468

Change-Id: Idab1eb2d4ce2b2e5b7b4cccc1fd5d18217e5e83a

.mvn/extensions.xml
bundles/org.simantics.gnuplot/pom.xml
features/org.simantics.db.client.feature/category.xml [deleted file]
features/org.simantics.message.feature/category.xml [deleted file]
releng/org.simantics.sdk.build.p2.site/sign.sh [new file with mode: 0755]
releng/org.simantics.tycho.configuration/pom.xml

index 1bf00d24c459199b02ec7dcbbda6eb508eab2242..3b43bdfdd6c475790cc5db2e38b62ad33da8875d 100644 (file)
@@ -3,6 +3,6 @@
   <extension>
     <groupId>org.eclipse.tycho.extras</groupId>
     <artifactId>tycho-pomless</artifactId>
   <extension>
     <groupId>org.eclipse.tycho.extras</groupId>
     <artifactId>tycho-pomless</artifactId>
-    <version>1.0.0</version>
+    <version>1.5.0</version>
   </extension>
   </extension>
-</extensions> 
\ No newline at end of file
+</extensions> 
index 75ed6fe45f3b62176f9d23635fd09077b44186a9..2d270fb111599cc9a0714dc399166f9c7a57bfbf 100644 (file)
@@ -18,7 +18,7 @@
        <!-- common settings for all modules -->
        <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- common settings for all modules -->
        <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-               <tycho-version>1.0.0</tycho-version>
+               <tycho-version>1.5.0</tycho-version>
        </properties>
 
        <build>
        </properties>
 
        <build>
diff --git a/features/org.simantics.db.client.feature/category.xml b/features/org.simantics.db.client.feature/category.xml
deleted file mode 100644 (file)
index b8574cb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
-   <feature url="features/org.simantics.db.client_1.1.0.qualifier.jar" id="org.simantics.db.client" version="1.1.3.qualifier">
-      <category name="Simantics DB Client"/>
-   </feature>
-   <feature url="features/org.simantics.db.services_1.1.0.qualifier.jar" id="org.simantics.db.services" version="1.1.0.qualifier">
-      <category name="Simantics DB Client"/>
-   </feature>
-   <feature url="features/org.simantics.layer0_1.1.0.qualifier.jar" id="org.simantics.layer0" version="1.1.2.qualifier">
-      <category name="Simantics DB Client"/>
-   </feature>
-   <category-def name="Simantics DB Client" label="Simantics DB Client"/>
-</site>
diff --git a/features/org.simantics.message.feature/category.xml b/features/org.simantics.message.feature/category.xml
deleted file mode 100644 (file)
index ddce9f4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r<!--
-    Copyright (c) 2007, 2010 Association for Decentralized Information Management
-    in Industry THTH ry.
-    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:
-        VTT Technical Research Centre of Finland - initial API and implementation
- -->
-
-<site>
-   <feature url="features/org.simantics.message_0.9.0.jar" id="org.simantics.message" version="0.9.0">
-      <category name="org.simantics.message"/>
-   </feature>
-   <category-def name="org.simantics.message" label="Message Logging Subsystem"/>
-</site>
diff --git a/releng/org.simantics.sdk.build.p2.site/sign.sh b/releng/org.simantics.sdk.build.p2.site/sign.sh
new file mode 100755 (executable)
index 0000000..04dc132
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+dir=`dirname $0`
+
+if [ $# -lt 3 ]; then
+    echo "Usage: sign.sh <keystore location> <signing property file> <TSA URL>"
+    echo ""
+    echo "<signing property file> must contain the following properties:"
+    echo "    jarsigner.alias:     keystore entry alias"
+    echo "    jarsigner.storepass: password for the keystore"
+    echo "    jarsigner.keypass:   password for the key <jarsigner.alias>"
+    echo ""
+    echo "<TSA URL> can be empty is timestamping is not desired."
+    exit -1
+fi
+
+keystore=$1
+signprops=$2
+tsa=$3
+
+function signprop {
+    grep "${1}" ${signprops}|cut -d'=' -f2
+}
+
+echo "----"
+echo "script directory: ${dir}"
+echo "keystore: ${keystore}"
+echo "signing property file: ${signprops}"
+echo "TSA URL: ${tsa}"
+
+keyalias=$(signprop 'jarsigner.alias')
+storepass=$(signprop 'jarsigner.storepass')
+keypass=$(signprop 'jarsigner.keypass')
+
+for jar in `find ${dir}/target/repository/plugins/ -type f -not -ipath '*.source_*.jar'`; do
+    echo "----"
+    if [ -z ${tsa} ]; then
+        echo "Signing $jar"
+        jarsigner -keystore ${keystore} \
+                  -storepass ${storepass} \
+                  -keypass ${keypass} \
+                  -verbose \
+                  $jar \
+                  ${keyalias}
+    else
+        echo "Signing and timestamping $jar"
+        jarsigner -keystore ${keystore} \
+                  -storepass ${storepass} \
+                  -keypass ${keypass} \
+                  -verbose \
+                  -tsa "${tsa}" \
+                  $jar \
+                  ${keyalias}
+    fi
+done
+
index 320857f517050d1bf8bbec7097f308f2a31a4dcb..659246e6eab8a006f4d39d17ee9fbc59c558dd4f 100644 (file)
@@ -8,10 +8,9 @@
        <packaging>pom</packaging>
 
        <properties>
        <packaging>pom</packaging>
 
        <properties>
-               <tycho.version>1.0.0</tycho.version>
-               <tycho.extras.version>1.0.0</tycho.extras.version>
+               <tycho.version>1.5.0</tycho.version>
+               <tycho.extras.version>1.5.0</tycho.extras.version>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-               <mars-repo.url>http://download.eclipse.org/releases/mars</mars-repo.url>
        </properties>
 
        <repositories>
        </properties>
 
        <repositories>
                        </plugin>
                </plugins>
        </build>
                        </plugin>
                </plugins>
        </build>
+
+       <profiles>
+               <profile>
+                       <id>sign</id>
+                       <activation>
+                               <property>
+                                       <name>sign</name>
+                                       <value>true</value>
+                               </property>
+                       </activation>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>org.codehaus.mojo</groupId>
+                                               <artifactId>properties-maven-plugin</artifactId>
+                                               <version>1.0.0</version>
+                                               <executions>
+                                                       <execution>
+                                                               <phase>initialize</phase>
+                                                               <goals>
+                                                                       <goal>read-project-properties</goal>
+                                                               </goals>
+                                                       </execution>
+                                               </executions>
+                                               <configuration>
+                                                       <files>
+                                                               <file>${sign.properties}</file>
+                                                       </files>
+                                               </configuration>
+                                       </plugin>
+                                       <plugin>
+                                               <groupId>org.apache.maven.plugins</groupId>
+                                               <artifactId>maven-jarsigner-plugin</artifactId>
+                                               <version>3.0.0</version>
+                                               <executions>
+                                                       <execution>
+                                                               <id>sign</id>
+                                                               <goals>
+                                                                       <goal>sign</goal>
+                                                                       <goal>verify</goal>
+                                                               </goals>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+       </profiles>
 </project>
 </project>