java
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>com.contentstack.sdk</groupId>
<artifactId>java</artifactId>
<version>2.6.0</version>
</dependency><?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.contentstack.sdk</groupId>
<artifactId>java</artifactId>
<version>2.6.0</version>
<packaging>jar</packaging>
<name>contentstack-java</name>
<description>Java SDK for Contentstack Content Delivery API</description>
<url>https://github.com/contentstack/contentstack-java/</url>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<surefire-report-plugin.version>2.22.0</surefire-report-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
<dotenv-source.version>3.0.0</dotenv-source.version>
<rxjava-source.version>3.1.12</rxjava-source.version>
<retrofit-source.version>3.0.0</retrofit-source.version>
<loggin.version>5.3.2</loggin.version>
<jococo-plugin.version>0.8.5</jococo-plugin.version>
<lombok-source.version>1.18.42</lombok-source.version>
<junit-jupiter.version>5.11.4</junit-jupiter.version>
<junit-jupiter-engine.version>5.8.0-M1</junit-jupiter-engine.version>
<gson.version>2.8.8</gson.version>
<json-simple-version>1.1.1</json-simple-version>
<maven-site-plugin.version>3.3</maven-site-plugin.version>
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
<json-version>20251224</json-version>
<jacoco-maven-plugin-version>0.8.11</jacoco-maven-plugin-version>
<maven-release-plugin-version>2.5.3</maven-release-plugin-version>
<contentstack-utils-version>1.2.15</contentstack-utils-version>
</properties>
<!-- Parent POM removed to avoid 403 from Maven Central in CI (Snyk, etc.). -->
<!-- Plugin versions and config are defined explicitly in this POM. -->
<scm>
<url>https://github.com/contentstack/contentstack-java</url>
<connection>scm:git:git://github.com/contentstack/contentstack-java.git</connection>
<developerConnection>scm:git:ssh://github.com:contentstack/contentstack-java.git</developerConnection>
<tag>java-1.8.0</tag>
</scm>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/contentstack/contentstack-java/issues</url>
</issueManagement>
<licenses>
<license>
<name>MIT</name>
<url>https://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<organization>
<name>Contentstack</name>
<url>https://contentstack.com</url>
</organization>
<developers>
<developer>
<name>shaileshmishra</name>
<email>shailesh.mishra@contentstack.com</email>
<organization>contentstack</organization>
<organizationUrl>https://www.contentstack.com/</organizationUrl>
</developer>
<developer>
<name>contentstack</name>
<email>mobile@contentstack.com</email>
<organization>Contentstack</organization>
<organizationUrl>https://www.contentstack.com/</organizationUrl>
</developer>
</developers>
<!-- <distributionManagement>
Maven Snapshot Repository
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<snapshotRepository>
<id>github</id>
<url>https://maven.pkg.github.com/contentstack/contentstack-java</url>
</snapshotRepository>
Maven Release Repository
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement> -->
<dependencies>
<dependency>
<groupId>com.contentstack.sdk</groupId>
<artifactId>utils</artifactId>
<version>${contentstack-utils-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${json-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.reactivex.rxjava3</groupId>
<artifactId>rxjava</artifactId>
<version>${rxjava-source.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
<version>${retrofit-source.version}</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.squareup.retrofit2/converter-gson -->
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>converter-gson</artifactId>
<version>${retrofit-source.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>${loggin.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok-source.version}</version>
<scope>compile</scope>
</dependency>
<!--JUnit 5 requires Java 8, you should make sure you have it ready in your environment.-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>${json-simple-version}</version>
<scope>compile</scope>
<!-- Exclude junit - it was incorrectly included as compile dep in json-simple -->
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.21.0</version>
</dependency>
<dependency>
<groupId>com.slack.api</groupId>
<artifactId>bolt</artifactId>
<version>1.46.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>26.0.2</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>5.3.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.github.cdimascio/java-dotenv -->
<dependency>
<groupId>io.github.cdimascio</groupId>
<artifactId>java-dotenv</artifactId>
<version>5.2.2</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>2.1.0</version>
</dependency>
<!-- Fix CVE-2025-48924: Uncontrolled Recursion in commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.18.0</version>
</dependency>
<!-- Fix Spring vulnerabilities from contentstack-utils transitive deps -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>6.2.11</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>6.2.11</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>6.2.11</version>
</dependency>
<!-- Fix CVE-2020-15250: junit pulled by json-simple -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<!--
# Run tests and generate .xml reports
mvn test
# Convert .xml reports into .html report, but without the CSS or images
mvn surefire-report:report-only
# Put the CSS and images where they need to be without the rest of the
# time-consuming stuff
mvn surefire-report:report site -DgenerateReports=false
-->
<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>
<!--Generate overview.html file-->
<!--overview "/Users/shaileshmishra/Documents/workspace/contentstack/workspace/GitHub/contentstack-java/src/main/overview.html" -bottom "<b>Copyright © 2012-2023 Contentstack </b><sup>TM</sup>" -->
<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>
<configuration>
<stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
<show>public</show>
<additionalOptions>-Xdoclint:none</additionalOptions>
<use>false</use>
<use>false</use>
<source>1.8</source>
<links>
<link>https://docs.oracle.com/en/java/javase/23/docs/api/</link>
</links>
<doclint>none</doclint>
</configuration>
</execution>
</executions>
</plugin>
<!-- Surefire Plugin for API Tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<!-- Tests are skipped by default; use -Dtest to specify which tests to run -->
<!-- Example: -Dtest='*IT' for integration tests, -Dtest='Test*' for unit tests -->
<!-- <skipTests>true</skipTests> -->
<!-- OPTIMIZED: Parallel execution with controlled concurrency -->
<parallel>classes</parallel>
<threadCount>4</threadCount>
<perCoreThreadCount>false</perCoreThreadCount>
<useUnlimitedThreads>false</useUnlimitedThreads>
<!-- Reuse forks for better performance -->
<reuseForks>true</reuseForks>
<forkCount>2</forkCount>
<!-- Increase timeout for slow tests -->
<forkedProcessTimeoutInSeconds>500</forkedProcessTimeoutInSeconds>
<!-- Better memory management -->
<!-- @{argLine} allows JaCoCo to inject its agent -->
<argLine>@{argLine} -Xmx2048m -XX:MaxMetaspaceSize=512m</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.22.2</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>report-only</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</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.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>
-Xlint:all,-serial,-processing
</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version> <!-- or latest -->
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
<!--
This plugin is used to release a project with Maven, saving a lot of repetitive, manual work.
Releasing a project is made in two steps: prepare and perform.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin-version}</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
<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>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>target/jacoco.exec</dataFile>
<!-- outputDirectory removed - uses default: target/site/jacoco/ -->
</configuration>
</execution>
</executions>
<configuration>
<excludes>
<exclude>src/main/java/com/contentstack/sdk/Group.class</exclude>
<exclude>src/main/java/com/contentstack/sdk/FetchAssetsCallback.class</exclude>
<exclude>src/main/java/com/contentstack/sdk/SingleQueryResultCallback.class</exclude>
<exclude>src/main/java/com/contentstack/sdk/ContentTypesCallback.class</exclude>
<exclude>src/main/java/com/contentstack/sdk/QueryResultsCallBack.class</exclude>
<exclude>src/main/java/com/contentstack/sdk/FetchResultCallback.class</exclude>
<exclude>src/main/java/com/contentstack/sdk/EntryResultCallBack.class</exclude>
<exclude>src/main/java/com/contentstack/sdk/FetchResultCallback.class</exclude>
<exclude>src/main/java/com/contentstack/sdk/TestLivePreview.class</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</build>
</project>