fvarrui / JavaPackager

:package: Gradle/Maven plugin to package Java applications as native Windows, MacOS, or Linux executables and create installers for them.
GNU General Public License v3.0
1.07k stars 133 forks source link

DMG image generation failed due to: Command execution failed: bless --folder #217

Closed kerner1000 closed 2 years ago

kerner1000 commented 2 years ago

I'm submitting a…

I am trying to build an application image on Apple M1. I am getting the following error when executing mvn package bless: The 'openfolder' is not supported on Apple Silicon devices DMG image generation failed due to: Command execution failed: bless --folder

jpackage --version
18.0.1
java -version
openjdk version "18.0.1" 2022-04-19
OpenJDK Runtime Environment Temurin-18.0.1+10 (build 18.0.1+10)
OpenJDK 64-Bit Server VM Temurin-18.0.1+10 (build 18.0.1+10, mixed mode)
sw_vers
ProductName:    macOS
ProductVersion: 12.4
BuildVersion:   21F79

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

            <plugin>
                <groupId>io.github.fvarrui</groupId>
                <artifactId>javapackager</artifactId>
                <version>1.6.6</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>package</goal>
                        </goals>
                        <configuration>
                            <!-- mandatory -->
                            <mainClass>${main-class}</mainClass>
                            <!-- optional -->
                            <bundleJre>true</bundleJre>
                            <generateInstaller>true</generateInstaller>
                            <administratorRequired>false</administratorRequired>
                            <platform>mac</platform>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
fvarrui commented 2 years ago

Hi @kerner1000!

Please, have a look to issue-184 ... this problem was reported and fixed in JavaPackager 1.6.7-SNAPSHOT. Try to install this version manually to your local repo until 1.6.7 is released to Maven Central:

git clone https://github.com/fvarrui/JavaPackager --branch devel
cd JavaPackager
./gradlew publishToMavenLocal

and then change JavaPackager version in your POM from 1.6.6 to 1.6.7-SNAPSHOT.

Please, give some feedback.

Thanks!

fvarrui commented 2 years ago

JavaPackager doesn't use jpackage tool.

kerner1000 commented 2 years ago

That worked, thanks a lot!