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

	<build>
		<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/</source>
								<source>src-gen/</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-gen</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>
					<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>
									<createOutputDirectory>true</createOutputDirectory>
									<outputDirectory>src-gen/</outputDirectory>
								</outputConfiguration>
							</outputConfigurations>
						</language>
					</languages>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>io.sarl.lang</groupId>
						<artifactId>io.sarl.lang</artifactId>
						<version>${project.version}</version>
						<exclusions>
							<exclusion>
								<groupId>*</groupId>
								<artifactId>*</artifactId>
							</exclusion>
						</exclusions>
					</dependency>
					<dependency>
						<groupId>io.sarl.lang</groupId>
						<artifactId>io.sarl.lang.core</artifactId>
						<version>${project.version}</version>
						<exclusions>
							<exclusion>
								<groupId>*</groupId>
								<artifactId>*</artifactId>
							</exclusion>
						</exclusions>
					</dependency>
					<dependency>
						<groupId>org.eclipse</groupId>
						<artifactId>osgi</artifactId>
						<version>${osgi.nls.version}</version>
					</dependency>
					<dependency>
						<groupId>org.eclipse.xtend</groupId>
						<artifactId>org.eclipse.xtend.core</artifactId>
						<version>${xtext.version}</version>
					</dependency>
				</dependencies>
			</plugin>

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

	<!-- ======================================= -->
	<!-- ==== Release Management === -->
	<!-- ======================================= -->
	<profiles>
		<profile>
			<id>default-profile</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.eclipse.tycho</groupId>
						<artifactId>tycho-source-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>maven-release-of-core-plugin</id>
			<activation>
				<property>
					<name>publicSarlApiModuleSet</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.arakhne.afc.maven</groupId>
							<artifactId>tag-replacer</artifactId>
							<configuration>
								<sources>
									<source>${project.basedir}/src-gen</source>
									<source>${project.basedir}/src</source>
								</sources>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-javadoc-plugin</artifactId>
							<configuration>
								<sourcepath>${project.build.directory}/generated-sources/java</sourcepath>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
	</profiles>

</project>
