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

	<build>
		<plugins>
			<plugin>
				<groupId>io.sarl.maven</groupId>
				<artifactId>sarl-maven-plugin</artifactId>
				<!-- Maven extension mechanism seems not working due to the tycho module type.
				     The different goals must be explicitly provided. -->
				<executions>
					<execution>
						<id>sarl-compiler-init</id>
						<phase>initialize</phase>
						<goals>
							<goal>initialize</goal>
						</goals>
					</execution>
					<execution>
						<id>sarl-compiler-compile</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
					<execution>
						<id>sarl-compiler-clean</id>
						<phase>clean</phase>
						<goals>
							<goal>clean</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<tycho>true</tycho>
					<source>${compiler.level}</source>
					<target>${compiler.level}</target>
					<encoding>${project.build.sourceEncoding}</encoding>
					<input>src/</input>
					<output>src-gen/</output>
					<runJavaCompiler>true</runJavaCompiler>
					<generateInlines>true</generateInlines>
					<generateStorageFiles>true</generateStorageFiles>
					<generateTraceFiles>true</generateTraceFiles>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<configuration>
					<sourceDirectories>
						<sourceDirectory>src</sourceDirectory>
					</sourceDirectories>
				</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</source>
									<source>${project.basedir}/src-gen</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>
