<?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>edu.uiuc.ncsa.qdl</groupId>
        <artifactId>qdl</artifactId>
        <version>1.5.4.3</version>
    </parent>

    <artifactId>language</artifactId>
    <name>QDL base language</name>
    <packaging>jar</packaging>
    <version>1.5.4.3</version>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <additionalparam>-Xdoclint:none</additionalparam>
        <runSuite>**/TestSuite.java</runSuite>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <configuration>
                    <skip>false</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-jar-plugin</artifactId>
                            <version>3.3.0</version>

                            <executions>
                                <execution>
                                    <goals>
                                        <goal>test-jar</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M7</version>
                <configuration>
                    <excludes>
                        <exclude>**/*Test.java</exclude>
                    </excludes>
                    <includes>
                        <include>**/*Suite.java</include>
                    </includes>
                    <!--  <forkMode>perTest</forkMode>-->
                    <forkCount>1</forkCount>
                    <reuseForks>false</reuseForks>

                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>bundle-sources</id>
                        <phase>package</phase>
                        <goals>
                            <!-- produce source artifact for main project sources -->
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>


                    <!--
                     Generate sequence build number based on:
                     build number and timestamp
                    -->
                    <format>Build: #{0} ({1,date,yyyy-MM-dd'T'HH:mm:ss.SSSXXX})</format>
                    <items>
                        <item>buildNumber\d*</item>
                        <item>timestamp</item>
                    </items>
                </configuration>
            </plugin>

        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>1.33</version>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>2.6.0</version>
        </dependency>
        <!--
             Stupid json-path component loads with loud errors without its logger which is not enabled for output.
             Have to include the dependency so it can see it should not run.
        -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.21</version>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.11</version>
        </dependency>

        <!-- OAUTH-179: fix SSL server hostname  vulnerability in previous versions of httpcomponents. -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.4.15</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>jakarta.mail</artifactId>
            <version>1.6.7</version>
            <scope>provided</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/jakarta.mail/jakarta.mail-api -->
        <!--
                <dependency>
                    <groupId>jakarta.mail</groupId>
                    <artifactId>jakarta.mail-api</artifactId>
                    <version>2.1.2</version>
                </dependency>
        -->

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.14</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.9.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>1.10.0</version>
        </dependency>

        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4</version>
            <classifier>jdk15</classifier>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4</artifactId>
            <version>4.9.3</version>
        </dependency>
        <dependency>
            <groupId>edu.uiuc.ncsa.security</groupId>
            <artifactId>storage</artifactId>
            <version>5.4.3</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>edu.uiuc.ncsa.security</groupId>
            <artifactId>util</artifactId>
            <version>5.4.3</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.30</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <version>10.14.2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.4.3</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mariadb.jdbc</groupId>
            <artifactId>mariadb-java-client</artifactId>
            <version>3.0.8</version>
        </dependency>
        <dependency>
            <groupId>ch.obermuhlner</groupId>
            <artifactId>big-math</artifactId>
            <version>2.3.0</version>
        </dependency>
        <!-- For the swing GUI -->
        <dependency>
            <groupId>com.fifesoft</groupId>
            <artifactId>autocomplete</artifactId>
            <version>3.3.1</version>
        </dependency>

        <dependency>
            <groupId>com.fifesoft</groupId>
            <artifactId>rsyntaxtextarea</artifactId>
            <version>3.3.2</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.intellij</groupId>
            <artifactId>forms_rt</artifactId>
            <version>7.0.3</version>
        </dependency>
        <dependency>
            <groupId>com.formdev</groupId>
            <artifactId>flatlaf</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>edu.uiuc.ncsa.security</groupId>
            <artifactId>sas-server</artifactId>
            <version>5.4.3</version>
            <type>jar</type>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>qdl</id>
            <build>
                <finalName>qdl</finalName>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.10.1</version>
                        <configuration>
                            <source>${java.version}</source>
                            <target>${java.version}</target>

                            <!-- JDK9+ Add Module MAGIC happens below...          -->
                            <!-- Add implicit default JDK9+ java.se explicitly    -->
                            <!-- Add explicit java.desktop for import java.awt.*; -->
                            <compilerArgs>
                                <arg>--add-modules</arg>
                                <arg>java.se,java.desktop</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>3.1.0</version>
                        <configuration>

                            <archive>
                                <manifest>
                                    <addClasspath>true</addClasspath>
                                    <mainClass>edu.uiuc.ncsa.qdl.workspace.QDLWorkspace</mainClass>
                                </manifest>
                                <manifestEntries>
                                    <application-version>${project.version}</application-version>
                                    <application-name>${project.name}</application-name>
                                    <build-time>${timestamp}</build-time>
                                    <implementation-version>${project.version}</implementation-version>
                                    <implementation-build>${buildNumber}</implementation-build>
                                </manifestEntries>
                            </archive>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>

                        </configuration>
                        <executions>
                            <execution>
                                <id>make-my-jar-with-dependencies</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

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