wp-rest-client
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>io.github.evisentin</groupId>
<artifactId>wp-rest-client</artifactId>
<version>1.4.5</version>
</dependency><project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
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>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<groupId>io.github.evisentin</groupId>
<artifactId>wp-rest-client</artifactId>
<version>1.4.5</version>
<packaging>pom</packaging>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<name>WP REST Client</name>
<description>Multi-module WordPress Java REST client with pluggable HTTP adapters</description>
<url>https://github.com/evisentin/wp-rest-client</url>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<modules>
<module>wp-rest-client-domain</module>
<module>wp-rest-client-domain-assertions</module>
<module>wp-rest-client-okhttp</module>
<module>wp-rest-client-apache</module>
<module>wp-rest-client-test-integration</module>
<module>wp-rest-client-test-report</module>
<module>wp-rest-client-contract-tests</module>
<module>samples</module>
</modules>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<properties>
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- [MAVEN PLUGIN VERSIONS] -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
<maven.compiler.plugin.version>3.15.0</maven.compiler.plugin.version>
<maven-enforcer-plugin.version>3.6.3</maven-enforcer-plugin.version>
<maven.failsafe.plugin.version>3.5.6</maven.failsafe.plugin.version>
<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
<maven.jar.plugin.version>3.5.0</maven.jar.plugin.version>
<maven.source.plugin.version>3.4.0</maven.source.plugin.version>
<maven.surefire.plugin.version>3.5.6</maven.surefire.plugin.version>
<maven-surefire-report-plugin.version>3.5.6</maven-surefire-report-plugin.version>
<!-- [MAVEN PLUGIN VERSIONS USED WHEN PUBLISHING TO MAVEN CENTRAL] -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<maven.gpg.plugin.version>3.2.8</maven.gpg.plugin.version>
<!-- [LIBRARY VERSIONS] -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<commons-io.version>2.22.0</commons-io.version>
<commons-lang3.version>3.20.0</commons-lang3.version>
<commons-text.version>1.15.0</commons-text.version>
<jackson.version>2.22.0</jackson.version>
<java-jwt.version>4.5.2</java-jwt.version>
<lombok.version>1.18.46</lombok.version>
<httpclient5.version>5.6.2</httpclient5.version>
<okhttp.version>5.4.0</okhttp.version>
<slf4j.version>2.0.18</slf4j.version>
<!-- [TEST LIBRARY VERSIONS] -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<junit.version>6.1.1</junit.version>
<assertj.version>3.27.7</assertj.version>
<mockito.version>5.23.0</mockito.version>
<mockserver-junit-jupiter.version>7.3.0</mockserver-junit-jupiter.version>
</properties>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<developers>
<developer>
<id>ev</id>
<name>Enrico Visentin</name>
<email>evisentin.dev@gmail.com</email>
<organization>EVISENTIN</organization>
<organizationUrl>https://github.com/evisentin</organizationUrl>
</developer>
</developers>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<scm>
<connection>scm:git:git://github.com/evisentin/wp-rest-client.git</connection>
<developerConnection>scm:git:ssh://git@github.com/evisentin/wp-rest-client.git</developerConnection>
<url>https://github.com/evisentin/wp-rest-client</url>
<tag>HEAD</tag>
</scm>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<dependencyManagement>
<dependencies>
<!-- [APACHE COMMONS] -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>${commons-text.version}</version>
</dependency>
<!-- [JACKSON] -->
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<!-- [JAVA-JWT] -->
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>${java-jwt.version}</version>
</dependency>
<!-- [APACHE HTTPCLIENT 5] -->
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>${httpclient5.version}</version>
</dependency>
<!-- [OKHTTP] -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-bom</artifactId>
<version>${okhttp.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- [SLF4j] -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- [JUNIT] -->
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- [ASSERT-J] -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<!-- [MOCKITO] -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-bom</artifactId>
<version>${mockito.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- [LOMBOK] -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<build>
<pluginManagement>
<plugins>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Maven Compiler Plugin
This plugin is responsible for compiling the project's source code.
Key configurations:
- <release>: Specifies the Java version to compile against (ensures both source and target compatibility,
and links against the correct standard library).
- <annotationProcessorPaths>: Defines annotation processors used during compilation.
In this case:
- Lombok is configured as an annotation processor, enabling generation of boilerplate code (e.g., getters,
setters, builders) at compile time without requiring it on the runtime classpath.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<release>${maven.compiler.release}</release>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Maven Surefire Plugin
Runs the project's unit tests during the test phase.
- <argLine> passes JVM arguments to the test runtime.
- The -javaagent option attaches Mockito as a Java agent at test time.
This enables advanced Mockito features such as mocking final classes, static methods, and inline mocking.
- The agent is loaded from the local Maven repository so it does not become a runtime dependency of the application.
This keeps test capabilities powerful while ensuring the final artifact remains clean.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>@{argLine} -XX:+EnableDynamicAgentLoading</argLine>
</configuration>
</plugin>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Maven Surefire Report Plugin
Generates human-readable reports from the results produced by the Maven Surefire Plugin (unit test execution).
These reports are typically used for site generation or CI visibility, making it easier to review test
outcomes without parsing raw logs.
Note: This plugin does not run tests; it only formats and presents the results.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>${maven-surefire-report-plugin.version}</version>
</plugin>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Maven Failsafe Plugin
Executes integration tests during the integration-test and verify phases.
Unlike the Maven Surefire Plugin (which runs unit tests), Failsafe is designed for tests that require a fully
built application or external resources (e.g., databases, services).
- <argLine> passes JVM arguments to the test runtime.
- The -javaagent option attaches Mockito as a Java agent at test time, enabling advanced features such as
mocking final classes, static methods, and inline mocking.
Using Failsafe ensures that integration tests run separately from unit tests and do not interfere with the
standard build lifecycle.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven.failsafe.plugin.version}</version>
<configuration>
<argLine>@{argLine} -XX:+EnableDynamicAgentLoading</argLine>
</configuration>
</plugin>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Maven JAR Plugin
Packages the compiled classes and resources into a JAR file.
This is the default artifact produced by the build. The plugin can be further configured (if needed) to
customize manifest entries, include additional resources, or attach supplementary JARs
(e.g., sources or tests).
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.plugin.version}</version>
<executions>
<execution>
<id>default-jar</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Maven Source Plugin
Attaches a JAR containing the project's source code to the build.
- The "attach-sources" execution ensures a sources JAR is created alongside the main artifact during the build.
- The "jar-no-fork" goal generates the sources JAR without triggering a separate build lifecycle, keeping the
build efficient.
Publishing sources improves usability for consumers (e.g., IDE navigation, debugging) and is a common best
practice for open-source libraries.
-->
<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-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Maven Javadoc Plugin
Generates API documentation (Javadoc) and packages it as part of the build.
Configuration highlights:
- Ensures consistent encoding (UTF-8) for source and generated documentation.
- <show>public</show> limits documentation to the public API surface.
- <failOnError>false</failOnError> prevents the build from failing due to Javadoc issues, which is useful
when strict doclint rules are not fully met.
- Disables automatic link detection to avoid external lookup delays or failures.
Additional options:
- "-noqualifier" simplifies type names in generated docs.
- "lombok" enables better handling of Lombok-generated elements.
- "-Xdoclint:all,-missing" enables most doc checks but ignores missing comments.
Executions:
- "generate-javadoc-html" creates browsable documentation during the
prepare-package phase and places it in the build's site directory.
- "attach-javadoc-jar" produces a Javadoc JAR attached to the artifact,
which is useful for IDE integration and artifact repositories.
Providing Javadoc is a best practice for open-source projects, improving
usability and API discoverability.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
<charset>UTF-8</charset>
<failOnError>false</failOnError>
<detectLinks>false</detectLinks>
<detectOfflineLinks>false</detectOfflineLinks>
<additionalOptions>
<additionalOption>-noqualifier</additionalOption>
<additionalOption>lombok</additionalOption>
<additionalOption>-Xdoclint:all,-missing</additionalOption>
</additionalOptions>
<show>public</show>
</configuration>
<executions>
<execution>
<id>generate-javadoc-html</id>
<phase>prepare-package</phase>
<goals>
<goal>javadoc</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/site</outputDirectory>
</configuration>
</execution>
<execution>
<id>attach-javadoc-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</plugins>
</pluginManagement>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<plugins>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Maven Enforcer Plugin
Enforces build constraints to ensure a consistent and reproducible development environment across all contributors.
In this configuration:
- requireMavenVersion ensures that the build is executed with a minimum Maven version (3.9.14).
This prevents subtle build issues caused by differences in Maven behaviour across versions and provides early,
clear feedback if the environment is not compatible.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.9.16</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
JaCoCo Maven Plugin
Integrates code coverage analysis into the build.
- The "prepare-agent" execution attaches the JaCoCo Java agent before tests run, enabling collection of coverage
data during execution.
- The "report" execution (bound to the verify phase) generates a coverage report from the collected data.
This setup provides insight into how much of the codebase is exercised by tests, helping maintain test quality
and identify untested areas.
-->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
Maven Javadoc Plugin (Aggregated)
Generates unified Javadoc across all modules and attaches it to the build. This plugin is actively executed
from the parent POM.
Executions:
- "aggregate-javadoc-html" (verify phase)
Builds a single, combined HTML documentation site for all modules.
Output is written to the build's site directory.
- "aggregate-javadoc-jar" (package phase)
Produces a JAR containing the aggregated Javadoc, typically
published alongside the main artifacts.
Configuration highlights:
- Uses consistent UTF-8 encoding for reliable documentation output.
- <show>public</show> restricts docs to the public API surface.
- <failOnError>true</failOnError> enforces strict documentation correctness (build fails on Javadoc errors).
- Adds links to the official Java API for better navigation.
- Includes options to improve readability and support Lombok.
This setup is especially useful in multi-module projects, providing a single entry point for API documentation
instead of per-module docs.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<!-- Build the aggregated HTML docs during normal builds -->
<execution>
<id>aggregate-javadoc-html</id>
<phase>verify</phase>
<goals>
<goal>aggregate</goal>
</goals>
<configuration>
<source>${java.version}</source>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
<charset>UTF-8</charset>
<failOnError>true</failOnError>
<show>public</show>
<additionalOptions>
<additionalOption>-noqualifier</additionalOption>
<additionalOption>lombok</additionalOption>
<additionalOption>-Xdoclint:all,-missing</additionalOption>
</additionalOptions>
<links>
<link>https://docs.oracle.com/en/java/javase/${java.version}/docs/api/</link>
</links>
<outputDirectory>${project.build.directory}/site</outputDirectory>
</configuration>
</execution>
<!-- Optional: attach an aggregated javadoc jar from the parent -->
<execution>
<id>aggregate-javadoc-jar</id>
<phase>package</phase>
<goals>
<goal>aggregate-jar</goal>
</goals>
<configuration>
<source>${java.version}</source>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
<charset>UTF-8</charset>
<failOnError>true</failOnError>
<show>public</show>
<additionalOptions>
<additionalOption>-noqualifier</additionalOption>
<additionalOption>lombok</additionalOption>
<additionalOption>-Xdoclint:all,-missing</additionalOption>
</additionalOptions>
<links>
<link>https://docs.oracle.com/en/java/javase/${java.version}/docs/api/</link>
</links>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.11.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
</build>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<profiles>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven.gpg.plugin.version}</version>
<configuration>
<bestPractices>true</bestPractices>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
</project>