Skip to content

Core Interfaces Compatibility

Muhammad Sufyan edited this page Aug 12, 2025 · 1 revision

Using the Snapshot Release of Core Interfaces

This guide explains how to use the snapshot release of the Core Interfaces library in your project by updating the pom.xml file.

1. What is a Snapshot Release?

A snapshot is a development build of a library that may include the latest features or fixes that are not yet part of a stable release.
Snapshot builds are updated frequently and should be used with caution in production environments.


2. Adding the Snapshot Repository

To enable Maven to download snapshot versions of the Core Interfaces, add the following <repositories> block inside your pom.xml:

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

Note:
This will only fetch dependencies marked with a -SNAPSHOT version.


3. Updating Your Dependency

Once the repository is added, update your dependency to point to the snapshot version of Core Interfaces.
For example:

<dependencies>
    <dependency>
        <groupId>com.apimatic</groupId>
        <artifactId>core-interfaces</artifactId>
        <version>1.2.3-SNAPSHOT</version>
    </dependency>
</dependencies>

Replace 1.2.3-SNAPSHOT with the snapshot version you want to use.


4. Verifying the Setup

You can confirm Maven is pulling the snapshot by running:

mvn dependency:purge-local-repository
mvn clean install

If everything is configured correctly, Maven will download the snapshot dependency from the Central Portal Snapshots repository.


5. Best Practices

  • Use snapshot versions only for testing or development.
  • Always switch back to a stable release before production deployment.
  • Keep track of changes in the snapshot to avoid unexpected behavior.