<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.2.0</version>

	<name>SARL Agent Oriented Programming Language</name>
	<url>${sarl.url}</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>
		<!-- Build ID Format (used in Eclipse about dialog) -->
		<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
		<buildId>${maven.build.timestamp}</buildId>
		<!-- Version of the Xtext API -->
		<xtext.version>2.8.1</xtext.version>
		<xtext.versionRange>[2.8.1,2.8.2)</xtext.versionRange>
		<!-- Version of the Jnario PI -->
		<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>
		<!-- Year of the release of SARL (used in Eclipse about, license management and documentation) -->
		<year>2015</year>
		<!-- URL of the SARL project (use in POM, Eclipse about and documentation) -->
		<sarl.url>http://www.sarl.io</sarl.url>
		<!-- Default encoding of the source files -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- JRE Configuration -->
		<compiler.level>1.7</compiler.level>
		<!-- Path to the root directory  -->
		<main.basedir>${project.basedir}</main.basedir>
		<!-- String to put after the copyright sign  -->
		<copyrighters>Sebastian RODRIGUEZ, Nicolas GAUD, Stephane GALLAND</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>${sarl.url}</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>


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

	<dependencyManagement>
		<!-- The dependencies are inside the submodules for avoiding to propagate 
			the dependency information outside a specific module -->
	</dependencyManagement>

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

	<build>
		<pluginManagement>
			<!-- The other plugin configurations are inside the submodules
			     for avoiding to propagate the information outside a
			     specific module -->

			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.3</version>
					<configuration>
						<source>${compiler.level}</source>
						<target>${compiler.level}</target>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.10.2</version>
				</plugin>

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

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

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

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

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

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

				<plugin>
					<groupId>org.codehaus.gmaven</groupId>
					<artifactId>groovy-maven-plugin</artifactId>
					<version>2.0</version>
				</plugin>

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

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.18.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-checkstyle-plugin</artifactId>
					<version>2.15</version>
					<executions>
						<execution>
							<phase>process-classes</phase>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<configLocation>${main.basedir}/checkstyle/checkstyle.xml</configLocation>
						<suppressionsLocation>${main.basedir}/checkstyle/suppressions.xml</suppressionsLocation>
						<headerLocation>${main.basedir}/checkstyle/ClassHeader.txt</headerLocation>
						<enableRSS>true</enableRSS>
						<linkXRef>true</linkXRef>
						<consoleOutput>true</consoleOutput>
						<failsOnError>true</failsOnError>
						<failOnViolation>true</failOnViolation>
						<includeResources>false</includeResources>
						<includeTestSourceDirectory>false</includeTestSourceDirectory>
						<includeTestResources>false</includeTestResources>
						<enableRulesSummary>true</enableRulesSummary>
						<propertyExpansion>main.basedir=${main.basedir}</propertyExpansion>
					</configuration>
				</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>

				<!-- 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.gmaven</groupId>
										<artifactId>groovy-maven-plugin</artifactId>
										<versionRange>[2.0,)</versionRange>
										<goals>
											<goal>execute</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-checkstyle-plugin</artifactId>
										<versionRange>[2.12.1,)</versionRange>
										<goals>
											<goal>check</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<!-- 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>
