<?xml version="1.0" encoding="UTF-8"?>

<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

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

    <name>CosPlay</name>
    <artifactId>cosplay</artifactId>
    
    <parent>
        <groupId>org.cosplayengine</groupId>
        <artifactId>cosplay-parent</artifactId>
        <version>0.7.2</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
        </dependency>

        <dependency>
            <groupId>com.mixpanel</groupId>
            <artifactId>mixpanel-java</artifactId>
        </dependency>

        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
        </dependency>

        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.miglayout</groupId>
            <artifactId>miglayout-swing</artifactId>
        </dependency>

        <dependency>
            <groupId>org.kordamp.ikonli</groupId>
            <artifactId>ikonli-swing</artifactId>
        </dependency>

        <dependency>
            <groupId>org.kordamp.ikonli</groupId>
            <artifactId>ikonli-lineawesome-pack</artifactId>
        </dependency>

        <dependency>
            <groupId>com.formdev</groupId>
            <artifactId>flatlaf</artifactId>
        </dependency>

        <dependency>
            <groupId>com.formdev</groupId>
            <artifactId>flatlaf-intellij-themes</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-media</artifactId>
        </dependency>

        <!--
            Scala3 dependencies.
            ===================
        -->

        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala3-library_${scala.major.ver}</artifactId>
        </dependency>

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

        <dependency>
            <groupId>org.scala-lang.modules</groupId>
            <artifactId>scala-parallel-collections_${scala.major.ver}</artifactId>
        </dependency>

        <dependency>
            <groupId>com.typesafe.scala-logging</groupId>
            <artifactId>scala-logging_${scala.major.ver}</artifactId>
        </dependency>

        <!--
         JLine dependencies.
         ==================
        -->

        <dependency>
            <groupId>org.jline</groupId>
            <artifactId>jline</artifactId>
            <version>${jline.ver}</version>
        </dependency>

        <!--
         Other dependencies.
         ===================
        -->

        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
        </dependency>

        <!--
         JUnit & ScalaTest dependencies.
         ===============================
        -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.ver}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.major.ver}</artifactId>
            <version>${scalatest.ver}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>pong</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.games.pong.CPPongGame</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>mir</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.games.mir.CPMirGame</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>bird</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.games.bird.CPBirdGame</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>snake</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.games.snake.CPSnakeGame</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>macarena</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.games.macarena.CPMacarenaGame</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:animation</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.animation.CPAnimationExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:camera</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.camera.CPCameraExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:canvas</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.canvas.CPCanvasExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:fonts</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.fonts.CPFontsExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:image-formats</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.image.CPImageFormatsExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:image-carousel</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.image.CPImageCarouselExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:particle</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.particle.CPParticleExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:shader</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.shader.CPShaderExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:slide_shader</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.shader.CPSlideShaderExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:sound</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.sound.CPSoundExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:textinput</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.textinput.CPTextInputExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:tilemapper</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.tilemapper.CPTileMapperExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ex:video</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions><execution><goals><goal>java</goal></goals></execution></executions>
                        <configuration>
                            <skip>false</skip>
                            <mainClass>org.cosplay.examples.video.CPVideoExample</mainClass>
                            <arguments>
                                <argument>--add-opens</argument>
                                <argument>javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${maven.clean.plugin.ver}</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${user.home}/.cosplay</directory>
                            <includes>
                                <include>**/*</include>
                            </includes>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.ver}</version>
                <configuration>
                    <!-- Skips all tests on phase `test`. -->
                    <skip>true</skip>
                </configuration>
                <executions>
                    <!-- All tests are defined as integration. -->
                    <execution>
                        <id>integration-tests</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <!-- Mandatory part. -->
                            <includes>
                                <include>**/*.*</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>            

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin.ver}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>${maven.shade.plugin.ver}</version>
                <executions>
                    <execution>
                        <id>jar.all.deps</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <outputFile>
                                ${project.build.directory}/${cosplay.all.deps.jar}
                            </outputFile>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>${maven.install.plugin.ver}</version>
            </plugin>
        </plugins>
    </build>
</project>
