<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>

	<groupId>io.sarl</groupId>
	<artifactId>io.sarl</artifactId>
	<version>0.4.2</version>

	<name>SARL Agent Oriented Programming Language</name>
	<url>${sarlUrl}</url>
	<inceptionYear>2014</inceptionYear>

	<packaging>pom</packaging>

	<description>SARL is a general-purpose agent-oriented language.
	SARL aims at providing the fundamental abstractions for dealing with concurrency,
	distribution, interaction, decentralization, reactivity, autonomy and dynamic
	reconfiguration.</description>

	<!-- ======================================= -->
	<!-- ==== Main properties === -->
	<!-- ======================================= -->

	<properties>

		<!-- Version of the Xtext API -->
		<sarl.version>0.4.2</sarl.version>
		<!-- Version of the Xtext API -->
		<xtext.version>2.10.0</xtext.version>
		<xtext.versionRange>[2.10.0,2.10.1)</xtext.versionRange><!-- For generating 
			a correct version range you need to create a range integrating ONLY the current 
			version and excluding all other possible versions especially the greater 
			ones -->
		<!-- Version of the Jnario API -->
		<jnario.version>1.0.0</jnario.version>
		<jnario.report.version>1.0.1</jnario.report.version>
		<!-- Version of the OSGi module that provides the NLS -->
		<osgi.nls.version>3.10.0-v20140606-1445</osgi.nls.version>
		<!-- Version of the Arakhne Foundation classes -->
		<afc.version>13.0</afc.version>
		<!-- Version of the Guava API -->
		<guava.version>18.0</guava.version>
		<!-- Version of the javax.inject module -->
		<javaxinject.version>1</javaxinject.version>
		<!-- Version of the Tycho module -->
		<tycho.version>0.26.0</tycho.version>

		<!-- Build ID Format (used in Eclipse about dialog) -->
		<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
		<buildId>${maven.build.timestamp}</buildId>
		<!-- Year of the release of SARL (used in Eclipse about, license management 
			and documentation) -->
		<year>2016</year>
		<!-- URL of the SARL project (use in POM, Eclipse about and documentation) -->
		<sarlUrl>http://www.sarl.io</sarlUrl>
		<!-- Default encoding of the source files -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- Java Configuration -->
		<compiler.level>1.8</compiler.level>
		<jre.environment>JavaSE-1.8</jre.environment>
		<!-- String to put after the copyright sign -->
		<copyrighters>the original authors or authors</copyrighters>
		<!-- URL of the Maven repositories of SARL (use in POM and documentation) -->
		<sarl.maven.repository.url>http://maven.sarl.io</sarl.maven.repository.url>
		<!-- Local path to the Maven repository -->
		<local.maven.repository.path>file:///var/www/sarl-maven-repository/</local.maven.repository.path>
		<!-- Local path to the P2 repository -->
		<local.p2.repository.path>file:///var/www/sarl-p2-repository/</local.p2.repository.path>
	</properties>

	<!-- ======================================= -->
	<!-- ==== Organization and License details === -->
	<!-- ======================================= -->

	<organization>
		<name>SARL Consortium</name>
		<url>${sarlUrl}</url>
	</organization>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<!-- ======================================= -->
	<!-- ==== Organization Information === -->
	<!-- ======================================= -->

	<developers>
		<developer>
			<id>srodriguez</id>
			<name>Sebastian Rodriguez</name>
			<email>sebastian.rodriguez@gitia.org</email>
			<url>http://gitia.org/members/sebastian-rodriguez/</url>
			<organization>
				Grupo de Investigaci&amp;oacute;n en Tecnolog&amp;iacute;as Inform&amp;aacute;ticas Avanzadas de Tucum&amp;aacute;n
			</organization>
			<organizationUrl>http://gitia.org/</organizationUrl>
			<roles>
				<role>Co-founder</role>
				<role>Architect</role>
				<role>Developer</role>
			</roles>
		</developer>
		<developer>
			<id>ngaud</id>
			<name>Nicolas Gaud</name>
			<email>nicolas.gaud@utbm.fr</email>
			<url>http://www.multiagent.fr/People:Gaud_nicolas</url>
			<organization>
				Universit&amp;eacute; de Bourgogne Franche-Comt&amp;eacute;.
				Universit&amp;eacute; de Technologie de Belfort-Montb&amp;eacute;liard.
			</organization>
			<organizationUrl>http://www.multiagent.fr</organizationUrl>
			<roles>
				<role>Co-founder</role>
				<role>Architect</role>
				<role>Developer</role>
			</roles>
		</developer>
		<developer>
			<id>sgalland</id>
			<name>St&amp;eacute;phane Galland</name>
			<email>stephane.galland@utbm.fr</email>
			<url>http://www.multiagent.fr/People:Galland_stephane</url>
			<organization>
				Universit&amp;eacute; de Bourgogne Franche-Comt&amp;eacute;.
				Universit&amp;eacute; de Technologie de Belfort-Montb&amp;eacute;liard.
			</organization>
			<organizationUrl>http://www.multiagent.fr</organizationUrl>
			<roles>
				<role>Co-founder</role>
				<role>Architect</role>
				<role>Developer</role>
			</roles>
		</developer>
	</developers>

	<contributors>
		<contributor>
			<name>Mohamed Ezzat</name>
			<email>mohamed.ezzat@devfactory.com</email>
			<url>https://github.com/m-ezzat</url>
			<roles>
				<role>Code cleaning and optimization</role>
			</roles>
		</contributor>
		<contributor>
			<name>J&amp;eacute;r&amp;eacute;mie Jost</name>
			<email>jeremiejost@gmail.com</email>
			<url>https://github.com/jjst</url>
			<roles>
				<role>Documentation Contributor</role>
			</roles>
		</contributor>
	</contributors>

	<!-- =================== -->
	<!-- ==== Deployment === -->
	<!-- =================== -->

	<distributionManagement>
		<repository>
			<id>local-release-repository</id>
			<url>${local.maven.repository.path}</url>
		</repository>
		<snapshotRepository>
			<id>local-repository</id>
			<url>${local.maven.repository.path}</url>
		</snapshotRepository>
	</distributionManagement>

	<!-- ==================== -->
	<!-- ==== Development === -->
	<!-- ==================== -->
	<scm>
		<connection>scm:git:git@github.com:sarl/sarl.git</connection>
		<developerConnection>scm:git:git@github.com:sarl/sarl.git</developerConnection>
		<url>git@github.com:sarl/sarl.git</url>
	</scm>

	<!-- ======================================= -->
	<!-- ==== Dependency Management === -->
	<!-- ======================================= -->

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.sarl.lang</groupId>
				<artifactId>io.sarl.lang.core</artifactId>
				<version>${sarl.version}</version>
			</dependency>
			<dependency>
				<groupId>io.sarl.lang</groupId>
				<artifactId>io.sarl.lang</artifactId>
				<version>${sarl.version}</version>
			</dependency>
			<dependency>
				<groupId>io.sarl</groupId>
				<artifactId>io.sarl.core</artifactId>
				<version>${sarl.version}</version>
			</dependency>
			<dependency>
				<groupId>io.sarl</groupId>
				<artifactId>io.sarl.util</artifactId>
				<version>${sarl.version}</version>
			</dependency>
			<dependency>
				<groupId>io.sarl.maven</groupId>
				<artifactId>io.sarl.maven.sdk</artifactId>
				<version>${sarl.version}</version>
			</dependency>
			<dependency>
				<groupId>io.sarl.maven</groupId>
				<artifactId>io.sarl.maven.batchcompiler</artifactId>
				<version>${sarl.version}</version>
			</dependency>
			<dependency>
				<groupId>io.sarl</groupId>
				<artifactId>io.sarl.tests.api</artifactId>
				<version>${sarl.version}</version>
			</dependency>
			<dependency>
				<groupId>io.sarl.lang</groupId>
				<artifactId>io.sarl.lang.tests</artifactId>
				<version>${sarl.version}</version>
			</dependency>
			<dependency>
				<groupId>io.sarl</groupId>
				<artifactId>io.sarl.eclipse</artifactId>
				<version>${sarl.version}</version>
			</dependency>
			<dependency>
				<groupId>io.sarl</groupId>
				<artifactId>io.sarl.lang.sarlc</artifactId>
				<version>${sarl.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.xtext</groupId>
				<artifactId>org.eclipse.xtext.xbase.lib</artifactId>
				<version>${xtext.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.xtend</groupId>
				<artifactId>org.eclipse.xtend.core</artifactId>
				<version>${xtext.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.xtext</groupId>
				<artifactId>xtext-maven-plugin</artifactId>
				<version>${xtext.version}</version>
			</dependency>
			<dependency>
				<groupId>javax.inject</groupId>
				<artifactId>javax.inject</artifactId>
				<version>${javaxinject.version}</version>
			</dependency>
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>${guava.version}</version>
			</dependency>
			<dependency>
				<groupId>org.jnario</groupId>
				<artifactId>report</artifactId>
				<version>${jnario.report.version}</version>
			</dependency>
			<dependency>
				<groupId>org.jnario</groupId>
				<artifactId>org.jnario.standalone</artifactId>
				<version>${jnario.version}</version>
			</dependency>
			<dependency>
				<groupId>org.arakhne.afc.core</groupId>
				<artifactId>vmutils</artifactId>
				<version>${afc.version}</version>
			</dependency>
			<dependency>
				<groupId>org.arakhne.afc.core</groupId>
				<artifactId>util</artifactId>
				<version>${afc.version}</version>
			</dependency>
			<dependency>
				<groupId>com.google.inject</groupId>
				<artifactId>guice</artifactId>
				<version>4.0</version>
			</dependency>
			<dependency>
				<groupId>com.google.inject.extensions</groupId>
				<artifactId>guice-multibindings</artifactId>
				<version>4.0</version>
			</dependency>
			<dependency>
				<groupId>commons-cli</groupId>
				<artifactId>commons-cli</artifactId>
				<version>1.3.1</version>
			</dependency>
			<dependency>
				<groupId>com.hazelcast</groupId>
				<artifactId>hazelcast</artifactId>
				<version>3.7</version>
			</dependency>
			<dependency>
				<groupId>org.zeromq</groupId>
				<artifactId>jeromq</artifactId>
				<version>0.3.5</version>
			</dependency>
			<dependency>
				<groupId>com.google.code.gson</groupId>
				<artifactId>gson</artifactId>
				<version>2.4</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugin-tools</groupId>
				<artifactId>maven-plugin-annotations</artifactId>
				<version>3.4</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-core</artifactId>
				<version>3.3.9</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<version>3.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.5.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.eclipse</groupId>
				<artifactId>osgi</artifactId>
				<version>${osgi.nls.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.shared</groupId>
				<artifactId>maven-verifier</artifactId>
				<version>1.6</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-plugin-api</artifactId>
				<version>3.3.9</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>2.0.111-beta</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<!-- ======================================= -->
	<!-- ==== Plugins Building Management === -->
	<!-- ======================================= -->

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.5.1</version>
					<configuration>
						<source>${compiler.level}</source>
						<target>${compiler.level}</target>
						<testSource>${compiler.level}</testSource>
						<testTarget>${compiler.level}</testTarget>
						<encoding>${project.build.sourceEncoding}</encoding>
						<showDeprecation>false</showDeprecation>
						<showWarnings>false</showWarnings>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>1.12</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.0.2</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.2</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.8</version>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>wagon-maven-plugin</artifactId>
					<version>1.0</version>
				</plugin>

				<plugin>
					<groupId>org.codehaus.gmavenplus</groupId>
					<artifactId>gmavenplus-plugin</artifactId>
					<version>1.5</version>
				</plugin>

				<plugin>
					<groupId>com.google.code.maven-replacer-plugin</groupId>
					<artifactId>replacer</artifactId>
					<version>1.5.3</version>
				</plugin>

				<plugin>
					<groupId>sh.tak.appbundler</groupId>
					<artifactId>appbundle-maven-plugin</artifactId>
					<version>1.2.0</version>
				</plugin>

				<plugin>
					<groupId>org.arakhne.afc.maven</groupId>
					<artifactId>tag-replacer</artifactId>
					<version>${afc.version}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.19.1</version>
				</plugin>

				<plugin>
					<groupId>org.jasig.maven</groupId>
					<artifactId>maven-notice-plugin</artifactId>
					<version>1.0.6.1</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-plugin-plugin</artifactId>
					<version>3.4</version>
					<executions>
						<execution>
							<id>generated-helpmojo</id>
							<goals>
								<goal>helpmojo</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>com.akathist.maven.plugins.launch4j</groupId>
					<artifactId>launch4j-maven-plugin</artifactId>
					<version>1.7.12</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>2.17</version>
					<executions>
						<execution>
							<phase>process-classes</phase>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<!-- config is inside one of the dependencies -->
						<configLocation>/checkstyle/sarl/checkstyle.xml</configLocation>
						<!-- force absolute path of the config file -->
						<propertyExpansion>${checkstyle.config_loc}</propertyExpansion>
						<consoleOutput>true</consoleOutput>
						<detail>true</detail>
						<failsOnError>true</failsOnError>
						<failOnViolation>true</failOnViolation>
						<includeResources>false</includeResources>
						<includeTestSourceDirectory>false</includeTestSourceDirectory>
						<includeTestResources>false</includeTestResources>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>io.sarl</groupId>
							<artifactId>build-tools</artifactId>
							<version>${sarl.version}</version>
						</dependency>
						<dependency>
							<groupId>com.puppycrawl.tools</groupId>
							<artifactId>checkstyle</artifactId>
							<version>6.19</version>
						</dependency>
					</dependencies>
				</plugin>

				<plugin>
					<groupId>org.eclipse.xtend</groupId>
					<artifactId>xtend-maven-plugin</artifactId>
					<version>${xtext.version}</version>
					<executions>
						<execution>
							<goals>
								<goal>compile</goal>
								<goal>xtend-install-debug-info</goal>
								<goal>testCompile</goal>
								<goal>xtend-test-install-debug-info</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<outputDirectory>xtend-gen</outputDirectory>
						<source>${compiler.level}</source>
						<target>${compiler.level}</target>
						<encoding>${project.build.sourceEncoding}</encoding>
						<xtendAsPrimaryDebugSource>true</xtendAsPrimaryDebugSource>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.eclipse.xtext</groupId>
					<artifactId>xtext-maven-plugin</artifactId>
					<version>${xtext.version}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.10.4</version>
					<configuration>
						<docencoding>${project.build.sourceEncoding}</docencoding>
						<encoding>${project.build.sourceEncoding}</encoding>
						<charset>${project.build.sourceEncoding}</charset>
						<show>protected</show>
						<detectLinks>true</detectLinks>
						<detectJavaApiLink>true</detectJavaApiLink>
						<docfilessubdirs>true</docfilessubdirs>
						<excludePackageNames></excludePackageNames>
						<breakiterator>true</breakiterator>
						<version>true</version>
						<author>true</author>
						<keywords>true</keywords>
						<useStandardDocletOptions>true</useStandardDocletOptions>
						<excludePackageNames></excludePackageNames>
						<bottom>&lt;small&gt;Copyright &amp;copy; ${year}
							${copyrighters}.
						</bottom>
						<groups>
							<group>
								<title>SARL Language</title>
								<packages>io.sarl.lang:io.sarl.lang.core:io.sarl.lang.annotation:io.sarl.lang.scoping.batch:io.sarl.lang.util</packages>
							</group>
							<group>
								<title>Standard Development Kit</title>
								<packages>io.sarl.core:io.sarl.util</packages>
							</group>
						</groups>
						<tags>
							<tag>
								<name>mavengroupid</name>
								<placement>pt</placement>
								<head>Maven Group Id:</head>
							</tag>
							<tag>
								<name>mavenartifactid</name>
								<placement>pt</placement>
								<head>Maven Artifact Id:</head>
							</tag>
							<tag>
								<name>fires</name>
								<placement>mc</placement>
								<head>Fired Events:</head>
							</tag>
							<tag>
								<name>generated</name>
								<placement>a</placement>
								<head>Generated element</head>
							</tag>
							<tag>
								<name>model</name>
								<placement>a</placement>
								<head>Model element</head>
							</tag>
							<tag>
								<name>optionalparam</name>
								<placement>X</placement>
							</tag>
						</tags>
					</configuration>
				</plugin>

				<!-- This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.google.code.maven-replacer-plugin</groupId>
										<artifactId>replacer</artifactId>
										<versionRange>[1.5.3,)</versionRange>
										<goals>
											<goal>replace</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.codehaus.gmavenplus</groupId>
										<artifactId>gmavenplus-plugin</artifactId>
										<versionRange>[1.5,)</versionRange>
										<goals>
											<goal>execute</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-plugin-plugin</artifactId>
										<versionRange>[3.3,)</versionRange>
										<goals>
											<goal>descriptor</goal>
											<goal>helpmojo</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute></execute>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<!-- Compute additional version numbers for the SARL (specification, release, 
				buildId) -->
			<plugin>
				<groupId>org.codehaus.gmavenplus</groupId>
				<artifactId>gmavenplus-plugin</artifactId>
				<executions>
					<execution>
						<id>compute-sarl-properties</id>
						<phase>initialize</phase>
						<goals>
							<goal>execute</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<scripts>
						<script><![CDATA[
							def now = session.getStartTime();
							//************************
							// Detect root directory
							def currentDirectory = project.basedir;
							def previousDirectory = null;
				            def fileObj = new File(currentDirectory, "pom.xml");
							while (fileObj.isFile()) {
								previousDirectory = currentDirectory;
								currentDirectory = fileObj.getParent();
								currentDirectory = new File(currentDirectory).getParent();
					            fileObj = new File(currentDirectory, "pom.xml");
						    }
						    if (previousDirectory == null || !(new File(previousDirectory, "pom.xml").isFile())) {
						    	throw new Exception("Unable to detect root directory");
						    }
						    project.properties["mainbasedir"] = previousDirectory;
						    log.info("set mainbasedir to: " + project.properties["mainbasedir"]);
							//************************
							// Compute version and snapshot tag
							def snapshotTag = "-SNAPSHOT";
							def version;
							def releaseStatus;
							def isSnapshot;
							def endOfVersion;
							def p2UploadToDir;
							def projectVersion = project.properties["sarl.version"]
							def isDevelVersion = projectVersion.endsWith(snapshotTag)
							if (isDevelVersion) {
								def len = projectVersion.size() - snapshotTag.size();
								version = projectVersion.substring(0, len);
								releaseStatus = "Draft Release";
								isSnapshot = true;
								endOfVersion = snapshotTag;
								p2UploadToDir = "/snapshots/"+version+"/R"+project.properties["buildId"]
							} else {
								version = projectVersion;
								releaseStatus = "Stable Release";
								isSnapshot = false;
								endOfVersion = "";
								p2UploadToDir = "/releases/"+version
							}
							versionFields = version.split("\\.");
							//************************
							// Set SARL properties
							project.properties["sarl.specification.release_version"] = versionFields[0] + "." + versionFields[1];
							project.properties["sarl.release_version"] = project.properties["sarl.specification.release_version"] + "." + versionFields[2];
							if (isDevelVersion) {
								project.properties["sarl.release_version.osgi"] = project.properties["sarl.release_version"]+".qualifier";
							} else {
								project.properties["sarl.release_version.osgi"] = project.properties["sarl.release_version"];
							}
							project.properties["sarl.release_version.maven"] = project.properties["sarl.release_version"]+endOfVersion;
							project.properties["sarl.specification.release_date"] = (new java.text.SimpleDateFormat("yyyy-MM-dd")).format(now);
							project.properties["sarl.specification.release_status"] = releaseStatus;
							project.properties["sarl.is_stable_version"] = Boolean.toString(!isSnapshot);
							project.properties["janus.version"] = versionFields[0]+"."+versionFields[1]+"."+versionFields[2]+endOfVersion;
							project.properties["janus.release_version"] = "2."+versionFields[0]+"."+versionFields[1]+"."+versionFields[2];
							project.properties["janus.version2"] = "2."+project.properties["janus.version"];

							log.info("set sarl.specification.release_version to: " + project.properties["sarl.specification.release_version"]);
							log.info("set sarl.release_version to: " + project.properties["sarl.release_version"]);
							log.info("set sarl.release_version.osgi to: " + project.properties["sarl.release_version.osgi"]);
							log.info("set sarl.release_version.maven to: " + project.properties["sarl.release_version.maven"]);
							log.info("set sarl.specification.release_date to: " + project.properties["sarl.specification.release_date"]);
							log.info("set sarl.specification.release_status to: " + project.properties["sarl.specification.release_status"]);
							log.info("set sarl.is_stable_version to: " + project.properties["sarl.is_stable_version"]);
							log.info("set janus.version to: " + project.properties["janus.version"]);
							log.info("set janus.release_version to: " + project.properties["janus.release_version"]);
							log.info("set janus.version2 to: " + project.properties["janus.version2"]);
							//************************
							// Bug in Jenkins/Hudson
							// The buildId property is not correctly set since
							// "maven.build.timestamp" is skipped by Jenkins/Hudson.
							if (project.properties["buildId"] == "\${maven.build.timestamp}"
								|| project.properties["buildId"] == "\$maven.build.timestamp") {
								project.properties["buildId"] = (new java.text.SimpleDateFormat("yyyyMMddHHmmss")).format(now);
								log.info("reset buildId to: " + project.properties["buildId"]);
							}
							//************************
							// P2 properties
							project.properties["p2UploadToDir"] = p2UploadToDir;
							log.info("set p2UploadToDir to: " + project.properties["p2UploadToDir"]);
							//************************
							// Set Checkstyle properties
						    def config_loc = project.properties["mainbasedir"];
						    ["build-tools", "src", "main", "resources", "checkstyle", "sarl"].each {
						    	config_loc = new File(config_loc, it);
						    }
						    project.properties["checkstyle.config_loc"] = "config_loc=" + config_loc.getAbsolutePath() + File.separator;
						    log.info("set checkstyle.config_loc to: " + project.properties["checkstyle.config_loc"]);
						]]></script>
					</scripts>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.codehaus.groovy</groupId>
						<artifactId>groovy-all-minimal</artifactId>
						<version>1.5.8</version>
					</dependency>
				</dependencies>
			</plugin>


			<!-- Automatic creation of the Jar archive with the source code inside. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Copy the licencing files into the target folder. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-license-resources</id>
						<phase>validate</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<encoding>${project.build.sourceEncoding}</encoding>
							<outputDirectory>${project.basedir}/target/classes/META-INF</outputDirectory>
							<resources>
								<resource>
									<directory>${project.basedir}</directory>
									<filtering>true</filtering>
									<includes>
										<include>NOTICE</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Generating the licencing files. -->
			<plugin>
				<groupId>org.jasig.maven</groupId>
				<artifactId>maven-notice-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>check</goal>
							<goal>generate</goal>
						</goals>
						<configuration>
							<generateChildNotices>true</generateChildNotices>
							<noticeTemplate>${mainbasedir}/build-tools/licenses/NOTICE.template</noticeTemplate>
							<licenseMapping>
								<param>${mainbasedir}/build-tools/licenses/license-mappings-sarl.xml</param>
								<param>${mainbasedir}/build-tools/licenses/license-mappings.xml</param>
							</licenseMapping>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Remove temporary folders created by testing modules. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<executions>
					<execution>
						<id>clean-temp-workspace</id>
						<phase>clean</phase>
						<goals>
							<goal>clean</goal>
						</goals>
						<configuration>
							<filesets>
								<fileset>
									<directory>workspace</directory>
								</fileset>
							</filesets>
						</configuration>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>

	<!-- ======================================= -->
	<!-- ==== Profile configuration === -->
	<!-- ======================================= -->

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<!-- Tools for building the project -->
				<module>build-tools</module>
				<!-- The shared Rtcho configuration -->
				<module>tycho-parent</module>
				<!-- SARL tools and plugins -->
				<module>eclipse-sarl</module>
				<!-- Maven tools -->
				<module>maven</module>
				<!-- Tools for developers -->
				<module>dev-tools</module>
				<!-- External Tests -->
				<module>tests</module>
				<!-- SREs -->
				<module>sre</module>
				<!-- Products aand update site -->
				<module>eclipse-products</module>
				<!-- Documentation -->
				<module>docs</module>
			</modules>
		</profile>
		<profile>
			<id>public-sarl-api-module-set</id>
			<activation>
				<property>
					<name>publicSarlApiModuleSet</name>
					<value>true</value>
				</property>
			</activation>
			<modules>
				<module>tycho-parent</module>
				<module>eclipse-sarl</module>
				<module>maven</module>
				<module>sre</module>
			</modules>
		</profile>
		<profile>
			<id>release-tasks</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.arakhne.afc.maven</groupId>
						<artifactId>tag-replacer</artifactId>
						<executions>
							<execution>
								<id>update-source-tags</id>
								<phase>process-sources</phase>
								<goals>
									<goal>generatereplacesrc</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
