Edit pom parent for setting profile "packAndSign".

Change-Id: Ib814df0fd9139a542d1cce28fe10bc73f613b094
diff --git a/pom.xml b/pom.xml
index c7ac8ec..b712f50 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,6 +54,20 @@
       <url>http://download.eclipse.org/releases/neon</url>
     </repository>
   </repositories>
+  
+  <pluginRepositories>
+        <pluginRepository>
+            <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>
+    </pluginRepositories>
    
   <!-- BUILD DEFINITION -->
   <build>
@@ -130,13 +144,94 @@
     </plugins>
   </build>
   
+  <profiles>
+    <!-- Profile for tasks specific to the build on Eclipse Hudson instance:
+        - packAndSign: produce a stable update site (Packed & signed). Used for releases (+ milestones) only.
+    -->
+    <profile>
+      <id>packAndSign</id>
+      <build>
+        
+        <plugins>
+        
+          <!-- Plugins configuration to be able to sign the jars built on Eclipse servers -->
+          <plugin>
+            <groupId>org.eclipse.tycho.extras</groupId>
+            <artifactId>tycho-pack200a-plugin</artifactId>
+            <version>${tycho-version}</version>
+            <executions>
+              <execution>
+                <id>pack200-normalize</id>
+                <goals>
+                  <goal>normalize</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+         
+          <plugin>
+            <groupId>org.eclipse.cbi.maven.plugins</groupId>
+            <artifactId>eclipse-jarsigner-plugin</artifactId>
+            <version>${jarsigner-version}</version>
+            <executions>
+              <execution>
+                <id>sign</id>
+                <goals>
+                  <goal>sign</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+  
+          <plugin>
+            <groupId>org.eclipse.tycho.extras</groupId>
+            <artifactId>tycho-pack200b-plugin</artifactId>
+            <version>${tycho-version}</version>
+            <executions>
+              <execution>
+                <id>pack200-pack</id>
+                <goals>
+                  <goal>pack</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+  
+          <!-- Make sure that Tycho generates its p2 metadata after the JAR has been packed -->
+          <plugin>
+            <groupId>org.eclipse.tycho</groupId>
+            <artifactId>tycho-p2-plugin</artifactId>
+            <version>${tycho-version}</version>
+            <executions>
+              <execution>
+                <id>attach-p2-metadata</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>p2-metadata</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <defaultP2Metadata>false</defaultP2Metadata>
+            </configuration>
+          </plugin>
+        
+        </plugins>
+      </build>
+    </profile>
+    
+ </profiles>
+ 
   <!-- PROPERTIES -->
   <properties>
     <!-- Product version displayed in the title bar, etc. -->
     <product.version>0.7.0</product.version>
     
     <!-- Tycho plugin version -->
-    <tycho-version>0.22.0</tycho-version>
+    <tycho-version>0.24.0</tycho-version>
+    
+    <!-- eclipse-jarsigner plugin version -->
+    <jarsigner-version>1.1.3</jarsigner-version>
       
     <!-- Enforce used of UTF encoding is mandatory. Otherwise, default platform encoding is used, and some issues appears with differents os constructions -->
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>