<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>com.restfb</groupId>
  <artifactId>restfb</artifactId>
  <packaging>jar</packaging>
  <name>RestFB</name>
  <version>2026.1.0-RC1</version>
  <description>RestFB is a simple and flexible Facebook Graph API client written in Java.</description>
  <url>http://restfb.com</url>
  <inceptionYear>2010</inceptionYear>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <project.build.source>11</project.build.source>
    <project.build.target>11</project.build.target>
    <project.build.release>11</project.build.release>

    <!-- dependency versions -->
    <version.junit>5.13.4</version.junit>
    <version.lombok>1.18.42</version.lombok>
    <version.mockito>5.20.0</version.mockito>
    <version.assertj>3.27.6</version.assertj>
    <version.slf4j>[1.7.32,)</version.slf4j>
    <version.bundlor>1.1.2.RELEASE</version.bundlor>

    <!-- additional configuration -->
    <year.current>2024</year.current>
    <skipTests>false</skipTests>

    <!-- sonar configuration -->
    <sonar.projectKey>restfb_restfb</sonar.projectKey>
    <sonar.organization>restfb</sonar.organization>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
  </properties>

  <licenses>
    <license>
      <name>MIT</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:ssh://github.com/restfb/restfb.git</connection>
    <url>http://github.com/restfb/restfb</url>
  </scm>

  <ciManagement>
    <url>https://github.com/restfb/restfb/actions</url>
    <system>Github Actions</system>
  </ciManagement>

  <distributionManagement>
    <repository>
      <name>Central Portal Snapshots</name>
      <id>central-portal-snapshots</id>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </distributionManagement>

  <developers>
    <developer>
      <id>mark.a.allen</id>
      <name>Mark Allen</name>
      <email>mark.a.allen@gmail.com</email>
      <url>http://restfb.com</url>
      <roles>
        <role>Project Lead</role>
      </roles>
      <timezone>-5</timezone>
    </developer>
    <developer>
      <id>kaosko</id>
      <name>Kalle Korhonen</name>
      <email>kaosko@apache.org</email>
      <url>http://tynamo.org</url>
      <roles>
        <role>Mavenizer</role>
      </roles>
      <timezone>-8</timezone>
    </developer>
    <developer>
      <id>nbartels</id>
      <name>Norbert Bartels</name>
      <email>n.bartels@phpmonkeys.de</email>
      <url>http://www.phpmonkeys.de</url>
      <roles>
        <role>Maintainer</role>
        <role>Developer</role>
      </roles>
      <timezone>Europe/Berlin</timezone>
    </developer>
  </developers>

  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${version.junit}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${version.junit}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>${version.junit}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${version.lombok}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <version>${version.mockito}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${version.slf4j}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${version.slf4j}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${version.assertj}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>5.1.9</version>
        <extensions>true</extensions>
        <configuration>
          <supportedProjectTypes>
            <supportedProjectType>jar</supportedProjectType>
            <supportedProjectType>bundle</supportedProjectType>
          </supportedProjectTypes>
          <archive>
            <manifestEntries>
              <Built-By>${project.name} Team</Built-By>
            </manifestEntries>
          </archive>
          <instructions>
            <Bundle-SymbolicName>${project.groupId}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
            <Bundle-ClassPath>.,{maven-dependencies}</Bundle-ClassPath>
            <Export-Package>
              com.restfb*;version=${project.version}
            </Export-Package>
            <Import-Package>
              !com.restfb*,
              org.slf4j*;version="[1.7,3)",
              *
            </Import-Package>
          </instructions>
        </configuration>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>3.1.4</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.4.2</version>
        <configuration>
          <archive>
            <manifestFile>
              target/classes/META-INF/MANIFEST.MF
            </manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.14.0</version>
        <configuration>
          <fork>true</fork>
          <encoding>UTF-8</encoding>
          <source>${project.build.source}</source>
          <target>${project.build.target}</target>
          <release>${project.build.release}</release>
          <showDeprecation>false</showDeprecation>
          <showWarnings>true</showWarnings>
          <compilerArgs>
            <arg>-Xlint:-deprecation</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.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-failsafe-plugin</artifactId>
        <version>3.5.4</version>
        <configuration>
          <skipITs>${skipTests}</skipITs>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.5.4</version>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>5.0.0</version>
        <configuration>
          <licenseSets>
            <licenseSet>
              <header>LICENSE</header>
              <excludes>
                <exclude>.github/**</exclude>
                <exclude>**/*.xml</exclude>
                <exclude>**/README.md</exclude>
                <exclude>**/CHANGELOG</exclude>
                <exclude>target/**</exclude>
                <exclude>LICENSE**</exclude>
                <exclude>build/**</exclude>
                <exclude>template.mf</exclude>
                <exclude>pom.xml.asc</exclude>
                <exclude>.github/**</exclude>
                <exclude>src/main/java/com/restfb/json/**</exclude>
                <exclude>src/test/java/com/restfb/json/**</exclude>
                <exclude>src/test/resources/**</exclude>
                <exclude>src/main/java/com/restfb/util/Base64.java</exclude>
                <exclude>*.sh</exclude>
                <exclude>misc/scripts/*.sh</exclude>
                <exclude>.cz.toml</exclude>
              </excludes>
            </licenseSet>
          </licenseSets>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.8.0</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central-portal</publishingServerId>
          <autoPublish>true</autoPublish>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok-maven-plugin</artifactId>
        <version>1.18.20.0</version>
        <dependencies>
          <dependency>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok</artifactId>
              <version>${version.lombok}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>delombok</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.13</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <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>
  <pluginRepositories>
    <pluginRepository>
      <id>com.springsource.repository.bundles.external</id>
      <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
      <url>https://repository.springsource.com/maven/bundles/external</url>
    </pluginRepository>
  </pluginRepositories>
  <profiles>
    <!-- GPG Signature on release -->
    <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>3.2.8</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
                <gpgArguments>
                  <arg>--pinentry-mode</arg>
                  <arg>loopback</arg>
                </gpgArguments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk-9-javadoc</id>
      <activation>
        <jdk>[1.9,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.12.0</version>
            <configuration>
              <linksource>true</linksource>
              <doclint>none</doclint>
              <source>8</source>
              <links>
                <link>https://docs.oracle.com/javase/8/docs/api/</link>
              </links>
              <doctitle><![CDATA[<h1>RestFB ${project.version}</h1>]]></doctitle>
              <bottom>
                <![CDATA[<i>RestFB ${project.version}. Copyright &#169; ${project.inceptionYear}-${year.current} Mark Allen, Norbert Bartels. All Rights Reserved.</i>]]></bottom>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
