<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>

    <artifactId>firefly-example</artifactId>
    <packaging>jar</packaging>

    <name>firefly-example</name>
    <url>http://www.fireflysource.com</url>

    <parent>
        <groupId>com.fireflysource</groupId>
        <artifactId>firefly-framework</artifactId>
        <version>5.0.0-dev2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <build>
        <finalName>firefly-example</finalName>
        <defaultGoal>install</defaultGoal>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>**/*.xml</exclude>
                </excludes>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <filtering>true</filtering>
                <directory>src/test/resources</directory>
            </testResource>
        </testResources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <configuration>
                    <compilerPlugins>
                        <!-- Or "jpa" for JPA support -->
                        <plugin>no-arg</plugin>
                        <plugin>all-open</plugin>
                    </compilerPlugins>

                    <pluginOptions>
                        <option>no-arg:annotation=com.firefly.kotlin.ext.annotation.NoArg</option>
                        <option>no-arg:annotation=com.firefly.annotation.Component</option>
                        <option>no-arg:annotation=com.firefly.annotation.Proxies</option>
                        <option>no-arg:annotation=com.firefly.annotation.Proxy</option>
                        <option>no-arg:annotation=com.firefly.db.annotation.Table</option>

                        <option>all-open:annotation=com.firefly.annotation.Component</option>
                        <option>all-open:annotation=com.firefly.annotation.Proxies</option>
                        <option>all-open:annotation=com.firefly.annotation.Proxy</option>
                        <option>all-open:annotation=com.firefly.db.annotation.Table</option>
                    </pluginOptions>
                </configuration>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/main/java</sourceDir>
                                <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/test/java</sourceDir>
                                <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>

                <dependencies>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-maven-noarg</artifactId>
                        <version>${kotlin.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-maven-allopen</artifactId>
                        <version>${kotlin.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgument>-parameters</compilerArgument>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <!-- Replacing default-compile as it is treated specially by maven -->
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                    <!-- Replacing default-testCompile as it is treated specially by maven -->
                    <execution>
                        <id>default-testCompile</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>java-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>java-test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.fireflysource</groupId>
            <artifactId>firefly</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fireflysource</groupId>
            <artifactId>firefly-db</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fireflysource</groupId>
            <artifactId>firefly-kotlin-ext</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fireflysource</groupId>
            <artifactId>firefly-reactive</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fireflysource</groupId>
            <artifactId>firefly-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fireflysource</groupId>
            <artifactId>firefly-session</artifactId>
        </dependency>

        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test-junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-models</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-models</artifactId>
        </dependency>

    </dependencies>

</project>
