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

	<groupId>be.uantwerpen.ansymo.semanticadaptation</groupId>
	<artifactId>parent</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<packaging>pom</packaging>


	<!-- the mavenization is based on this approach https://github.com/xtext/maven-xtext-example -->
	<modules>
		<module>be.uantwerpen.ansymo.semanticadaptation.testframework</module>
		<module>be.uantwerpen.ansymo.semanticadaptation</module>
		<module>be.uantwerpen.ansymo.semanticadaptation.tests</module>
		<module>be.uantwerpen.ansymo.semanticadaptation.ide</module>
		<module>be.uantwerpen.ansymo.semanticadaptation.ui</module>
		<module>be.uantwerpen.ansymo.semanticadaptation.cg.cpp</module>
	  <module>be.uantwerpen.ansymo.semanticadaptation.cg.cpp.tests</module>
		<!--module>../my.mavenized.herolanguage.ui</module>
				<module>../my.mavenized.herolanguage.tests</module>
				<module>../my.mavenized.herolanguage.sdk</module>
				<module>../my.mavenized.herolanguage.updatesite</module-->
	</modules>

	<properties>
		<tycho-version>1.0.0</tycho-version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<xtext.version>2.11.0</xtext.version>

		<main.basedir>${project.basedir}</main.basedir>
	</properties>

	<repositories>
		<repository>
			<id>eclipse</id>
			<layout>p2</layout>
			<url>http://download.eclipse.org/releases/neon</url>
		</repository>
		<repository>
			<id>Xtext Update Site</id>
			<layout>p2</layout>
			<!--url>http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/</url-->
			<url>http://download.eclipse.org/modeling/tmf/xtext/updates/releases/${xtext.version}/</url>
		</repository>


		<!--repository>
				<id>mvn</id>
				<url>http://mvnrepository.com/artifact</url>
			</repository-->

		</repositories>
		<build>
			<pluginManagement>
				<plugins>

					<!-- Configure the compiler for all Overture Projects -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.5.1</version>
						<configuration>
							<source>1.8</source>
							<target>1.8</target>
						</configuration>
					</plugin>





					<!-- xtend-maven-plugin is in pluginManagement instead of in plugins 
							 so that it doesn't run before the exec-maven-plugin's *.mwe2 gen; this way 
							 we can list it after. -->

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

							<xtendAsPrimaryDebugSource>true</xtendAsPrimaryDebugSource>
							<!--outputDirectory>${project.build.directory}/xtend-gen/main</outputDirectory-->
							<testOutputDirectory>${project.build.directory}/xtend-gen/test</testOutputDirectory>
							<writeTraceFiles>true</writeTraceFiles>


							<outputDirectory>xtend-gen</outputDirectory>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-clean-plugin</artifactId>
						<version>2.5</version>
						<executions>
							<execution>
								<id>gen-clean</id>
								<goals>
									<goal>clean</goal>
								</goals>
								<configuration>
									<filesets>
										<fileset>
											<directory>${basedir}/xtend-gen</directory>
										</fileset>
									</filesets>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</pluginManagement>

			<plugins>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-maven-plugin</artifactId>
					<version>${tycho-version}</version>
					<extensions>true</extensions>
				</plugin>
			</plugins>
		</build>
	</project>
