<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
    <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
    <maven-source-plugin.version>3.2.0</maven-source-plugin.version>
    <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
    <maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
    <maven-nexus-staging-plugin.version>2.5.3</maven-nexus-staging-plugin.version>
    <maven-pmd-plugin.version>3.15.0</maven-pmd-plugin.version>
    <maven-jxr-plugin.version>3.1.1</maven-jxr-plugin.version>
    <maven-findbugs-plugin.version>3.0.5</maven-findbugs-plugin.version>
    <maven-jacoco-plugin.version>0.8.7</maven-jacoco-plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>net.seninp</groupId>
      <artifactId>jmotif-sax</artifactId>
      <version>1.2.0</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.32</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.2.10</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
    </dependency>
    <dependency>
      <groupId>com.beust</groupId>
      <artifactId>jcommander</artifactId>
      <version>1.78</version>
    </dependency>
    <dependency>
      <groupId>com.apporiented</groupId>
      <artifactId>hierarchical-clustering</artifactId>
      <version>1.1.0</version>
    </dependency>
  </dependencies>

  <organization>
    <name>JMotif</name>
    <url>http://github.com/jMotif</url>
  </organization>

  <groupId>net.seninp</groupId>
  <artifactId>jmotif-gi</artifactId>
  <version>1.1.0</version>

  <name>jmotif-gi</name>
  <description>An implementation of grammar inference algorithms for JMotif libraries.</description>
  <url>https://github.com/jMotif/GI</url>

  <licenses>
    <license>
      <name>GNU General Public License v2.0</name>
      <url>http://www.gnu.org/licenses/old-licenses/gpl-2.0.html</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Pavel Senin</name>
      <email>seninp@gmail.com</email>
    </developer>
  </developers>

  <scm>
    <url>http://github.com/jMotif/gi.git</url>
    <connection>scm:git:git://git@github.com/jMotif/gi.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/jMotif/gi.git</developerConnection>
    <tag>jmotif-gi-1.1.0</tag>
  </scm>

  <distributionManagement>
    <repository>
      <id>github</id>
      <name>GitHub Packages</name>
      <url>https://maven.pkg.github.com/jMotif/GI</url>
    </repository>
  </distributionManagement>

  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <argLine>${argLine} -Xms512m -Xmx1024m</argLine>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${maven-jacoco-plugin.version}</version>
        <configuration>
          <excludes>
            <exclude>**/clusterrule/**</exclude>
            <exclude>**/tinker/**</exclude>
            <exclude>**/cli/**</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>CodeCoverage</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${maven-surefire-plugin.version}</version>
            <configuration>
              <argLine>${argLine} -Xms512m -Xmx1024m</argLine>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${maven-jacoco-plugin.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>report</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>report</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- ************************ -->
    <profile>
      <id>release</id>
      <build>
        <plugins>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven-javadoc-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>${maven-release-plugin.version}</version>
            <configuration>
              <autoVersionSubmodules>true</autoVersionSubmodules>
              <!-- disable 'release' profile from super pom -->
              <useReleaseProfile>false</useReleaseProfile>
              <releaseProfiles>ossrh</releaseProfiles>
              <goals>deploy</goals>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- ************************ -->
    <profile>
      <id>single</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>${maven-assembly-plugin.version}</version>
            <configuration>
              <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
              </descriptorRefs>
              <archive>
                <manifest>
                  <mainClass>net.seninp.gi.rulepruner.RulePrunerPrinter</mainClass>
                </manifest>
              </archive>
              <!-- <filters> <filter>src/assembly/filter.properties</filter> </filters> <descriptors> 
                <descriptor>src/assembly/distribution.xml</descriptor> </descriptors> -->
            </configuration>
            <executions>
              <execution>
                <id>make-assembly</id> <!-- this is used for inheritance merges -->
                <phase>package</phase> <!-- bind to the packaging phase -->
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>mavenCentral</id>
      <distributionManagement>
        <repository>
          <id>ossrh</id>
          <name>Central Repository OSSRH</name>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>

  </profiles>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${maven-pmd-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>${maven-jxr-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>${maven-findbugs-plugin.version}</version>
      </plugin>
    </plugins>
  </reporting>


</project>