<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>
 
  <groupId>ai.polus.utils</groupId>
  <artifactId>filepattern</artifactId>
  <version>2.0.6</version>
  <name>${project.groupId}:${project.artifactId}</name>
  <packaging>jar</packaging>
  
  <description>The filepattern utility is used to store files that follow a pattern, where the pattern is analogous to a simplified regular expression.</description>
  <url>https://github.com/PolusAI/filepattern</url>
  
  <licenses>
    <license>
      <name>MIT License</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Jesse McKinzie</name>
      <email>Jesse.McKinzie@axleinfo.com</email>
      <organization>PolusAI</organization>
      <organizationUrl>https://github.com/PolusAI</organizationUrl>
    </developer>
  </developers>

  <properties>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <scm>
      <url>https://github.com/PolusAI/filepattern</url>
      <connection>scm:git:https://github.com/PolusAI/filepattern.git</connection>
      <developerConnection>scm:git:https://github.com/PolusAI/filepattern.git</developerConnection>
      <tag>HEAD</tag>
   </scm>

   <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

  <dependencies>

    <dependency>
        <groupId>org.bytedeco</groupId>
        <artifactId>javacpp</artifactId>
        <version>1.5.9</version>
    </dependency>

    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>5.2.0</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.junit.platform</groupId>
        <artifactId>junit-platform-runner</artifactId>
        <version>1.2.0</version>
        <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
        <sourceDirectory>src/filepattern/java</sourceDirectory>
        <testSourceDirectory>tests/java</testSourceDirectory>
        <plugins>

            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-source-plugin</artifactId>
               <version>2.2.1</version>
               <executions>
                  <execution>
                     <id>attach-sources</id>
                     <goals>
                        <goal>jar-no-fork</goal>
                     </goals>
                  </execution>
               </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.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-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                    <manifest>
                        <mainClass>filepattern.java.FilePattern</mainClass>
                    </manifest>
                    </archive>
                    <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                    <id>make-assembly</id>
                    <phase>package</phase> 
                    <goals>
                        <goal>single</goal>
                    </goals>
                    </execution>
                </executions>
                </plugin>

            <plugin>
                <groupId>org.bytedeco</groupId>
                <artifactId>javacpp</artifactId>
                <version>1.5.9</version>
                <configuration>
                    <classPath>${project.build.outputDirectory}</classPath>
                    <includePaths>
                        <includePath>${project.build.sourceDirectory}</includePath>
                    </includePaths>
                    <copyLibs>true</copyLibs>
                </configuration>
                <executions>
                    <execution>
                        <id>process-classes</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                        <configuration>
                            <classOrPackageNames>
                                <classOrPackageName>filepattern.java.*</classOrPackageName>
                            </classOrPackageNames>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
            </plugin>

        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <version.maven-release-plugin>3.0.4</version.maven-release-plugin>
                <version.maven-gpg-plugin>3.0.1</version.maven-gpg-plugin>
                <version.nexus-staging-maven-plugin>1.7.0</version.nexus-staging-maven-plugin>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <artifactId>maven-release-plugin</artifactId>
                            <version>${version.maven-release-plugin}</version>
                            <configuration>
                                <tagNameFormat>@{project.version}</tagNameFormat>
                            </configuration>
                        </plugin>
                        <plugin>
                            <artifactId>maven-gpg-plugin</artifactId>
                            <version>${version.maven-gpg-plugin}</version>
                            <executions>
                                <execution>
                                    <id>sign-artifacts</id>
                                    <phase>verify</phase>
                                    <goals>
                                        <goal>sign</goal>
                                    </goals>
                                    <configuration>
                                        <gpgArguments>
                                            <arg>--pinentry-mode</arg>
                                            <arg>loopback</arg>
                                        </gpgArguments>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>

                       <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.3.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <tokenAuth>true</tokenAuth>
                        </configuration>
                    </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>