Bug 579326 - [SIGNING] Windows and MacOS RCPs are unsigned

- Add macsigner and winsigner to pom of configuration plugin
- Add macsigner and winsigner to pom.xml of product plugin
- Add MacOS entitlements

Change-Id: Ia68c4be890f814cdadad1d721b5cde249b0ae80c
Signed-off-by: Ansgar Radermacher <ansgar.radermacher@cea.fr>
diff --git a/releng/org.eclipse.papyrus.designer.configuration/pom.xml b/releng/org.eclipse.papyrus.designer.configuration/pom.xml
index fb0a572..ec996a2 100644
--- a/releng/org.eclipse.papyrus.designer.configuration/pom.xml
+++ b/releng/org.eclipse.papyrus.designer.configuration/pom.xml
@@ -24,7 +24,7 @@
 		<!-- use 'mvn versions:display-plugin-updates' to check for the latest -->
 		<mylyn.wikitext.version>3.0.38</mylyn.wikitext.version>
 		<maven-checkstyle-version>3.0.0</maven-checkstyle-version>
-		<jarsigner.version>1.3.2</jarsigner.version>
+		<eclipse-cbi.version>1.3.2</eclipse-cbi.version>
 
 		<java.source>11</java.source>
 		<java.target>11</java.target>
@@ -189,7 +189,17 @@
 				<plugin>
 					<groupId>org.eclipse.cbi.maven.plugins</groupId>
 					<artifactId>eclipse-jarsigner-plugin</artifactId>
-					<version>${jarsigner.version}</version>
+					<version>${eclipse-cbi.version}</version>
+				</plugin>
+				<plugin>
+					<groupId>org.eclipse.cbi.maven.plugins</groupId>
+					<artifactId>eclipse-macsigner-plugin</artifactId>
+					<version>${eclipse-cbi.version}</version>
+				</plugin>
+				<plugin>
+					<groupId>org.eclipse.cbi.maven.plugins</groupId>
+					<artifactId>eclipse-winsigner-plugin</artifactId>
+					<version>${eclipse-cbi.version}</version>
 				</plugin>
 				<plugin>
 					<!-- https://github.com/jbosstools/jbosstools-maven-plugins/wiki -->
@@ -337,7 +347,6 @@
 
 	<!-- Profiles -->
 	<profiles>
-	
 		<profile>
 			<id>eclipse-sign</id>
 			<build>
diff --git a/releng/org.eclipse.papyrus.designer.product/application.entitlement b/releng/org.eclipse.papyrus.designer.product/application.entitlement
new file mode 100644
index 0000000..5b0a423
--- /dev/null
+++ b/releng/org.eclipse.papyrus.designer.product/application.entitlement
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+    <key>com.apple.security.cs.allow-jit</key>
+    <true/>
+    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
+    <true/>
+    <key>com.apple.security.cs.disable-executable-page-protection</key>
+    <true/>
+    <key>com.apple.security.cs.allow-dyld-environment-variables</key>
+    <true/>
+    <key>com.apple.security.cs.disable-library-validation</key>
+    <true/>
+    <key>com.apple.security.cs.debugger</key>
+    <true/>
+</dict>
+</plist>
diff --git a/releng/org.eclipse.papyrus.designer.product/pom.xml b/releng/org.eclipse.papyrus.designer.product/pom.xml
index 9867283..b708abe 100644
--- a/releng/org.eclipse.papyrus.designer.product/pom.xml
+++ b/releng/org.eclipse.papyrus.designer.product/pom.xml
@@ -49,6 +49,7 @@
 						<goals>
 							<goal>archive-products</goal>
 						</goals>
+						<phase>pre-integration-test</phase>
 					</execution>
 				</executions>
 			</plugin>
@@ -61,6 +62,54 @@
 			</plugin>
 		</plugins>
 	</build>
+
+	<profiles>
+		<profile>
+			<id>eclipse-sign</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>papyrusDesigner.app</fileNames>
+							<entitlements>${project.basedir}/application.entitlement</entitlements>
+						</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>papyrusDesigner.exe,eclipsec.exe</fileNames>
+						</configuration>
+						<executions>
+							<execution>
+								<phase>package</phase>
+								<goals>
+									<goal>sign</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>
+
 	<name>org.eclipse.papyrus.designer.product</name>
 	<description>This plugins defines the product used in the RCP Designer.</description>
 </project>