rcp: Sign the RCP on Mac
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tue, 17 May 2016 15:29:53 +0000 (11:29 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Thu, 19 May 2016 18:40:02 +0000 (14:40 -0400)
The mac signing has to happen between materialize-products and
archive-products goals. Because we only want to do it when the
signing profile is enabled (eclipse.org server), we have to duplicate
some xml to fit the macsigner between the two. I did extract some
variables in order to make the duplication less error prone.

Bug: 488873
Change-Id: I65168e010dc866ef48b643f6aaf30aa94aedefda
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/72976
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
pom.xml
rcp/org.eclipse.tracecompass.rcp.product/pom.xml

diff --git a/pom.xml b/pom.xml
index 2121b4a0e495f05911509ac0951806adb2531895..33aea3abdcd7f70b1929d0891679cbaccefe25fc 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -46,6 +46,7 @@
     <tycho-version>0.25.0</tycho-version>
     <tycho-extras-version>0.25.0</tycho-extras-version>
     <tycho.scmUrl>scm:git:git://git.eclipse.org/gitroot/tracecompass/org.eclipse.tracecompass.git</tycho.scmUrl>
+    <cbi-plugins.version>1.1.3</cbi-plugins.version>
     <target-platform>tracecompass-e4.6</target-platform>
     <help-docs-eclipserun-repo>http://download.eclipse.org/eclipse/updates/4.5</help-docs-eclipserun-repo>
 
           <plugin>
             <groupId>org.eclipse.cbi.maven.plugins</groupId>
             <artifactId>eclipse-jarsigner-plugin</artifactId>
-            <version>1.1.3</version>
+            <version>${cbi-plugins.version}</version>
             <executions>
               <execution>
                 <id>sign</id>
index 7bfdd90304d4a8d87173df42b4186985d87f35c1..54990385ffe31496146f7b23a1c72a462e59ee30 100644 (file)
     <properties>
         <productId>org.eclipse.tracecompass.rcp</productId>
         <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
+        <archiveFileName>trace-compass-${unqualifiedVersion}-${build.timestamp}</archiveFileName>
+        <rootFolder>trace-compass</rootFolder>
+        <!-- for MacOSX, make sure you use a folder ending with .app , see bug 463670 -->
+        <rootFolderMac>${rootFolder}.app</rootFolderMac>
     </properties>
 
     <build>
                 <configuration>
                     <products>
                         <product>
-                            <archiveFileName>trace-compass-${unqualifiedVersion}-${build.timestamp}</archiveFileName>
+                            <archiveFileName>${archiveFileName}</archiveFileName>
                             <id>${productId}</id>
-                            <rootFolder>trace-compass</rootFolder>
+                            <rootFolder>${rootFolder}</rootFolder>
                             <rootFolders>
-                            <!-- for MacOSX, make sure you use a folder ending with .app , see bug 463670 -->
-                                <macosx>trace-compass.app</macosx>
+                                <macosx>${rootFolderMac}</macosx>
                             </rootFolders>
                         </product>
                     </products>
         </plugins>
     </build>
 
-  <!-- Deploy RCP builds and update site to the downloads area -->
   <profiles>
+    <profile>
+      <id>sign-update-site</id>
+      <build>
+        <plugins>
+            <plugin>
+                <groupId>org.eclipse.tycho</groupId>
+                <artifactId>tycho-p2-director-plugin</artifactId>
+                <version>${tycho-version}</version>
+                <executions>
+                    <execution>
+                        <id>materialize-products</id>
+                        <goals>
+                            <goal>materialize-products</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>archive-products</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>archive-products</goal>
+                        </goals>
+                        <configuration>
+                            <formats>
+                                <linux>tar.gz</linux>
+                                <macosx>tar.gz</macosx>
+                                <solaris>zip</solaris>
+                                <win32>zip</win32>
+                            </formats>
+                        </configuration>
+                    </execution>
+                </executions>
+                <configuration>
+                    <products>
+                        <product>
+                            <archiveFileName>${archiveFileName}</archiveFileName>
+                            <id>${productId}</id>
+                            <rootFolder>${rootFolder}</rootFolder>
+                            <rootFolders>
+                                <macosx>${rootFolderMac}</macosx>
+                            </rootFolders>
+                        </product>
+                    </products>
+                    <source>repository</source>
+                </configuration>
+            </plugin>
+          <plugin>
+            <groupId>org.eclipse.cbi.maven.plugins</groupId>
+            <artifactId>eclipse-macsigner-plugin</artifactId>
+            <version>${cbi-plugins.version}</version>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>sign</goal>
+                </goals>
+                <configuration>
+                  <signFiles>
+                    <signFile>${project.build.directory}/products/${productId}/macosx/cocoa/x86_64/${rootFolderMac}</signFile>
+                  </signFiles>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  <!-- Deploy RCP builds and update site to the downloads area -->
     <profile>
       <id>deploy-rcp</id>
       <properties>
This page took 0.027265 seconds and 5 git commands to generate.