Merge remote-tracking branch 'origin/master' into newfeat_globalanalysis
diff --git a/analysis/common/releng/org.polarsys.esf.analysis.common.releng/feature.properties b/analysis/common/releng/org.polarsys.esf.analysis.common.releng/feature.properties
index 2f27033..44f665e 100644
--- a/analysis/common/releng/org.polarsys.esf.analysis.common.releng/feature.properties
+++ b/analysis/common/releng/org.polarsys.esf.analysis.common.releng/feature.properties
@@ -1,6 +1,6 @@
-featureName = ESF Common Analysis Tools 
+featureName = ESF Common Analysis Tools (Mandatory) (Incubation)
 providerName = PolarSys
-description = Common Analysis feature of ESF. (Incubation)
+description = Common Analysis feature of ESF (Mandatory). (Incubation)
 copyright=\
 Copyright (c) 2016 ALL4TEC & CEA LIST.\n\
 All rights reserved. This program and the accompanying materials\n\
diff --git a/analysis/fmea/profile/org.polarsys.esf.fmea.profile.service.types/pom.xml b/analysis/fmea/profile/org.polarsys.esf.fmea.profile.service.types/pom.xml
index 59818eb..54773b2 100644
--- a/analysis/fmea/profile/org.polarsys.esf.fmea.profile.service.types/pom.xml
+++ b/analysis/fmea/profile/org.polarsys.esf.fmea.profile.service.types/pom.xml
@@ -17,14 +17,14 @@
   
   <parent>
     <groupId>org.polarsys.esf</groupId>
-    <artifactId>esf-tools.analysis.localanalysis.profile</artifactId>
+    <artifactId>esf-tools.analysis.fmea.profile</artifactId>
     <version>0.7.0-SNAPSHOT</version>
   </parent>
   
   <groupId>org.polarsys.esf</groupId>
   <artifactId>org.polarsys.esf.fmea.profile.service.types</artifactId>
   <packaging>eclipse-plugin</packaging>
-  <name>ESFLocalAnalysis Profile Service Types</name>
-  <description>ESFLocalAnalysis Profile Service Types description.</description>
+  <name>ESFFMEA Profile Service Types</name>
+  <description>ESFFMEA Profile Service Types description.</description>
 
 </project>
\ No newline at end of file
diff --git a/analysis/fmea/releng/org.polarsys.esf.fmea.releng/feature.properties b/analysis/fmea/releng/org.polarsys.esf.fmea.releng/feature.properties
index 409ae4c..014439a 100644
--- a/analysis/fmea/releng/org.polarsys.esf.fmea.releng/feature.properties
+++ b/analysis/fmea/releng/org.polarsys.esf.fmea.releng/feature.properties
@@ -1,4 +1,4 @@
-featureName = ESF FMEA
+featureName = ESF FMEA (Incubation)
 providerName = PolarSys
 description = FMEA feature of ESF. (Incubation)
 copyright=\
diff --git a/analysis/localanalysis/releng/org.polarsys.esf.localanalysis.releng/feature.properties b/analysis/localanalysis/releng/org.polarsys.esf.localanalysis.releng/feature.properties
index a22de89..8abb55c 100644
--- a/analysis/localanalysis/releng/org.polarsys.esf.localanalysis.releng/feature.properties
+++ b/analysis/localanalysis/releng/org.polarsys.esf.localanalysis.releng/feature.properties
@@ -1,4 +1,4 @@
-featureName = ESF Local Analysis
+featureName = ESF Local Analysis (Incubation)
 providerName = PolarSys
 description = Local Analysis feature of ESF. (Incubation)
 copyright=\
diff --git a/p2/category.xml b/p2/category.xml
index 8d0c781..fec6968 100644
--- a/p2/category.xml
+++ b/p2/category.xml
@@ -1,15 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <site>
-  <feature id="org.polarsys.esf.analysis.common.releng" version="0.7.0.qualifier">
-    <category name="org.polarsys.esf.tools.category"/>
-  </feature>
-  <feature id="org.polarsys.esf.localanalysis.releng" version="0.7.0.qualifier">
-    <category name="org.polarsys.esf.tools.category"/>
-  </feature>
-  <feature id="org.polarsys.esf.fmea.releng" version="0.7.0.qualifier">
-    <category name="org.polarsys.esf.tools.category"/>
-  </feature>
-  <category-def name="org.polarsys.esf.tools.category" label="ESF Tools Category">
-    <description>ESF Tools Category</description>
-  </category-def>
+    <feature id="org.polarsys.esf.analysis.common.releng" version="0.7.0.qualifier">
+      <category name="org.polarsys.esf.tools.category"/>
+   </feature>
+   <feature id="org.polarsys.esf.localanalysis.releng" version="0.7.0.qualifier">
+      <category name="org.polarsys.esf.tools.category"/>
+   </feature>
+   <feature id="org.polarsys.esf.fmea.releng" version="0.7.0.qualifier">
+      <category name="org.polarsys.esf.tools.category"/>
+   </feature>
+   <category-def name="org.polarsys.esf.tools.category" label="Eclipse Safety Framework (ESF) Tools">
+      <description>
+         ESF Tools Category
+      </description>
+   </category-def>
 </site>
diff --git a/pom.xml b/pom.xml
index c7ac8ec..64e35c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,7 +54,7 @@
       <url>http://download.eclipse.org/releases/neon</url>
     </repository>
   </repositories>
-   
+    
   <!-- BUILD DEFINITION -->
   <build>
     <plugins>
@@ -130,13 +130,124 @@
     </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>
+      
+	  <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>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>org.eclipse.cbi.maven.plugins</groupId>
+              <artifactId>eclipse-jarsigner-plugin</artifactId>
+              <version>${jarsigner-version}</version>
+            </plugin>
+          </plugins>    
+        </pluginManagement>
+        
+        <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>
+      <activation>
+        <property>
+            <name>SIGN</name>
+            <value>true</value>
+        </property>
+      </activation>
+    </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>