[releng] [oxygen] Update diagramtemplate configuration

- Add the possibility to build only this feature in order to publish it separately

Change-Id: I67f2b80e7ebb11beb21689dfa7ff69fdcf81eeba
Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
diff --git a/diagramtemplate/org.eclipse.papyrus.diagramtemplate.feature/feature.xml b/diagramtemplate/org.eclipse.papyrus.diagramtemplate.feature/feature.xml
index d828c5f..4467f76 100644
--- a/diagramtemplate/org.eclipse.papyrus.diagramtemplate.feature/feature.xml
+++ b/diagramtemplate/org.eclipse.papyrus.diagramtemplate.feature/feature.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><feature id="org.eclipse.papyrus.diagramtemplate.feature" label="Papyrus Diagram Template (Incubation)" provider-name="Eclipse Modeling Project" version="1.2.0.qualifier">
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<feature id="org.eclipse.papyrus.diagramtemplate.feature" label="Papyrus Diagram Template (Incubation)" provider-name="Eclipse Modeling Project" version="1.2.0.qualifier">
 
    <copyright url="http://www.eclipse.org/legal/epl-v10.html">
       Copyright (c) 2008-2012 CEA LIST, Atos Origin, Conselleria de
diff --git a/diagramtemplate/pom.xml b/diagramtemplate/pom.xml
index 2ddb967..2574791 100755
--- a/diagramtemplate/pom.xml
+++ b/diagramtemplate/pom.xml
@@ -18,4 +18,20 @@
 		<module>org.eclipse.papyrus.diagramtemplate.feature</module>
 	</modules>	
 	
+	<profiles>
+		<profile>
+	      <id>diagramtemplate</id>	
+	     
+		  <properties>
+			<targetplatform.groupId>org.eclipse.papyrus</targetplatform.groupId>
+			<targetplatform.artifactId>org.eclipse.papyrus.incubation.diagramtemplate.targetplatform</targetplatform.artifactId>
+			<targetplatform.version>1.2.0-SNAPSHOT</targetplatform.version>
+		  </properties>
+	            
+	      <modules>
+	      	<module>releng</module>
+	      </modules>
+	    </profile>
+	</profiles>
+	
 </project>