<!-- 								<resource> -->
<!-- 									<directory>${main.basedir}/licenses</directory> -->
<!-- 									<filtering>false</filtering> -->
<!-- 									<includes> -->
<!-- 										<include>LICENSE</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>${main.basedir}/licenses/NOTICE.template</noticeTemplate>
							<licenseMapping>
								<param>${main.basedir}/licenses/license-mappings-sarl.xml</param>
								<param>${main.basedir}/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>

			<!-- Compute additional version numbers for the SARL (specification, release, buildId) -->
			<plugin>
				<groupId>org.codehaus.gmaven</groupId>
				<artifactId>groovy-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>compute-sarl-version-properties</id>
						<phase>initialize</phase>
						<goals>
							<goal>execute</goal>
						</goals>
						<configuration>
							<source>
								now = session.getStartTime()

								// 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 =
										(new java.text.SimpleDateFormat("yyyyMMddHHmmss")).format(now)
									println("\tbuildId: "+ project.properties.buildId + " (reset for Hudson)")
								} else {
									println("\tbuildId: "+ project.properties.buildId)
								}

								snapshotTag = ""
								if (project.version.endsWith(snapshotTag)) {
									len = project.version.size() - snapshotTag.size()
									version = project.version.substring(0,len)
								}
								else {
									version = project.version
								}
								versionFields = version.split("\\.")
								project.properties.sarlspecificationreleaseversion = versionFields[0]+"."+versionFields[1]
								println("\tsarlspecificationreleaseversion: "+ project.properties.sarlspecificationreleaseversion)
								project.properties.sarlreleaseversion = project.properties.sarlspecificationreleaseversion+"."+versionFields[2]
								println("\tsarlreleaseversion: "+ project.properties.sarlreleaseversion)
								project.properties.sarlspecificationreleasedate =
									(new java.text.SimpleDateFormat("yyyy-MM-dd")).format(now)
								println("\tsarlspecificationreleasedate: "+ project.properties.sarlspecificationreleasedate)
							</source>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

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

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<!-- Parent configuration for tycho modules -->
				<module>tycho-parent</module>
				<!-- Eclipse features for SARL (SDK and IDE contributions) -->
				<module>features</module>
				<!-- Eclipse plugins -->
				<module>plugins</module>
				<!-- Testing suite -->
				<module>tests</module>
				<!-- Definition of the Eclipse platform, the products and the update sites -->
				<module>releng</module>
				<!-- Maven plugins and artifacts dedicated to SARL -->
				<module>maven</module>
				<!-- Documentation of SARL -->
				<module>docs</module>
			</modules>
		</profile>
		<profile>
			<id>release-tasks</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<modules>
				<!-- Parent configuration for tycho modules -->
				<module>tycho-parent</module>
				<!-- Eclipse plugins -->
				<module>plugins</module>
				<!-- Maven plugins and artifacts dedicated to SARL -->
				<module>maven</module>
			</modules>
			<build>
				<plugins>
					<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>
						<configuration>
							<sourcepath>${project.basedir}/src/;${project.basedir}/src-gen;${project.basedir}/xtend-gen;</sourcepath>
							<docencoding>${project.build.sourceEncoding}</docencoding>
							<encoding>${project.build.sourceEncoding}</encoding>
							<charset>${project.build.sourceEncoding}</charset>
							<show>protected</show>
							<detectLinks>true</detectLinks>
							<detectJavaApiLink>true</detectJavaApiLink>
							<links>
								<link>http://download.eclipse.org/modeling/tmf/xtext/javadoc/2.7.0/</link>
							</links>
							<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>
							<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>
							</tags>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.arakhne.afc.maven</groupId>
						<artifactId>tag-replacer</artifactId>
						<version>11.0</version>
						<executions>
							<execution>
								<id>update-source-tags</id>
								<phase>process-sources</phase>
								<goals>
									<goal>generatereplacesrc</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

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

	<developers>
		<developer>
			<id>srodriguez</id>
			<name>Sebastian Rodriguez</name>
			<email>srodriguez@citat.org.ar</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>
				IRTES-SET -
				Universit&amp;eacute; de
				Technologie de
				Belfort-Montba&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>
				IRTES-SET -
				Universit&amp;eacute; de
				Technologie de
				Belfort-Montba&amp;eacute;liard
			</organization>
			<organizationUrl>http://www.multiagent.fr</organizationUrl>
			<roles>
				<role>Co-founder</role>
				<role>Architect</role>
				<role>Developer</role>
			</roles>
		</developer>
	</developers>

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

</project>
