<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>org.cruxframework</groupId>
	<artifactId>crux-parent</artifactId>
	<packaging>pom</packaging>
	<name>Crux Parent</name>
	<version>1.0.2</version>
	<description>Crux Framework parent POM</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<javadoc.dir>${basedir}/javadoc</javadoc.dir>
		<java.target.version>1.7</java.target.version>
		<java.source.version>1.7</java.source.version>
	</properties>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
		<relativePath>org.sonatype.oss:oss-parent</relativePath>
	</parent>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	
	<developers>
		<developer>
			<id>thiago</id>
			<name>Thiago da Rosa de Bustamante</name>
			<email>thiago@cruxframework.org</email>
		</developer>
		<developer>
			<id>gesse</id>
			<name>Gessé Dafé</name>
			<email>gesse@cruxframework.org</email>
		</developer>
		<developer>
			<id>samuel</id>
			<name>Samuel Almeida Cardoso</name>
			<email>samuel@cruxframework.org</email>
		</developer>
		<developer>
			<id>alexandre.costa</id>
			<name>Alexandre Augusto de Souza Costa</name>
			<email>alexandre@triggolabs.org</email>
		</developer>
	</developers>

	<build>
		<resources>
			<resource>
				<directory>${basedir}/src/main/java</directory>
				<includes>
					<include>**/*.java</include>
				</includes>
			</resource>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
				<includes>
					<include>**/*</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>${java.source.version}</source>
					<target>${java.target.version}</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
	
	<profiles>
        <!-- Deploy at sonatype repository -->
        <profile>
            <id>sonatype_stage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <docencoding>${project.build.sourceEncoding}</docencoding>
                                    <charset>${project.build.sourceEncoding}</charset>
                                    <outputDirectory>${javadoc.dir}</outputDirectory>
                                    <overview>${javadoc.dir}/overview.html</overview>
                                    <source>${java.source.version}</source>
                                    <destDir></destDir>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- Crux (and Sysmap) repository -->
        <!-- *note: this setting has to be duplicated here (it is also in settings.xml) -->
        <profile>
            <id>profile-add-internal-repo-distribution-management</id>
            <distributionManagement>
                <repository>
                    <id>crux</id>
                    <name>Crux Internal Repository</name>
                    <url>${internal.repository}</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>
</project>