Hi Rafael,
Platform-specific constraints for application version values vary.
On Windows, the version should be a sequence of non-negative integers
separated by periods.
The same applies to macOS.
On Linux, the rules slightly vary for DEB and RPM packaging.
Using the same constraints on all platforms would impose excessive
limitations on jpackage usage. Not all users use jpackage to create
packages for all platforms.
The common denominator would be a version in
${MAJOR_NUMBER}.${MINOR_NUMBER}.${BUILD_NUMBER} format.
As for 1.2.3-SNAPSHOT, it is valid for DEB only. It is invalid for RPM
(RPM versions must not contain hyphens) and for Windows and macOS.
("-SNAPSHOT" suffix is invalid on these platforms).
- Alexey
On 8/18/2026 5:34 AM, Rafael Winterhalter wrote:
Hello,
I noticed a strange anomaly when it comes to building images with jpackage.'
On Linux, which I use, versions like 1.2.3-SNAPSHOT are accepted by
"--app-version". Windows and Mac users who build the same project with the
same version do however get an error.
I traced this down to greedy parsing in MsiVersion and WinApplicationMixin
for Windows and CFBundleVersion and MacApplication on MacOS. Linux has no
such constraint.
Is this divergence intended? I expected this to be a portable property and
to fail on either all platforms or none.
Thanks, Rafael