<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>eu.verdelhan</groupId>
    <artifactId>ta4j-parent</artifactId>
    <version>0.7</version>
    <packaging>pom</packaging>

    <name>Ta4j Parent</name>
    <description>ta4j is a Java library providing a simple API for technical analysis.</description>
    <url>http://github.com/mdeverdelhan/ta4j</url>
    <inceptionYear>2014</inceptionYear>

    <developers>
        <developer>
            <name>Marc de Verdelhan</name>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>MIT License</name>
            <comments>All source code is under the MIT license.</comments>
        </license>
    </licenses>

    <issueManagement>
        <system>GitHub</system>
        <url>http://github.com/mdeverdelhan/ta4j/issues</url>
    </issueManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Nexus release repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <ciManagement>
        <url>http://travis-ci.org/mdeverdelhan/ta4j</url>
    </ciManagement>

    <scm>
        <connection>scm:git:git://github.com/mdeverdelhan/ta4j.git</connection>
        <developerConnection>scm:git:git@github.com:mdeverdelhan/ta4j.git</developerConnection>
        <url>http://github.com/mdeverdelhan/ta4j</url>
        <tag>ta4j-0.7</tag>
    </scm>

    <modules>
        <module>ta4j</module>
        <module>ta4j-examples</module>
    </modules>

    <properties>
        <!-- Encoding -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <profiles>

        <!-- Only when performing a release (i.e. not for snapshots) -->
        <profile>
            <id>sonatype-oss-release</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-no-fork</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>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Artifact signing -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>

    </profiles>

    <build>
        <plugins>
            
            <!-- Build source and target -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>
                </configuration>
            </plugin>

            <!-- License headers -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <header>LICENSE</header>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                </configuration>
            </plugin>

            <!-- Releases -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>ta4j-@{project.version}</tagNameFormat>
                    <!-- Avoid issue: http://jira.codehaus.org/browse/MGPG-9 -->
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <useReleaseProfile>false</useReleaseProfile>
                    <arguments>${arguments} -Psonatype-oss-release</arguments>
                </configuration>
            </plugin>

        </plugins>
    </build>

</project>
