v2.0.0-rc1
Pre-release
Pre-release
Note
Release candidate of 2.0.0, published on Maven Central so you can try it before the final release: use version 2.0.0-rc1 instead of 2.0.0 in the snippets below. Please report any problem in the issues.
Warning
This is a major release with breaking changes. Read How to upgrade before updating your build.
Breaking changes
- New coordinates, packages and Gradle plugin id. The project moved to the
javapackagerorganization. Everything that was namedio.github.fvarruiis nowio.github.javapackager:- Maven
groupId:io.github.javapackager(wasio.github.fvarrui). - Gradle plugin id:
io.github.javapackager(wasio.github.fvarrui.javapackager.plugin). - Java packages:
io.github.javapackager.*, e.g. the Gradle task typeio.github.javapackager.gradle.PackageTask(wasio.github.fvarrui.javapackager.gradle.PackageTask). - Versions up to 1.7.6 remain available under
io.github.fvarrui.
- Maven
macStartupnow defaults toUNIVERSAL(wasSCRIPT). macOS apps use the new native launcher, which runs natively on both Apple Silicon and Intel. SetmacStartuptoSCRIPTto keep the previous launcher.- Gradle
PackageTaskboolean getters are nowgetX()instead ofisX()(getBundleJre(),getGenerateInstaller(),getAdministratorRequired(), ...), because Gradle 9 ignoresBooleanproperties withisgetters. Build scripts that set them (bundleJre = true) don't change; only code that calls the getters does. - Maven zipball and tarball names now follow the
nameandversionproperties, like the Gradle plugin and the README:${name}-${version}-${platform}.zip/.tar.gz(#489). They used to come frombuild.finalName, so the name changes ifnamediffers from the artifactId;zipballNameandtarballNamestill override it. This also stops two executions in one build from overwriting each other's archive. - AppImage and RPM file names now follow the other installers:
${name}_${version}.AppImageand${name}_${version}.rpm(#481).
How to upgrade
Maven:
<plugin>
<groupId>io.github.javapackager</groupId>
<artifactId>javapackager</artifactId>
<version>2.0.0</version>
[...]
</plugin>Gradle:
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'io.github.javapackager:javapackager:2.0.0'
}
}
apply plugin: 'io.github.javapackager'
task packageMyApp(type: io.github.javapackager.gradle.PackageTask, dependsOn: build) {
[...]
}To keep the previous macOS launcher:
<macConfig>
<macStartup>SCRIPT</macStartup>
</macConfig>New features
- #305 Default application arguments with the new
appArgsproperty (GNU/Linux and macOS; Windows support is still pending). - #477 WiX Toolset 4+ support: if
wixis inPATHit is used to build MSI and MSM files, otherwise JavaPackager falls back to WiX 3 (candleandlight). See the Windows tools guide. - Native macOS launcher (
nativeJavaApplicationStub) forUNIVERSAL,X86_64andARM64startup types. It should fix the Rosetta and macOS 15 launch problems reported in #448, #449 and #389; please confirm in those issues. - #485 Gradle 9 support: the Gradle plugin no longer uses deprecated Gradle APIs (
JavaPluginConvention,Task.getProject()at execution time,TaskContainer.create()), and the launch4j Gradle plugin is updated to 4.0.0. -SNAPSHOTversions are published to the Central Portal snapshots repository (see the README).
Fixed issues
- #421 Customized JRE missing modules:
jdepsnow analyses thelibsfolder and the runnable JAR. - #439 Customized JRE generation failed since 1.7.6 when dependencies split a package across JARs (e.g. netty):
jdepsnow falls back to the class path when it fails on the module path. - #463 AppImage generation failed because
appimagetoolmoved to a new download location. - #470 GNU/Linux startup script didn't quote arguments, so arguments with spaces were split.
- #473 macOS app with
administratorRequired=truedidn't include the launcher, so it didn't start. This may also fix #398; please confirm there. vmArgscontaining spaces broke the Windows EXE built with Launch4j, and were split by the macOSSCRIPTlauncher.appArgscontaining spaces were split by the macOSSCRIPTlauncher.- DMG generation failed intermittently with
hdiutil: ... Resource busyorResource temporarily unavailable;hdiutilcommands are now retried. - #484 Registering a Gradle
PackageTaskwithout applying the plugin failed with aNullPointerException; it now fails with a message saying to applyio.github.javapackager, and the plugin can also be applied after registering the task. - #369 The Inno Setup "Launch" checkbox ran the app as the administrator who approved the install instead of the logged-in user (unless
administratorRequiredistrue). - The
classpathproperty broke the GNU/Linux startup script (java -jartook the whole classpath as a file name), so the app didn't start. - #444 Maven builds that can only reach Maven Central couldn't resolve the plugin: its POM declared the launch4j Gradle library, only published on the Gradle Plugin Portal. Maven users now only need Maven Central (Gradle users still need
gradlePluginPortal(), see the README). - Maven API artifacts (
maven-plugin-api,maven-core, ...) were published withruntimescope, so Maven users downloaded old Maven jars they didn't need. They are nowprovided.
Maintenance
- Updated dependencies, including
commons-compress1.28.0,plexus-utils4.1.0,commons-io2.22.0,commons-lang33.21.0,velocity-engine-core2.4.1,jdeb1.14,launch4j-maven-plugin2.7.0 (part of #465) and the launch4j Gradle plugin 4.0.0. The plugin still runs on Java 8. - Smoke tests on every push: the Maven and the Gradle plugin package the same sample app (
samples/hello-world) on GNU/Linux, Windows and macOS (Apple Silicon, everymacStartuptype) and check the generated apps and installers. On macOS the app is also installed from the DMG and from the PKG and opened through Launch Services, like from the Finder (based on #487 by @maths22). It replaces the oldHelloWorldMavenandHelloWorldGradlesample repositories, now archived. - The macOS
SCRIPTlauncher (universalJavaApplicationStub.sh) is now maintained in this repository, since the upstream project is deprecated. The native macOS launcher is maintained in javapackager/nativeJavaApplicationStub (formerlyuniversalJavaApplicationStub). - Documentation: WiX 4+ installation,
gradlePluginPortal()in the Gradle setup (#444), and building the plugin with a JDK 17+.