[Releng] Update RCP signing behavior

Change-Id: I0dbf89f7ab16d63bff049d0f3c58d844740d1cf9
Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
diff --git a/pom.xml b/pom.xml
index a3199dd..77ceccc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
 
 		<!-- platform specific properties -->
 		<eclipse.targetrelease>2022-03</eclipse.targetrelease>
-		<target.version>2.0.0-SNAPSHOT</target.version> 
+		<target.version>2.0.0-SNAPSHOT</target.version>
 		<target.groupId>org.eclipse.papyrus.sysml</target.groupId>
 		<target.artifactId>org.eclipse.papyrus.sysml16.targetplatform</target.artifactId>
 
@@ -43,17 +43,17 @@
 		<findbugs.version>3.0.5</findbugs.version>
 		<maven.compiler.version>3.8.1</maven.compiler.version>
 		<!-- https://repo.eclipse.org/content/repositories/cbi-releases/ -->
-		<jarSigner.version>1.3.1</jarSigner.version>
+		<eclipse-cbi.version>1.3.2</eclipse-cbi.version>
 		<!-- https://repository.jboss.org/ -->
 		<jboss.utils.version>1.7.0</jboss.utils.version>
 		<java.source.version>11</java.source.version>
 		<java.target.version>11</java.target.version>
-		
+
 		<!-- Timestamp used in various places, e.g. the about dialog (see about.mappings) -->
 		<eclipse.simultaneous.release.build>${maven.build.timestamp}</eclipse.simultaneous.release.build>
 		<!-- Human readable name of the release, e.g. used in the about dialog 
-			(see about.mappings)  -->
-		<eclipse.simultaneous.release.name>2022-03 (4.23)</eclipse.simultaneous.release.name> 
+			(see about.mappings) -->
+		<eclipse.simultaneous.release.name>2022-03 (4.23)</eclipse.simultaneous.release.name>
 	</properties>
 
 	<ciManagement>
@@ -98,6 +98,12 @@
 			<id>org.eclipse.cbi.maven.plugins</id>
 			<name>Eclipse CBI</name>
 			<url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
 		</pluginRepository>
 		<pluginRepository>
 			<id>org.jboss.tools.tycho-plugins</id>
@@ -148,6 +154,21 @@
 					<artifactId>exec-maven-plugin</artifactId>
 					<version>${mojo.execmaven.version}</version>
 				</plugin>
+				<plugin>
+					<groupId>org.eclipse.cbi.maven.plugins</groupId>
+					<artifactId>eclipse-jarsigner-plugin</artifactId>
+					<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>
 					<groupId>org.eclipse.tycho</groupId>
@@ -311,6 +332,7 @@
 			</build>
 		</profile>
 
+
 		<!-- Stable release profile. Takes +30min. Eclipse servers only -->
 		<profile>
 			<id>sign</id>
@@ -320,13 +342,11 @@
 					<value>true</value>
 				</property>
 			</activation>
-			<!-- Pack200 -->
 			<build>
 				<plugins>
 					<plugin>
 						<groupId>org.eclipse.cbi.maven.plugins</groupId>
 						<artifactId>eclipse-jarsigner-plugin</artifactId>
-						<version>${jarSigner.version}</version>
 						<executions>
 							<execution>
 								<id>sign</id>
diff --git a/releng/org.eclipse.papyrus.sysml16.product/application.entitlement b/releng/org.eclipse.papyrus.sysml16.product/application.entitlement
new file mode 100755
index 0000000..6fdb9d3
--- /dev/null
+++ b/releng/org.eclipse.papyrus.sysml16.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>
\ No newline at end of file
diff --git a/releng/org.eclipse.papyrus.sysml16.product/pom.xml b/releng/org.eclipse.papyrus.sysml16.product/pom.xml
index 5875120..32a7aeb 100644
--- a/releng/org.eclipse.papyrus.sysml16.product/pom.xml
+++ b/releng/org.eclipse.papyrus.sysml16.product/pom.xml
@@ -22,6 +22,7 @@
 			<plugin>
 				<groupId>org.eclipse.tycho</groupId>
 				<artifactId>tycho-p2-repository-plugin</artifactId>
+				<version>${tycho.version}</version>
 				<configuration>
 					<includeAllDependencies>true</includeAllDependencies>
 				</configuration>
@@ -33,13 +34,13 @@
 				<configuration>
 					<profile>org.eclipse.papyrus.sysml</profile>
 					<formats>
-						<linux>zip</linux>
+						<linux>tar.gz</linux>
 						<macosx>tar.gz</macosx>
 					</formats>
 					<products>
 						<product>
 							<id>${product-id}</id>
-							<rootFolder>papyrusSysML1.6</rootFolder>
+							<rootFolder>papyrusSysML16</rootFolder>
 						</product>
 					</products>
 				</configuration>
@@ -55,9 +56,58 @@
 						<goals>
 							<goal>archive-products</goal>
 						</goals>
+						<phase>pre-integration-test</phase>
 					</execution>
 				</executions>
 			</plugin>
+
 		</plugins>
 	</build>
+
+	<profiles>
+		<profile>
+			<id>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>papyrusSysML16.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>papyrusSysML16.exe,eclipsec.exe</fileNames>
+						</configuration>
+						<executions>
+							<execution>
+								<phase>package</phase>
+								<goals>
+									<goal>sign</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>
 </project>
\ No newline at end of file