<?xml version="1.0" encoding="UTF-8"?>
<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>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>org.technbolts</groupId>
    <artifactId>asciitech</artifactId>
    <version>0.0.5</version>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Arnauld Loyer</name>
            <email>arnauld.loyer@gmail.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:Arnauld/asciitech.git</connection>
        <developerConnection>scm:git:git@github.com:Arnauld/asciitech.git</developerConnection>
        <url>git@github.com:Arnauld/asciitech.git</url>
        <tag>HEAD</tag>
    </scm>

    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Properties -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <properties>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <junit.version>4.11</junit.version>
        <plantuml.version>7995</plantuml.version>
    </properties>

    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Dependencies -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <dependencies>
        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
        <!-- Parser -->
        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <dependency>
            <groupId>org.parboiled</groupId>
            <artifactId>parboiled-java</artifactId>
            <version>1.1.5</version>
        </dependency>

        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
        <!-- Ditaa -->
        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <dependency>
            <groupId>ditaa</groupId>
            <artifactId>ditaa</artifactId>
            <version>0.9</version>
            <scope>provided</scope>
        </dependency>

        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
        <!-- LaTeX -->
        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <dependency>
            <groupId>jlatexmath</groupId>
            <artifactId>jlatexmath</artifactId>
            <version>1.0.3</version>
            <scope>provided</scope>
        </dependency>

        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
        <!-- PlantUML -->
        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <dependency>
            <groupId>net.sourceforge.plantuml</groupId>
            <artifactId>plantuml</artifactId>
            <version>${plantuml.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
        <!-- GRAphing Library -->
        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <dependency>
            <groupId>de.erichseifert</groupId>
            <artifactId>gral</artifactId>
            <version>0.10</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>de.erichseifert</groupId>
            <artifactId>VectorGraphics2D</artifactId>
            <version>0.9.1</version>
            <scope>provided</scope>
        </dependency>

        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
        <!-- Commons -->
        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
            <scope>test</scope>
        </dependency>

        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
        <!-- Log -->
        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.5</version>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.0.9</version>
            <scope>test</scope>
        </dependency>

        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
        <!-- Test -->
        <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-assert</artifactId>
            <version>1.4</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- Build -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>**/*.properties</exclude>
                </excludes>
            </testResource>
        </testResources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerArgument>-Xlint:unchecked -Xlint:deprecation</compilerArgument>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.16</version>
                <configuration>
                    <excludes>
                        <!-- Sample can fail to illustrate some reporting behavior-->
                        <exclude>sample/**/*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</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.8.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/third-parties.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- PROFILES -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <profiles>
        <profile>
            <id>sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <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>
                        <configuration>
                            <keyname>9E5867B7</keyname>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- REPOSITORIES -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <repositories>
        <!-- embedded repo -->
        <repository>
            <id>project.local</id>
            <name>project</name>
            <url>file:${project.basedir}/repo</url>
        </repository>
    </repositories>
</project>