Skip to content

Using a SNAPSHOT Version

asturio edited this page Mar 5, 2024 · 1 revision

Motivation

Why use a SNAPSHOT version?

Sometimes there are code integrated in a development branch, which was not published. As an issue/bug reporter, you want to try out, if the fixes integrated in that branch are working correctly in your project.

Does OpenPDF offer SNAPSHOT-versions?

At this time there is no SNAPSHOTs or "nightly-Builds" of OpenPDF. And there are no plans for adding this in the near future to the project (if you know how to automate this, contribute in the discussions).

How can I test, if an issue was fixed?

You have 2 options:

  1. Wait for a new release (which may take a while) and use that one, in your project, or
  2. Check if the current development branch works with your project

Creating a SNAPSHOT version of OpenPDF

So as there are no "official" SNAPSHOTs from OpenPDF, how can you test the latest code? Instead of downloading the openpdf.jar with a release version from maven, you need to create your own SNAPSHOT version, like this:

  1. Clone OpenPDF in some directory
  2. Checkout the development-branch you want to use in your project (by now these can be master, 1.4-java11 or 1.3-java8)
  3. Build the project and "install" it in your local maven-repo (that .m2/repository-Directory) with:
 mvn clean install -Dgpg.skip
  1. The version of the installed artifact will be displayed in the output of maven (but you can find it in the pom.xml), like in this case 1.3.43-SNAPSHOT:
[INFO] Reactor Summary for OpenPDF - Free and Open PDF 1.3.43-SNAPSHOT:
  1. That version is what you should use in your project. If the issue is fixed let us know, and if it still there, let us know too.

Note

You should only use a SNAPSHOT-version for testing purposes as the state of the branch may be incomplete.