<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>io.sarl</groupId>
		<artifactId>io.sarl.plugins</artifactId>
		<version>0.2.0</version>
	</parent>
	<artifactId>io.sarl.core</artifactId>
	<packaging>eclipse-plugin</packaging>
	<name>SDK Core Library</name>

	<properties>
		<!-- needed for checkstyle/findbugs and other plugins -->
		<main.basedir>${project.basedir}/../..</main.basedir>
	</properties>

	<build>
		<resources>
			<resource>
				<directory>src/main/sarl</directory>
				<includes>
					<include>**/*.sarl</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/main/sarl</source>
								<source>src/main/generated-sources/xtend/</source>
								<source>src/test/generated-sources/xtend/</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<executions>
					<execution>
						<phase>clean</phase>
						<goals>
							<goal>clean</goal>
						</goals>
						<configuration>
							<filesets>
								<fileset>
									<directory>src/main/generated-sources/xtend</directory>
								</fileset>
								<fileset>
									<directory>src/test/generated-sources/xtend</directory>
								</fileset>
							</filesets>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.eclipse.xtext</groupId>
				<artifactId>xtext-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<outputDirectory>xtend-gen</outputDirectory>
					<encoding>${project.build.sourceEncoding}</encoding>
					<compilerSourceLevel>${compiler.level}</compilerSourceLevel>
					<compilerTargetLevel>${compiler.level}</compilerTargetLevel>
					<failOnValidationError>true</failOnValidationError>
					<languages>
						<language>
							<setup>io.sarl.lang.SARLStandaloneSetup</setup>
							<outputConfigurations>
								<outputConfiguration>
									<outputDirectory>src/main/generated-sources/xtend/</outputDirectory>
								</outputConfiguration>
							</outputConfigurations>
						</language>
					</languages>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>io.sarl.lang</groupId>
						<artifactId>io.sarl.lang</artifactId>
						<version>${project.version}</version>
					</dependency>
					<dependency>
						<groupId>io.sarl.lang</groupId>
						<artifactId>io.sarl.lang.core</artifactId>
						<version>${project.version}</version>
					</dependency>
					<dependency>
						<groupId>org.eclipse</groupId>
						<artifactId>osgi</artifactId>
						<version>${osgi.nls.version}</version>
					</dependency>
				</dependencies>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<configuration>
					<sourceDirectory>src/main/java</sourceDirectory>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>
