Skip to content

Using Snapshots for Testing

Will Hedgecock edited this page Jun 30, 2023 · 2 revisions

If you have opened an issue, you may be asked to test some changes to verify that your problem has been resolved. To facilitate this process, every time a change is committed to the repository, a new "snapshot" of the library at that point in time will be created. To test a change contained within this snapshot, you will simply need to either:

  1. Update your local version of the jSerialComm library JAR that you use when building your project, or
  2. If you utilize a build system like Gradle, update your jSerialComm dependency block

Regardless of how you build your application, at the time you are asked to test a change, you will be provided with:

  1. A direct link to the jSerialComm snapshot which you can use to download the library for testing, and
  2. An artifact string which can be used to tell your build system where to find the snapshot (will be in the form of X.X.X-SNAPSHOT)

When using a build system, you will simply update the version part of your jSerialComm dependency block to match the artifact string that is provided to you. For example, if you are using Gradle, then your production-level build.gradle file might contain a line like the following:

'com.fazecast:jSerialComm:[2.0.0,3.0.0)'

To utilize the library snapshot (e.g., for an artifact called 2.10.1-SNAPSHOT), this line would be changed to:

'com.fazecast:jSerialComm:2.10.1-SNAPSHOT'

Remember to change your jSerialComm dependency back after you have completed testing!!!


One further note, if you utilize a build system, you may need to instruct it where it can find snapshots in Maven Central. This can be achieved by adding a new repository entry for https://oss.sonatype.org/content/repositories/snapshots to your build script.

For Gradle/Groovy, for example, this might look like:

repositories {
    mavenCentral()
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }
}

While for Kotlin, this might look like:

repositories {
    mavenCentral()
    maven {
        url = uri("https://oss.sonatype.org/content/repositories/snapshots")
    }
}

It is up to you to determine how to add additional repositories to your build script.