FAQ

Q: Configured JReleaser in a multi-module project and got org.jreleaser.util.JReleaserException: Could not determine git HEAD when running any commands. How can I fix this?

This happens when JReleaser is invoked on a directory that’s not the root where you’d typically find the root .git metadata. To fix this you can move the configuration to the root directory or instruct JReleaser to search for the Git root directory:

  • cli CLI set -grs or --git-root-search command flags.

  • maven Maven set the jreleaser.git.root.search property or set <gitRootSearch> in the plugin’s configuration.

  • gradle Gradle set the gitRootSearch property on the jreleaser extension or set the --git-root-search command flag.

  • ant Ant set the gitRootSearch task property.

Q: Can I use JReleaser with Rust projects?

Yes, you can. You can continue to use Cargo to build the Rust binaries then instruct JReleaser to release said binaries. The https://github.com/aalmiray/helloworld-rustx/ repository shows a trivial CLI application that produces 5 different binaries built with Cargo and released with JReleaser.

Q: The generated changelog is missing all history or fails to find the previous tag. What am I missing?

It’s likely that JReleaser was run on a shallow working copy. When running on GitHub Actions take note of adding the fetch-depth: 0 option on the Checkout step. It is required for JReleaser to work properly.