\ No newline at end of file
diff --git a/diagramtemplate/releng/org.eclipse.papyrus.incubation.diagramtemplate.p2/.project b/diagramtemplate/releng/org.eclipse.papyrus.incubation.diagramtemplate.p2/.project
new file mode 100755
index 0000000..0a79233
--- /dev/null
+++ b/diagramtemplate/releng/org.eclipse.papyrus.incubation.diagramtemplate.p2/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.papyrus.incubation.p2</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/diagramtemplate/releng/org.eclipse.papyrus.incubation.diagramtemplate.p2/category.xml b/diagramtemplate/releng/org.eclipse.papyrus.incubation.diagramtemplate.p2/category.xml
new file mode 100755
index 0000000..6a086ef
--- /dev/null
+++ b/diagramtemplate/releng/org.eclipse.papyrus.incubation.diagramtemplate.p2/category.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+  <feature url="features/org.eclipse.papyrus.diagramtemplate.feature_1.2.0.qualifier.jar" id="org.eclipse.papyrus.diagramtemplate.feature" version="1.2.0.qualifier">
+      <category name="org.eclipse.papyrus.incubation.category"/>
+   </feature>
+   <feature url="features/org.eclipse.papyrus.diagramtemplate.feature.source_1.2.0.qualifier.jar" id="org.eclipse.papyrus.diagramtemplate.feature" version="1.2.0.qualifier">
+      <category name="org.eclipse.papyrus.incubation.category"/>
+   </feature>
+  
+  <category-def name="org.eclipse.papyrus.incubation.category" label="Papyrus Incubation">
+      <description>
+         Papyrus Incubation features
+      </description>
+   </category-def>
+</site>
diff --git a/diagramtemplate/releng/org.eclipse.papyrus.incubation.diagramtemplate.p2/pom.xml b/diagramtemplate/releng/org.eclipse.papyrus.incubation.diagramtemplate.p2/pom.xml
new file mode 100755
index 0000000..1f81291
--- /dev/null
+++ b/diagramtemplate/releng/org.eclipse.papyrus.incubation.diagramtemplate.p2/pom.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.eclipse.papyrus</groupId>
+		<artifactId>org.eclipse.papyrus.diagramtemplate.releng</artifactId>		
+		<version>1.2.0-SNAPSHOT</version>
+	</parent>
+	
+	<artifactId>org.eclipse.papyrus.incubation.diagramtemplate.p2</artifactId>
+	<packaging>eclipse-repository</packaging>
+	
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-deploy-plugin</artifactId>
+				<version>2.8.2</version>
+				<configuration>
+					<skip>true</skip>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>
\ No newline at end of file
diff --git a/diagramtemplate/releng/pom.xml b/diagramtemplate/releng/pom.xml
new file mode 100755
index 0000000..1529fe9
--- /dev/null
+++ b/diagramtemplate/releng/pom.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<parent>
+		<groupId>org.eclipse.papyrus</groupId>
+		<artifactId>org.eclipse.papyrus.diagramtemplate.parent</artifactId>		
+		<version>1.2.0-SNAPSHOT</version>
+	</parent>
+	
+	<artifactId>org.eclipse.papyrus.diagramtemplate.releng</artifactId>
+	<packaging>pom</packaging>
+	
+	<modules>
+		<module>targetplatform</module>
+		<module>org.eclipse.papyrus.incubation.diagramtemplate.p2</module>
+	</modules>	
+	
+</project>
\ No newline at end of file
diff --git a/diagramtemplate/releng/promote/diagramtemplate.sh b/diagramtemplate/releng/promote/diagramtemplate.sh
new file mode 100755
index 0000000..3ca154a
--- /dev/null
+++ b/diagramtemplate/releng/promote/diagramtemplate.sh
@@ -0,0 +1,258 @@
+#Based upon Gef4 publish.sh script
+
+#causes the shell to exit if any subcommand or pipeline returns a non-zero status.
+#set -e
+
+# Script may take 5-6 command line parameters:
+# $1: Hudson job name: <name>
+# $2: Hudson build id: <id>
+# $3: Build type: i(ntegration), s(table), r(elease)
+# $4: The release label used to label the drop files, e.g. 3.10.0 or 3.10.1
+# $5: The eclipse target version, e.g. mars or neon
+# $6: Override if exists
+# $7: An optional release label suffix to be appended to drop files name, e.g. M1, RC1 
+
+##Additional variables to specify for each project
+
+#The root url that enables to find the job with ${hudsonJobRootUrl}/$jobName/$buildNumber
+hudsonJobRootUrl="https://hudson.eclipse.org/papyrus/job"
+
+#The name of the tool
+repo="incubation"
+subRepo="diagramtemplate"
+updates="updates"
+drops="downloads/drops"
+
+#The specific localization
+remoteRoot="/home/data/httpd/download.eclipse.org"
+papyrusRoot="modeling/mdt/papyrus"
+remoteUpdateSiteRoot=${remoteRoot}/${papyrusRoot}/${repo}
+remoteUpdateSite=${remoteUpdateSiteRoot}/${subRepo}
+remoteUpdateSiteDir=${remoteUpdateSite}/${updates}
+echo "remoteUpdateSiteDir: $remoteUpdateSiteDir"
+
+#The localization of the local build target
+targetResults="archive/${subRepo}/releng/org.eclipse.papyrus.${repo}.${subRepo}.p2/target/repository"
+echo "targetResults: $targetResults"
+
+#The rcpPrompote.sh script may be used to publish the Incubation build results. 
+#if [ $# -eq 6 -o $# -eq 7  ];
+#then
+#	jobName=$1
+jobName="Papyrus-Incubation-DiagramTemplate"
+	echo "jobName: $jobName"
+#	buildNumber=$2
+buildNumber="4"
+	echo "buildNumber: $buildNumber"
+#	releaseType=$3
+releaseType="i"
+	echo "releaseType: $releaseType"
+#	releaseLabel=$4	
+releaseLabel="1.2.0"
+	echo "releaseLabel: $releaseLabel"
+#	eclipseTarget=$5
+eclipseTarget="oxygen"	
+	echo "eclipseTarget: $eclipseTarget"
+#	override=$6	
+override="y"
+	echo "override: $override"
+
+	if [ -n "$7" ];
+	then
+		releaseLabelSuffix=$7
+		echo "releaseLabelSuffix: $releaseLabelSuffix"
+	fi
+#else
+#	echo "Missing so parameters: command jobName buildNumber releaseType releaseLabel eclipseTarget override [releaseLabelSuffix]"
+#	exit 1;
+#fi
+
+###########jobName parameter###########
+if [ -z "$jobName" ];
+then
+	echo "The Hudson job you want to promote must be specified"
+	exit 1
+fi
+
+###########buildNumber parameter###########
+if [ -z "$buildNumber" ];
+then
+	echo "The id of the $jobName build you want to promote must be specified"
+	exit 1
+fi
+
+###########releaseType parameter###########
+if [ -z "$releaseType" ];
+then
+    echo "The type of build you want to publish to [i(integration), s(table), r(elease)]."
+    exit;
+fi
+echo "Publishing as $releaseType build"
+
+###########releaseLabel parameter###########
+if [ -z "$releaseLabel" ];
+then
+    echo "The release label (e.g. 3.10.0, 3.10.1M2) must be specified."
+    exit 1
+fi
+echo "Release label: $releaseLabel"
+
+###########eclipseTarget parameter###########
+if [ -z "$eclipseTarget" ];
+then
+    echo "The Eclipse target (e.g. mars, neon) must be specified."
+    exit 1
+fi
+echo "Eclipse target : $eclipseTarget"
+
+###########Override parameter###########
+if [ "$override" != y -a "$override" != n ];
+then
+	echo "Parameter override has to 'y'(es) or 'n'(o) but was: $override"
+    exit 0
+fi
+
+if [ "$override" == "y" ];
+then
+	echo "Will override the previous artifacts if found"
+else
+	echo "Will not override the previous arifacts if found"
+fi
+
+########### Compute local build results using buildNumber ###########
+if [ "$buildNumber" = "lastStable" -o "$buildNumber" = "lastSuccessful" ];
+then
+	# Reverse lookup the build id (in case lastSuccessful or lastStable was used)
+	for i in $(find ~/.hudson/jobs/$jobName/builds/ -type l)
+	do
+		if [ "$(readlink -f $i)" = "$(readlink -f ~/.hudson/jobs/$jobName/$buildNumber)" ];
+		then
+			buildNumber=${i##*/}
+		fi
+	done
+	echo "Reverse lookup (lastStable/lastSuccessful) yielded buildNumber: $buildNumber"
+fi
+
+echo "~/.hudson/jobs/${jobName}/builds/${buildNumber}"
+jobDir=$(readlink -f ~/.hudson/jobs/${jobName}/builds/${buildNumber})
+if ! [ -d $jobDir ];
+then
+	echo "The specified buildNumber does not refer to an existing build: $buildNumber"
+	exit 1
+fi
+
+localResults=${jobDir}/${targetResults}
+echo "localResults: ${localResults}"
+
+########### Promote Job ###########
+destination=$remoteUpdateSiteDir/$eclipseTarget/${releaseLabel}${releaseLabelSuffix}
+echo "Destination: $destination"
+
+if [ "$override" == "n" ];
+then
+	if [ -d $destination ];
+	then
+		if [ "$(ls -A ${destination})" ];
+		then
+			echo "The destination is not empty. You may consider overriding or archiving"
+			exit 1
+		fi
+	fi
+fi
+
+if [ "$override" == "y" ];
+then
+	if [ -d $destination ];
+	then
+		echo "Overriding the RCP by cleaning the $destination folder"
+		rm -rf ${destination}/*
+	fi
+fi
+
+#Go to the artifact directory
+cd $localResults
+echo "Promoting the Job to $destination"
+#No error if exists, makes parent directories as needed
+mkdir -p $destination
+
+#Copy the contents onto the temp folder and change the permissions
+cp -R * $destination
+
+
+########### Update composites ###########
+# TODO update composite root ./eclipseTarget/* and parent ./*
+echo "Update Composites"
+timestamp=$(date +%s000)
+
+# This function indents the text with two white spaces
+indent() {
+sed 's/^/  /';
+}
+
+# This function is used to generate the composites
+function updateComposites() {
+cat > "compositeArtifacts.xml" <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<repository name="Papyrus" type="org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository" version="1.0.0">
+  <properties size="1">
+    <property name="p2.timestamp" value="$1"/>
+  </properties>
+  <children size="$2">
+$(	
+for file in *; do 
+if [ -d $file ]; then 
+    printf "<child location='${file}'/>" | indent | indent
+fi
+done
+)
+  </children>
+</repository>
+EOF
+
+cat > "compositeContent.xml" <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<repository name="Papyrus" type="org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository" version="1.0.0">
+  <properties size="1">
+    <property name="p2.timestamp" value="$1"/>
+  </properties>
+  <children size="$2">
+$(	
+for file in *; do 
+if [ -d $file ]; then 
+    printf "<child location='${file}'/>" | indent | indent
+fi
+done
+)
+  </children>
+</repository>
+EOF
+}
+
+echo "Update root composites: $remoteUpdateSite"
+cd $remoteUpdateSite
+childrenCount=$(find . -maxdepth 1 -type d  \( ! -iname ".*" \) | wc -l)
+updateComposites $timestamp $childrenCount
+
+echo "Update eclipseTarget composites: $remoteUpdateSiteDir"
+cd $remoteUpdateSiteDir
+childrenCount=$(find . -maxdepth 1 -type d  \( ! -iname ".*" \) | wc -l)
+updateComposites $timestamp $childrenCount
+
+echo "Update releaseLabel composites: $remoteUpdateSiteDir/$eclipseTarget"
+cd $remoteUpdateSiteDir/$eclipseTarget
+childrenCount=$(find . -maxdepth 1 -type d  \( ! -iname ".*" \) | wc -l)
+updateComposites $timestamp $childrenCount
+
+
+########### Set Access Rights ###########
+
+# This function sets the acess rights to allow all memebers of the group to edit the files
+function setAccessRights() {
+	chmod -R 775 "$1"
+	chgrp -hR modeling.mdt.papyrus "$1"
+}
+echo "Set access right -R: $remoteUpdateSiteDir"
+setAccessRights $remoteUpdateSiteDir
+
+
+echo "publishing done."
\ No newline at end of file
diff --git a/diagramtemplate/releng/targetplatform/eclipse/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform.target b/diagramtemplate/releng/targetplatform/eclipse/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform.target
new file mode 100755
index 0000000..4fbb1a0
--- /dev/null
+++ b/diagramtemplate/releng/targetplatform/eclipse/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform.target
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde?>
+<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
+<target name="Diagram Template - Oxygen" sequenceNumber="1498378130">
+  <locations>
+    <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+      <unit id="org.eclipse.core.runtime" version="0.0.0"/>
+      <unit id="org.eclipse.emf.ecore" version="0.0.0"/>
+      <unit id="org.eclipse.emf.edit" version="0.0.0"/>
+      <unit id="org.eclipse.core.resources" version="0.0.0"/>
+      <unit id="org.eclipse.emf.ecore.xmi" version="0.0.0"/>
+      <unit id="org.eclipse.emf.edit.ui" version="0.0.0"/>
+      <unit id="org.eclipse.ui.ide" version="0.0.0"/>
+      <unit id="org.eclipse.uml2.uml" version="0.0.0"/>
+      <unit id="org.eclipse.uml2.uml.edit" version="0.0.0"/>
+      <unit id="org.eclipse.papyrus.editor" version="0.0.0"/>
+      <unit id="org.eclipse.gmf.runtime.diagram.ui.actions" version="0.0.0"/>
+      <unit id="org.eclipse.papyrus.uml.diagram.wizards" version="0.0.0"/>
+      <repository location="file:/home/data/httpd/download.eclipse.org/releases/oxygen/"/>
+    </location>
+  </locations>
+</target>
diff --git a/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/.project b/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/.project
new file mode 100755
index 0000000..7477ea0
--- /dev/null
+++ b/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.papyrus.incubation.targetplatform.oxygen</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform.target b/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform.target
new file mode 100755
index 0000000..71de2c7
--- /dev/null
+++ b/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform.target
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde?>
+<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
+<target name="Diagram Template - Oxygen" sequenceNumber="1498378130">
+  <locations>
+    <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+      <unit id="org.eclipse.core.runtime" version="0.0.0"/>
+      <unit id="org.eclipse.emf.ecore" version="0.0.0"/>
+      <unit id="org.eclipse.emf.edit" version="0.0.0"/>
+      <unit id="org.eclipse.core.resources" version="0.0.0"/>
+      <unit id="org.eclipse.emf.ecore.xmi" version="0.0.0"/>
+      <unit id="org.eclipse.emf.edit.ui" version="0.0.0"/>
+      <unit id="org.eclipse.ui.ide" version="0.0.0"/>
+      <unit id="org.eclipse.uml2.uml" version="0.0.0"/>
+      <unit id="org.eclipse.uml2.uml.edit" version="0.0.0"/>
+      <unit id="org.eclipse.papyrus.editor" version="0.0.0"/>
+      <unit id="org.eclipse.gmf.runtime.diagram.ui.actions" version="0.0.0"/>
+      <unit id="org.eclipse.papyrus.uml.diagram.wizards" version="0.0.0"/>
+      <repository location="http://download.eclipse.org/releases/oxygen/"/>
+    </location>
+  </locations>
+</target>
diff --git a/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform.tpd b/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform.tpd
new file mode 100755
index 0000000..1b0ed34
--- /dev/null
+++ b/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform.tpd
@@ -0,0 +1,17 @@
+target "Diagram Template - Oxygen" with source requirements
+
+location "http://download.eclipse.org/releases/oxygen/" {
+ org.eclipse.core.runtime lazy
+ org.eclipse.emf.ecore lazy
+ org.eclipse.emf.edit lazy
+ org.eclipse.core.resources lazy
+ org.eclipse.emf.ecore.xmi lazy
+ org.eclipse.emf.edit.ui lazy
+ org.eclipse.ui.ide lazy
+ org.eclipse.uml2.uml lazy
+ org.eclipse.uml2.uml.edit lazy
+ org.eclipse.papyrus.editor lazy
+ org.eclipse.gmf.runtime.diagram.ui.actions lazy
+ org.eclipse.papyrus.uml.diagram.wizards lazy
+}
+
diff --git a/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/pom.xml b/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/pom.xml
new file mode 100755
index 0000000..43e45b1
--- /dev/null
+++ b/diagramtemplate/releng/targetplatform/org.eclipse.papyrus.incubation.diagramtemplate.targetplatform/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.eclipse.papyrus</groupId>
+		<artifactId>org.eclipse.papyrus.diagramtemplate.releng.targetplatform</artifactId>		
+		<version>1.2.0-SNAPSHOT</version>
+	</parent>	
+	
+	<artifactId>org.eclipse.papyrus.incubation.diagramtemplate.targetplatform</artifactId>
+	<packaging>eclipse-target-definition</packaging>
+	
+</project>
\ No newline at end of file
diff --git a/diagramtemplate/releng/targetplatform/pom.xml b/diagramtemplate/releng/targetplatform/pom.xml
new file mode 100755
index 0000000..a4f90f2
--- /dev/null
+++ b/diagramtemplate/releng/targetplatform/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<parent>
+		<groupId>org.eclipse.papyrus</groupId>
+		<artifactId>org.eclipse.papyrus.diagramtemplate.releng</artifactId>		
+		<version>1.2.0-SNAPSHOT</version>
+	</parent>
+	
+	<artifactId>org.eclipse.papyrus.diagramtemplate.releng.targetplatform</artifactId>
+	<packaging>pom</packaging>
+	
+	<modules>
+		<module>org.eclipse.papyrus.incubation.diagramtemplate.targetplatform</module>
+	</modules>
+	
+</project>
\ No newline at end of file
diff --git a/dsml.validation/releng/promote/dsmlvalidation.sh b/dsml.validation/releng/promote/dsmlvalidation.sh
new file mode 100755
index 0000000..f08777a
--- /dev/null
+++ b/dsml.validation/releng/promote/dsmlvalidation.sh
@@ -0,0 +1,258 @@
+#Based upon Gef4 publish.sh script
+
+#causes the shell to exit if any subcommand or pipeline returns a non-zero status.
+#set -e
+
+# Script may take 5-6 command line parameters:
+# $1: Hudson job name: <name>
+# $2: Hudson build id: <id>
+# $3: Build type: i(ntegration), s(table), r(elease)
+# $4: The release label used to label the drop files, e.g. 3.10.0 or 3.10.1
+# $5: The eclipse target version, e.g. mars or neon
+# $6: Override if exists
+# $7: An optional release label suffix to be appended to drop files name, e.g. M1, RC1 
+
+##Additional variables to specify for each project
+
+#The root url that enables to find the job with ${hudsonJobRootUrl}/$jobName/$buildNumber
+hudsonJobRootUrl="https://hudson.eclipse.org/papyrus/job"
+
+#The name of the tool
+repo="incubation"
+subRepo="dsml.validation"
+updates="updates"
+drops="downloads/drops"
+
+#The specific localization
+remoteRoot="/home/data/httpd/download.eclipse.org"
+papyrusRoot="modeling/mdt/papyrus"
+remoteUpdateSiteRoot=${remoteRoot}/${papyrusRoot}/${repo}
+remoteUpdateSite=${remoteUpdateSiteRoot}/${subRepo}
+remoteUpdateSiteDir=${remoteUpdateSite}/${updates}
+echo "remoteUpdateSiteDir: $remoteUpdateSiteDir"
+
+#The localization of the local build target
+targetResults="archive/${subRepo}/releng/org.eclipse.papyrus.${repo}.${subRepo}.p2/target/repository"
+echo "targetResults: $targetResults"
+
+#The rcpPrompote.sh script may be used to publish the Incubation build results. 
+#if [ $# -eq 6 -o $# -eq 7  ];
+#then
+#	jobName=$1
+jobName="Papyrus-Incubation-DsmlValidation"
+	echo "jobName: $jobName"
+#	buildNumber=$2
+buildNumber="4"
+	echo "buildNumber: $buildNumber"
+#	releaseType=$3
+releaseType="i"
+	echo "releaseType: $releaseType"
+#	releaseLabel=$4	
+releaseLabel="1.2.0"
+	echo "releaseLabel: $releaseLabel"
+#	eclipseTarget=$5
+eclipseTarget="oxygen"	
+	echo "eclipseTarget: $eclipseTarget"
+#	override=$6	
+override="y"
+	echo "override: $override"
+
+	if [ -n "$7" ];
+	then
+		releaseLabelSuffix=$7
+		echo "releaseLabelSuffix: $releaseLabelSuffix"
+	fi
+#else
+#	echo "Missing so parameters: command jobName buildNumber releaseType releaseLabel eclipseTarget override [releaseLabelSuffix]"
+#	exit 1;
+#fi
+
+###########jobName parameter###########
+if [ -z "$jobName" ];
+then
+	echo "The Hudson job you want to promote must be specified"
+	exit 1
+fi
+
+###########buildNumber parameter###########
+if [ -z "$buildNumber" ];
+then
+	echo "The id of the $jobName build you want to promote must be specified"
+	exit 1
+fi
+
+###########releaseType parameter###########
+if [ -z "$releaseType" ];
+then
+    echo "The type of build you want to publish to [i(integration), s(table), r(elease)]."
+    exit;
+fi
+echo "Publishing as $releaseType build"
+
+###########releaseLabel parameter###########
+if [ -z "$releaseLabel" ];
+then
+    echo "The release label (e.g. 3.10.0, 3.10.1M2) must be specified."
+    exit 1
+fi
+echo "Release label: $releaseLabel"
+
+###########eclipseTarget parameter###########
+if [ -z "$eclipseTarget" ];
+then
+    echo "The Eclipse target (e.g. mars, neon) must be specified."
+    exit 1
+fi
+echo "Eclipse target : $eclipseTarget"
+
+###########Override parameter###########
+if [ "$override" != y -a "$override" != n ];
+then
+	echo "Parameter override has to 'y'(es) or 'n'(o) but was: $override"
+    exit 0
+fi
+
+if [ "$override" == "y" ];
+then
+	echo "Will override the previous artifacts if found"
+else
+	echo "Will not override the previous arifacts if found"
+fi
+
+########### Compute local build results using buildNumber ###########
+if [ "$buildNumber" = "lastStable" -o "$buildNumber" = "lastSuccessful" ];
+then
+	# Reverse lookup the build id (in case lastSuccessful or lastStable was used)
+	for i in $(find ~/.hudson/jobs/$jobName/builds/ -type l)
+	do
+		if [ "$(readlink -f $i)" = "$(readlink -f ~/.hudson/jobs/$jobName/$buildNumber)" ];
+		then
+			buildNumber=${i##*/}
+		fi
+	done
+	echo "Reverse lookup (lastStable/lastSuccessful) yielded buildNumber: $buildNumber"
+fi
+
+echo "~/.hudson/jobs/${jobName}/builds/${buildNumber}"
+jobDir=$(readlink -f ~/.hudson/jobs/${jobName}/builds/${buildNumber})
+if ! [ -d $jobDir ];
+then
+	echo "The specified buildNumber does not refer to an existing build: $buildNumber"
+	exit 1
+fi
+
+localResults=${jobDir}/${targetResults}
+echo "localResults: ${localResults}"
+
+########### Promote Job ###########
+destination=$remoteUpdateSiteDir/$eclipseTarget/${releaseLabel}${releaseLabelSuffix}
+echo "Destination: $destination"
+
+if [ "$override" == "n" ];
+then
+	if [ -d $destination ];
+	then
+		if [ "$(ls -A ${destination})" ];
+		then
+			echo "The destination is not empty. You may consider overriding or archiving"
+			exit 1
+		fi
+	fi
+fi
+
+if [ "$override" == "y" ];
+then
+	if [ -d $destination ];
+	then
+		echo "Overriding the RCP by cleaning the $destination folder"
+		rm -rf ${destination}/*
+	fi
+fi
+
+#Go to the artifact directory
+cd $localResults
+echo "Promoting the Job to $destination"
+#No error if exists, makes parent directories as needed
+mkdir -p $destination
+
+#Copy the contents onto the temp folder and change the permissions
+cp -R * $destination
+
+
+########### Update composites ###########
+# TODO update composite root ./eclipseTarget/* and parent ./*
+echo "Update Composites"
+timestamp=$(date +%s000)
+
+# This function indents the text with two white spaces
+indent() {
+sed 's/^/  /';
+}
+
+# This function is used to generate the composites
+function updateComposites() {
+cat > "compositeArtifacts.xml" <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<repository name="Papyrus" type="org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository" version="1.0.0">
+  <properties size="1">
+    <property name="p2.timestamp" value="$1"/>
+  </properties>
+  <children size="$2">
+$(	
+for file in *; do 
+if [ -d $file ]; then 
+    printf "<child location='${file}'/>" | indent | indent
+fi
+done
+)
+  </children>
+</repository>
+EOF
+
+cat > "compositeContent.xml" <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<repository name="Papyrus" type="org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository" version="1.0.0">
+  <properties size="1">
+    <property name="p2.timestamp" value="$1"/>
+  </properties>
+  <children size="$2">
+$(	
+for file in *; do 
+if [ -d $file ]; then 
+    printf "<child location='${file}'/>" | indent | indent
+fi
+done
+)
+  </children>
+</repository>
+EOF
+}
+
+echo "Update root composites: $remoteUpdateSite"
+cd $remoteUpdateSite
+childrenCount=$(find . -maxdepth 1 -type d  \( ! -iname ".*" \) | wc -l)
+updateComposites $timestamp $childrenCount
+
+echo "Update eclipseTarget composites: $remoteUpdateSiteDir"
+cd $remoteUpdateSiteDir
+childrenCount=$(find . -maxdepth 1 -type d  \( ! -iname ".*" \) | wc -l)
+updateComposites $timestamp $childrenCount
+
+echo "Update releaseLabel composites: $remoteUpdateSiteDir/$eclipseTarget"
+cd $remoteUpdateSiteDir/$eclipseTarget
+childrenCount=$(find . -maxdepth 1 -type d  \( ! -iname ".*" \) | wc -l)
+updateComposites $timestamp $childrenCount
+
+
+########### Set Access Rights ###########
+
+# This function sets the acess rights to allow all memebers of the group to edit the files
+function setAccessRights() {
+	chmod -R 775 "$1"
+	chgrp -hR modeling.mdt.papyrus "$1"
+}
+echo "Set access right -R: $remoteUpdateSiteDir"
+setAccessRights $remoteUpdateSiteDir
+
+
+echo "publishing done."
\ No newline at end of file
diff --git a/dsml.validation/releng/targetplatform/org.eclipse.papyrus.incubation.dsml.validation.targetplatform/org.eclipse.papyrus.incubation.dsml.validation.targetplatform.tpd b/dsml.validation/releng/targetplatform/org.eclipse.papyrus.incubation.dsml.validation.targetplatform/org.eclipse.papyrus.incubation.dsml.validation.targetplatform.tpd
index 1c842bc..bdd6dc8 100755
--- a/dsml.validation/releng/targetplatform/org.eclipse.papyrus.incubation.dsml.validation.targetplatform/org.eclipse.papyrus.incubation.dsml.validation.targetplatform.tpd
+++ b/dsml.validation/releng/targetplatform/org.eclipse.papyrus.incubation.dsml.validation.targetplatform/org.eclipse.papyrus.incubation.dsml.validation.targetplatform.tpd
@@ -1,6 +1,6 @@
-target "Papyrus Oxygen" with source requirements
+target "Dsml Validation - Oxygen" with source requirements
 
-location "http://download.eclipse.org/releases/oxygen/" eclipse-oxygen {
+location "http://download.eclipse.org/releases/oxygen/" {
 	org.eclipse.ui lazy
 	org.eclipse.uml2.types lazy
 	org.eclipse.uml2.uml lazy
diff --git a/dsml.validation/releng/targetplatform/pom.xml b/dsml.validation/releng/targetplatform/pom.xml
index 100823d..7f8f6ff 100755
--- a/dsml.validation/releng/targetplatform/pom.xml
+++ b/dsml.validation/releng/targetplatform/pom.xml
@@ -15,16 +15,4 @@
 		<module>org.eclipse.papyrus.incubation.dsml.validation.targetplatform</module>
 	</modules>
 	
-	<profiles>
-		<profile>
-			<id>dsml.validation</id>
-			<activation>
-				<activeByDefault>true</activeByDefault>
-			</activation>
-			<modules>
-				<module>org.eclipse.papyrus.incubation.dsml.validation.targetplatform</module>
-			</modules>
-		</profile>
-	</profiles>
-	
 </project>
\ No newline at end of file
diff --git a/releng/promote/dsmlvalidation.sh b/releng/promote/dsmlvalidation.sh
deleted file mode 100755
index 5afa0ac..0000000
--- a/releng/promote/dsmlvalidation.sh
+++ /dev/null
@@ -1,236 +0,0 @@
-#Based upon Gef4 publish.sh script
-
-#causes the shell to exit if any subcommand or pipeline returns a non-zero status.
-#set -e
-
-# Script may take 5-6 command line parameters:
-# $1: Hudson job name: <name>
-# $2: Hudson build id: <id>
-# $3: Build type: i(ntegration), s(table), r(elease)
-# $4: The release label used to label the drop files, e.g. 3.10.0 or 3.10.1
-# $5: The eclipse target version, e.g. mars or neon
-# $6: Override if exists
-# $7: An optional release label suffix to be appended to drop files name, e.g. M1, RC1 
-
-##Additional variables to specify for each project
-
-#The root url that enables to find the job with ${hudsonJobRootUrl}/$jobName/$buildId
-hudsonJobRootUrl="https://hudson.eclipse.org/papyrus/job"
-
-#The name of the tool
-repo="incubation"
-subRepo="dsml.validation"
-
-#The specific localization
-remoteRoot="/home/data/httpd/download.eclipse.org"
-remoteUpdateSiteRoot="modeling/mdt/papyrus"
-remoteUpdateSiteDir=${remoteRoot}/${remoteUpdateSiteRoot}/${repo}/${subRepo}
-echo "remoteUpdateSiteDir: $remoteUpdateSiteDir"
-
-#The localization of the local build target
-targetResults="archive/${subRepo}/releng/org.eclipse.papyrus.${repo}.${subRepo}.p2/target/repository"
-echo "targetResults: $targetResults"
-
-#The rcpPrompote.sh script may be used to publish the Incubation build results. 
-if [ $# -eq 6 -o $# -eq 7  ];
-then
-	jobName=$1
-	echo "jobName: $jobName"
-	buildId=$2
-	echo "buildId: $buildId"
-	buildType=$3
-	echo "buildType: $buildType"
-	releaseLabel=$4	
-	echo "releaseLabel: $releaseLabel"
-	eclipseTarget=$5	
-	echo "eclipseTarget: $eclipseTarget"
-	override=$6	
-	echo "override: $override"
-
-	if [ -n "$7" ];
-	then
-		releaseLabelSuffix=$7
-		echo "releaseLabelSuffix: $releaseLabelSuffix"
-	fi
-else
-	echo "Missing so parameters: command jobName buildId buildType releaseLabel eclipseTarget override [releaseLabelSuffix]"
-	exit 1;
-fi
-
-###########jobName parameter###########
-if [ -z "$jobName" ];
-then
-	echo "The Hudson job you want to promote must be specified"
-	exit 1
-fi
-
-###########buildId parameter###########
-if [ -z "$buildId" ];
-then
-	echo "The id of the $jobName build you want to promote must be specified"
-	exit 1
-fi
-
-###########buildType parameter###########
-if [ -z "$buildType" ];
-then
-    echo "The type of build you want to publish to [i(integration), s(table), r(elease)]."
-    exit;
-fi
-echo "Publishing as $buildType build"
-
-###########releaseLabel parameter###########
-if [ -z "$releaseLabel" ];
-then
-    echo "The release label (e.g. 3.10.0, 3.10.1M2) must be specified."
-    exit 1
-fi
-echo "Release label: $releaseLabel"
-
-###########eclipseTarget parameter###########
-if [ -z "$eclipseTarget" ];
-then
-    echo "The Eclipse target (e.g. mars, neon) must be specified."
-    exit 1
-fi
-echo "Eclipse target : $eclipseTarget"
-
-###########Override parameter###########
-if [ "$override" != y -a "$override" != n ];
-then
-	echo "Parameter override has to 'y'(es) or 'n'(o) but was: $override"
-    exit 0
-fi
-
-if [ "$override" == "y" ];
-then
-	echo "Will override the previous artifacts if found"
-else
-	echo "Will not override the previous arifacts if found"
-fi
-
-########### Compute local build results using buildId ###########
-if [ "$buildId" = "lastStable" -o "$buildId" = "lastSuccessful" ];
-then
-	# Reverse lookup the build id (in case lastSuccessful or lastStable was used)
-	for i in $(find ~/.hudson/jobs/$jobName/builds/ -type l)
-	do
-		if [ "$(readlink -f $i)" = "$(readlink -f ~/.hudson/jobs/$jobName/$buildId)" ];
-		then
-			buildId=${i##*/}
-		fi
-	done
-	echo "Reverse lookup (lastStable/lastSuccessful) yielded buildId: $buildId"
-fi
-
-echo "~/.hudson/jobs/${jobName}/builds/${buildId}"
-jobDir=$(readlink -f ~/.hudson/jobs/${jobName}/builds/${buildId})
-if ! [ -d $jobDir ];
-then
-	echo "The specified buildId does not refer to an existing build: $buildId"
-	exit 1
-fi
-
-localResults=${jobDir}/${targetResults}
-echo "localResults: ${localResults}"
-
-########### Promote Job ###########
-destination=$remoteUpdateSiteDir/$eclipseTarget/${releaseLabel}${releaseLabelSuffix}
-echo "Destination: $destination"
-
-if [ "$override" == "n" ];
-then
-	if [ -d $destination ];
-	then
-		if [ "$(ls -A ${destination})" ];
-		then
-			echo "The destination is not empty. You may consider overriding or archiving"
-			exit 1
-		fi
-	fi
-fi
-
-if [ "$override" == "y" ];
-then
-	if [ -d $destination ];
-	then
-		echo "Overriding the RCP by cleaning the $destination folder"
-		rm -rf ${destination}/*
-	fi
-fi
-
-cd $localResults
-tmpdir=$localResults/tmp
-#Clean if already exists
-rm -rf $tmpdir
-mkdir $tmpdir
-
-#Copy the contents onto the temp folder and change the permissions
-#cp -R * tmp
-rsync -av --exclude='$tmpdir' $localResults/* $tmpdir
-
-function setAccessRights() {
-	chmod -R 775 "$1"
-	chgrp -hR modeling.mdt.papyrus "$1"
-}
-
-setAccessRights "$tmpdir"
-
-#No error if exists, makes parent directories as needed
-mkdir -p $destination
-echo "Promoting the Job to $destination"
-mv $tmpdir/* $destination
-setAccessRights "$destination"
-
-# Clean up
-echo "Cleaning up"
-rm -rf $tmpdir
-
-########### Update composites ###########
-#updateSiteDir=
-#echo "updateSiteDir: $updateSiteDir"
-#cd $updateSiteDir
-
-function updateComposites() {
-childrenArray=()
-while IFS= read -r -d $'\0'; do
-	childrenArray+=("$REPLY")
-done < <(find . -maxdepth 1 -type d  \( ! -iname ".*" \))
-
-children=${find . -maxdepth 1 -type d  \( ! -iname ".*" \) | wc -l}
-timestamp=${date+%s000}
-
-cat > "compositeArtifacts.xml" <<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<repository name="Papyrus" type="org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository" version="1.0.0">
-  <properties size="1">
-    <property name="p2.timestamp" value="${timestamp}"/>
-  </properties>
-  <children size="${children}">
-    ${for file in *; do 
-		if [ -d $folder ]; then 
-		echo "<child location='${folder}'/>"
-		fi
-	done)	
-  </children>
-</repository>
-EOF
-
-cat > "compositeContent.xml" <<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<repository name="Papyrus" type="org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository" version="1.0.0">
-  <properties size="1">
-    <property name="p2.timestamp" value="$(timestamp)"/>
-  </properties>
-  <children size="${children}">
-    ${for file in *; do 
-		if [ -d $folder ]; then 
-		echo "<child location='${folder}'/>"
-		fi
-	done)	
-  </children>
-</repository>
-EOF
-}
-
-#updateComposites
\ No newline at end of file