Bug 506513: Sign all deployed plugins and features

Try to get the Mac app and Windows executable signing steps
in the right order relative to the archiving of the products.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=506513

Change-Id: I4dfca862255a6abdac5ae8e5faca8afd407aebc8
diff --git a/releng/rcp/org.eclipse.papyrusrt.rcp.product/pom.xml b/releng/rcp/org.eclipse.papyrusrt.rcp.product/pom.xml
index 6328069..ad9160a 100644
--- a/releng/rcp/org.eclipse.papyrusrt.rcp.product/pom.xml
+++ b/releng/rcp/org.eclipse.papyrusrt.rcp.product/pom.xml
@@ -57,7 +57,8 @@
 					</execution>
 					<execution>
 						<id>archive-products</id>
-						<goals>
+						<phase>pre-integration-test</phase>
+ 						<goals>
 							<goal>archive-products</goal>
 						</goals>
 					</execution>
@@ -69,6 +70,14 @@
 				<configuration> 
 					<fileNames>Papyrus-RT.app</fileNames>
 				</configuration>
+				<executions>
+					<execution>
+		                <phase>package</phase>
+						<goals>
+							<goal>sign</goal>
+						</goals>
+					</execution>
+				</executions>
 			</plugin>
 			<plugin>
 				<groupId>org.eclipse.cbi.maven.plugins</groupId>
@@ -76,7 +85,61 @@
 				<configuration> 
 					<fileNames>Papyrus-RT.exe,eclipsec.exe</fileNames>
 				</configuration>
+				<executions>
+					<execution>
+		                <phase>package</phase>
+						<goals>
+							<goal>sign</goal>
+						</goals>
+					</execution>
+				</executions>
 			</plugin>
 		</plugins>
 	</build>
+
+	<profiles>
+		<profile>
+			<id>sign-rcps</id>
+			<activation>
+				<property>
+					<name>SIGN</name>
+					<value>true</value>
+				</property>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.eclipse.cbi.maven.plugins</groupId>
+						<artifactId>eclipse-macsigner-plugin</artifactId>
+						<configuration>
+							<fileNames>Papyrus-RT.app</fileNames>
+						</configuration>
+						<executions>
+							<execution>
+								<phase>package</phase>
+								<goals>
+									<goal>sign</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+					<plugin>
+						<groupId>org.eclipse.cbi.maven.plugins</groupId>
+						<artifactId>eclipse-winsigner-plugin</artifactId>
+						<configuration>
+							<fileNames>Papyrus-RT.exe,eclipsec.exe</fileNames>
+						</configuration>
+						<executions>
+							<execution>
+								<phase>package</phase>
+								<goals>
+									<goal>sign</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>
 </project>