<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.specsy</groupId>
        <artifactId>parent</artifactId>
        <version>2.1.0</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>

    <artifactId>specsy-scala-parent</artifactId>
    <packaging>pom</packaging>

    <dependencies>

        <dependency>
            <groupId>org.specsy</groupId>
            <artifactId>specsy-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.specsy</groupId>
            <artifactId>specsy-core</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <!-- TODO: remove this boostrap when Jumi can run the examples without it -->
        <dependency>
            <groupId>fi.jumi</groupId>
            <artifactId>jumi-launcher</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Scala -->

        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-compiler</artifactId>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <sourceDirectory>../specsy-scala-parent/src/main/java</sourceDirectory>
        <testSourceDirectory>../specsy-scala-parent/src/test/java</testSourceDirectory>

        <plugins>

            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>scala-compile-first</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>scala-test-compile</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>sonatype-oss-release</id>
            <build>
                <plugins>

                    <plugin>
                        <groupId>net.alchim31.maven</groupId>
                        <artifactId>scala-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>doc-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

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

</project>
