<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.projog</groupId>
  <artifactId>projog-core</artifactId>
  <version>0.11.0</version>
  <packaging>jar</packaging>

  <name>projog-core</name>
  <description>An implementation of the Prolog programming language for the Java platform.</description>
  <url>http://projog.org</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

   <developers>
      <developer>
         <name>S Webber</name>
         <email>feedback@projog.org</email>
         <organization>projog</organization>
         <organizationUrl>https://github.com/s-webber</organizationUrl>
      </developer>
   </developers>

   <scm>
    <connection>scm:git:git://github.com/s-webber/projog.git</connection>
    <developerConnection>scm:git:ssh://github.com:s-webber/projog.git</developerConnection>
    <url>https://github.com/s-webber/projog/tree/master</url>
   </scm>

   <properties>
      <maven.compiler.release>8</maven.compiler.release>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   </properties>

   <dependencies>
      <dependency>
         <groupId>org.projog</groupId>
         <artifactId>projog-clp</artifactId>
         <version>0.3.0</version>
      </dependency>
      <dependency>
         <groupId>org.projog</groupId>
         <artifactId>projog-test</artifactId>
         <version>0.5.0</version>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>org.projog</groupId>
               <artifactId>projog-core</artifactId>
            </exclusion>
         </exclusions> 
      </dependency>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>4.13.1</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
         <version>5.21.0</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>com.tngtech.junit.dataprovider</groupId>
         <artifactId>junit4-dataprovider</artifactId>
         <version>2.6</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <distributionManagement>
      <snapshotRepository>
         <id>central</id>
         <url>https://central.sonatype.com/repository/maven-snapshots/.</url>
      </snapshotRepository>
   </distributionManagement>

   <build>
      <plugins>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>3.11.0</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-dependency-plugin</artifactId>
           <version>3.9.0</version>
           <executions>
             <execution>
               <goals>
                 <goal>properties</goal>
               </goals>
             </execution>
           </executions>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <version>3.5.4</version>
           <configuration>
             <argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
           </configuration>
         </plugin>
         <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.14</version>
            <executions>
               <execution>
                  <id>default-prepare-agent</id>
                  <goals>
                     <goal>prepare-agent</goal>
                  </goals>
               </execution>
               <execution>
                  <id>default-report</id>
                  <phase>prepare-package</phase>
                  <goals>
                     <goal>report</goal>
                  </goals>
               </execution>
               <execution>
                  <id>default-check</id>
                  <goals>
                     <goal>check</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <rule implementation="org.jacoco.maven.RuleConfiguration">
                           <element>BUNDLE</element>
                           <limits>
                              <limit implementation="org.jacoco.report.check.Limit">
                                 <counter>COMPLEXITY</counter>
                                 <value>COVEREDRATIO</value>
                                 <minimum>0.60</minimum>
                              </limit>
                           </limits>
                        </rule>
                     </rules>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

   <!--
   mvn versions:set -DnewVersion=1.2.3
   mvn clean deploy -P release
   https://oss.sonatype.org/#nexus-search;quick~org.projog
   -->
   <profiles>
      <profile>
         <id>release</id>
         <build>
            <plugins>
               <!--
               Generation of Javadoc and sources attachments
               -->
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-source-plugin</artifactId>
                  <version>3.4.0</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>3.12.0</version>
                  <executions>
                     <execution>
                        <id>attach-javadocs</id>
                        <goals>
                           <goal>jar</goal>
                        </goals>
                        <configuration>
                           <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
               <!--
               The Maven GPG plugin is used to sign the components.
               It relies on the gpg command being installed and the GPG credentials being available e.g. from settings.xml.
               -->
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-gpg-plugin</artifactId>
                  <version>1.5</version>
                  <executions>
                     <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>sign</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               <!-- https://central.sonatype.org/publish/publish-portal-maven/ -->
               <plugin>
                  <groupId>org.sonatype.central</groupId>
                  <artifactId>central-publishing-maven-plugin</artifactId>
                  <version>0.9.0</version>
                  <extensions>true</extensions>
                  <configuration>
                     <publishingServerId>central</publishingServerId>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

   <reporting>
      <!-- mvn site -->
      <plugins>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-project-info-reports-plugin</artifactId>
           <version>3.9.0</version>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.12.0</version>
            <configuration>
               <additionalparam>-Xdoclint:none</additionalparam>
               <bottom><![CDATA[<a href='http://projog.org' title='Prolog programming for the Java platform' target='_blank'>projog.org</a> - a Java based implementation of the Prolog logic programming language. ${project.version}]]></bottom>
               <doctitle>Projog - a Java based implementation of the Prolog logic programming language.</doctitle>
               <windowtitle>Projog - a Java based implementation of the Prolog logic programming language.</windowtitle>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <version>3.28.0</version>
            <configuration>
               <rulesets>
                  <ruleset>src/test/resources/pmd-ruleset.xml</ruleset>
               </rulesets>
            </configuration>
         </plugin>
      </plugins>
   </reporting>
</project>
