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

Question about getting stuck while running the “maven package” command #352

Closed ouyangyi1998 closed 4 months ago

ouyangyi1998 commented 1 year ago

I'm submitting a…

Running "maven package" command encounters a stuck startup script file create in:

[INFO]         Required modules found: [ALL-MODULE-PATH]
[INFO]         
[INFO]         Creating JRE with next modules included: ALL-MODULE-PATH
[INFO]         Using /Users/ouyangyi/Library/Java/JavaVirtualMachines/corretto-11.0.20/Contents/Home/jmods modules directory
[INFO]         Executing command: /bin/sh -c cd '/Users/ouyangyi/IdeaProjects/certificate-generate/.' && '/Users/ouyangyi/Library/Java/JavaVirtualMachines/corretto-11.0.20/Contents/Home/bin/jlink' --module-path /Users/ouyangyi/Library/Java/JavaVirtualMachines/corretto-11.0.20/Contents/Home/jmods --add-modules ALL-MODULE-PATH --output /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/PlugIns/jre.jre/Contents/Home --no-header-files --no-man-pages --strip-debug --compress=2
[INFO]         Removing folder [/Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/PlugIns/jre.jre/Contents/Home/legal]
[INFO]     JRE bundled in /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/PlugIns/jre.jre/Contents/Home!
[INFO]     
[INFO]     RuntimeInfo.plist file created in /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/PlugIns/jre.jre/Contents/Info.plist
[INFO]     Copying file [/Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate-1.0-SNAPSHOT-runnable.jar] to folder [/Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java]
[INFO]     Executing command: /bin/sh -c cd '/Users/ouyangyi/IdeaProjects/certificate-generate/.' && 'cp' /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate-1.0-SNAPSHOT-runnable.jar /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/certificate-generate-1.0-SNAPSHOT-runnable.jar
[INFO]     Copying resource [/mac/universalJavaApplicationStub] to file [/Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/MacOS/universalJavaApplicationStub]
[INFO]     Startup script file created in /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/MacOS/universalJavaApplicationStub

For more than 5 minutes with no response, it's still running and no logs are being output. Finally, it terminates with the message Process finished with exit code 130 (interrupted by signal 2: SIGINT)

Here is my maven profile:

            <plugin>
                <groupId>io.github.fvarrui</groupId>
                <artifactId>javapackager</artifactId>
                <version>1.7.2</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>package</goal>
                        </goals>
                        <configuration>
                            <mainClass>com.centerm.certificategenerate.Launcher</mainClass>
                            <bundleJre>true</bundleJre>
                            <generateInstaller>true</generateInstaller>
                            <administratorRequired>false</administratorRequired>
                            <customizedJre>false</customizedJre>
                            <platform>mac</platform>
                            <macConfig>
                                <macStartup>UNIVERSAL</macStartup>
                            </macConfig>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Here is my maven dependencies profile:

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>18.0.2</version>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>18.0.2</version>
        </dependency>
fvarrui commented 1 year ago

Hi @ouyangyi1998! I'm not really sure what's the problem. Please, try removing macConfig.macStartup option and let me now what happens.

ouyangyi1998 commented 1 year ago

Hi @ouyangyi1998! I'm not really sure what's the problem. Please, try removing macConfig.macStartup option and let me now what happens.

Hi, after removing macConfig.macStartup, it seems that nothing have been changed with the maven package command. However, when I try to execute the script named universalJavaApplicationStub with the Mac default terminal console, everything is working fine. The app can be opened directly without any error messages.

ouyangyi1998 commented 1 year ago

Hi @ouyangyi1998! I'm not really sure what's the problem. Please, try removing macConfig.macStartup option and let me now what happens.

Here are the full logs that maven package command outputs

[INFO] 
[INFO] --- javapackager:1.7.2:package (default) @ certificate-generate ---
[WARNING] The POM for io.github.fvarrui:launch4j:jar:2.5.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Using packager io.github.fvarrui.javapackager.packagers.MacPackager
[INFO] Creating app ...
[INFO]     Initializing packager ...
[INFO]         PackagerSettings [outputDirectory=/Users/ouyangyi/IdeaProjects/certificate-generate/target, licenseFile=null, iconFile=null, generateInstaller=true, forceInstaller=false, mainClass=com.centerm.certificategenerate.Launcher, name=certificate-generate, displayName=certificate-generate, version=1.0-SNAPSHOT, description=certificate-generate, url=null, administratorRequired=false, organizationName=ACME, organizationUrl=, organizationEmail=null, bundleJre=true, customizedJre=false, jrePath=null, jdkPath=/Users/ouyangyi/Library/Java/JavaVirtualMachines/corretto-11.0.20/Contents/Home, additionalResources=[], modules=[], additionalModules=[], platform=mac, envPath=null, vmArgs=[], runnableJar=null, copyDependencies=true, jreDirectoryName=jre, winConfig=null, linuxConfig=null, macConfig=MacConfig [icnsFile=null, backgroundImage=null, windowWidth=540, windowHeight=360, windowX=10, windowY=60, iconSize=128, textSize=16, iconX=52, iconY=116, appsLinkIconX=360, appsLinkIconY=116, volumeIcon=null, volumeName=null, generateDmg=true, generatePkg=true, relocateJar=true, appId=com.centerm.certificategenerate.Launcher, developerId=-, entitlements=null, provisionProfile=null, customLauncher=null, customInfoPlist=null, customRuntimeInfoPlist=null, codesignApp=true, notarizeApp=false, keyChainProfile=null, infoPlist=InfoPlist [additionalEntries=, bundlePackageType=BNDL], hardenedCodesign=true, macStartup=SCRIPT], createTarball=false, createZipball=false, extra=null, useResourcesAsWorkingDir=true, assetsDir=/Users/ouyangyi/IdeaProjects/certificate-generate/assets, classpath=null, jreMinVersion=null, manifest=null, additionalModulePaths=[], fileAssociations=[], packagingJdk=/Users/ouyangyi/Library/Java/JavaVirtualMachines/corretto-11.0.20/Contents/Home, scripts=Scripts [bootstrap=null, preInstall=null, postInstall=null], arch=aarch64]
[INFO]     Packager initialized!
[INFO]     
[INFO]     Creating app structure ...
[INFO]         App folder created: /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate
[INFO]         Assets folder created: /Users/ouyangyi/IdeaProjects/certificate-generate/target/assets
[INFO]         App file folder created: /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app
[INFO]         Contents folder created: /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents
[INFO]         Resources folder created: /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources
[INFO]         Java folder created: /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java
[INFO]         MacOS folder created: /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/MacOS
[INFO]     App structure created!
[INFO]     
[INFO]     Resolving resources ...
[INFO]         Trying to resolve license from POM ...
[INFO]         License not resolved!
[INFO]         
[WARNING]         No license file specified
[INFO]         Copying resource [/mac/default-icon.icns] to file [/Users/ouyangyi/IdeaProjects/certificate-generate/target/assets/certificate-generate.icns]
[INFO]         Icon file resolved: /Users/ouyangyi/IdeaProjects/certificate-generate/target/assets/certificate-generate.icns
[INFO]         Effective additional resources [/Users/ouyangyi/IdeaProjects/certificate-generate/target/assets/certificate-generate.icns]
[INFO]     Resources resolved!
[INFO]     
[INFO]     Copying additional resources
[INFO]         Copying file [/Users/ouyangyi/IdeaProjects/certificate-generate/target/assets/certificate-generate.icns] to folder [/Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources]
[INFO]         Executing command: /bin/sh -c cd '/Users/ouyangyi/IdeaProjects/certificate-generate/.' && 'cp' /Users/ouyangyi/IdeaProjects/certificate-generate/target/assets/certificate-generate.icns /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/certificate-generate.icns
[INFO]     All additional resources copied!
[INFO]     
[INFO]     Copying all dependencies ...
[INFO] Copying bcprov-jdk15on-1.69.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/bcprov-jdk15on-1.69.jar
[INFO] Copying truelicense-core-1.33.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/truelicense-core-1.33.jar
[INFO] Copying truelicense-xml-1.33.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/truelicense-xml-1.33.jar
[INFO] Copying commons-codec-1.6.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/commons-codec-1.6.jar
[INFO] Copying lombok-1.18.0.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/lombok-1.18.0.jar
[INFO] Copying slf4j-api-1.7.25.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/slf4j-api-1.7.25.jar
[INFO] Copying logback-classic-1.3.0-alpha5.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/logback-classic-1.3.0-alpha5.jar
[INFO] Copying javax.mail-1.6.2.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javax.mail-1.6.2.jar
[INFO] Copying activation-1.1.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/activation-1.1.jar
[INFO] Copying checker-framework-1.7.0.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/checker-framework-1.7.0.jar
[INFO] Copying jackson-databind-2.12.7.1.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/jackson-databind-2.12.7.1.jar
[INFO] Copying jackson-annotations-2.12.7.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/jackson-annotations-2.12.7.jar
[INFO] Copying jackson-core-2.12.7.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/jackson-core-2.12.7.jar
[INFO] Copying hutool-crypto-5.4.3.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/hutool-crypto-5.4.3.jar
[INFO] Copying hutool-core-5.4.3.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/hutool-core-5.4.3.jar
[INFO] Copying commons-lang3-3.9.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/commons-lang3-3.9.jar
[INFO] Copying jfoenix-9.0.8.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/jfoenix-9.0.8.jar
[INFO] Copying org.eclipse.jgit-4.10.0.201712302008-r.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/org.eclipse.jgit-4.10.0.201712302008-r.jar
[INFO] Copying jsch-0.1.54.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/jsch-0.1.54.jar
[INFO] Copying JavaEWAH-1.1.6.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/JavaEWAH-1.1.6.jar
[INFO] Copying httpclient-4.5.2.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/httpclient-4.5.2.jar
[INFO] Copying httpcore-4.4.4.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/httpcore-4.4.4.jar
[INFO] Copying commons-logging-1.2.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/commons-logging-1.2.jar
[INFO] Copying logback-core-1.3.0-alpha5.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/logback-core-1.3.0-alpha5.jar
[INFO] Copying logback-access-1.3.0-alpha5.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/logback-access-1.3.0-alpha5.jar
[INFO] Copying javafx-controls-18.0.2.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javafx-controls-18.0.2.jar
[INFO] Copying javafx-controls-18.0.2-mac-aarch64.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javafx-controls-18.0.2-mac-aarch64.jar
[INFO] Copying javafx-graphics-18.0.2.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javafx-graphics-18.0.2.jar
[INFO] Copying javafx-graphics-18.0.2-mac-aarch64.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javafx-graphics-18.0.2-mac-aarch64.jar
[INFO] Copying javafx-base-18.0.2.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javafx-base-18.0.2.jar
[INFO] Copying javafx-base-18.0.2-mac-aarch64.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javafx-base-18.0.2-mac-aarch64.jar
[INFO] Copying javafx-fxml-18.0.2.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javafx-fxml-18.0.2.jar
[INFO] Copying javafx-fxml-18.0.2-mac-aarch64.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javafx-fxml-18.0.2-mac-aarch64.jar
[INFO] Copying controlsfx-11.1.1.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/controlsfx-11.1.1.jar
[INFO] Copying javafx-swing-13-ea+2.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javafx-swing-13-ea+2.jar
[INFO] Copying javafx-swing-13-ea+2-mac.jar to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs/javafx-swing-13-ea+2-mac.jar
[INFO]     Dependencies copied to /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/libs!
[INFO]     
[INFO]     Creating runnable JAR...
[INFO] Building jar: /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate-1.0-SNAPSHOT-runnable.jar
[INFO]     Runnable jar created in /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate-1.0-SNAPSHOT-runnable.jar!
[INFO]     
[INFO]     Bundling JRE ... with /Users/ouyangyi/Library/Java/JavaVirtualMachines/corretto-11.0.20/Contents/Home
[INFO]         Creating customized JRE ...
[INFO]         Getting required modules ... 
[WARNING]             It was not possible to determine the necessary modules. All modules will be included
[INFO]         Required modules found: [ALL-MODULE-PATH]
[INFO]         
[INFO]         Creating JRE with next modules included: ALL-MODULE-PATH
[INFO]         Using /Users/ouyangyi/Library/Java/JavaVirtualMachines/corretto-11.0.20/Contents/Home/jmods modules directory
[INFO]         Executing command: /bin/sh -c cd '/Users/ouyangyi/IdeaProjects/certificate-generate/.' && '/Users/ouyangyi/Library/Java/JavaVirtualMachines/corretto-11.0.20/Contents/Home/bin/jlink' --module-path /Users/ouyangyi/Library/Java/JavaVirtualMachines/corretto-11.0.20/Contents/Home/jmods --add-modules ALL-MODULE-PATH --output /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/PlugIns/jre.jre/Contents/Home --no-header-files --no-man-pages --strip-debug --compress=2
[INFO]         Removing folder [/Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/PlugIns/jre.jre/Contents/Home/legal]
[INFO]     JRE bundled in /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/PlugIns/jre.jre/Contents/Home!
[INFO]     
[INFO]     RuntimeInfo.plist file created in /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/PlugIns/jre.jre/Contents/Info.plist
[INFO]     Copying file [/Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate-1.0-SNAPSHOT-runnable.jar] to folder [/Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java]
[INFO]     Executing command: /bin/sh -c cd '/Users/ouyangyi/IdeaProjects/certificate-generate/.' && 'cp' /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate-1.0-SNAPSHOT-runnable.jar /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/Resources/Java/certificate-generate-1.0-SNAPSHOT-runnable.jar
[INFO]     Copying resource [/mac/universalJavaApplicationStub.sh] to file [/Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/MacOS/universalJavaApplicationStub]
[INFO]     Startup script file created in /Users/ouyangyi/IdeaProjects/certificate-generate/target/certificate-generate/certificate-generate.app/Contents/MacOS/universalJavaApplicationStub
fvarrui commented 1 year ago

I was looking into the source code, but I don't know what's happening. It seems it got stuck here, after processStartupScript():

https://github.com/fvarrui/JavaPackager/blob/15330cc4bd57dcdfcf4a0826887a05411897392d/src/main/java/io/github/fvarrui/javapackager/packagers/MacPackager.java#L95-L116

But, as you said, when running universalJavaApplicationStub directly it runs without problems. So, Info.plist file should be present, but there's no output about this packaging step (processInfoPlistFile()) in your output. 😮

I'll try to reproduce your issue and tell you something asap.

ouyangyi1998 commented 1 year ago

I was looking into the source code, but I don't know what's happening. It seems it got stuck here, after processStartupScript():

https://github.com/fvarrui/JavaPackager/blob/15330cc4bd57dcdfcf4a0826887a05411897392d/src/main/java/io/github/fvarrui/javapackager/packagers/MacPackager.java#L95-L116

But, as you said, when running universalJavaApplicationStub directly it runs without problems. So, Info.plist file should be present, but there's no output about this packaging step (processInfoPlistFile()) in your output. 😮

I'll try to reproduce your issue and tell you something asap.

Thanks! Here is the Info.plist after the package command being terminated.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>CFBundleGetInfoString</key>
        <string>certificate-generate 1.0-SNAPSHOT</string>
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleExecutable</key>
        <string>universalJavaApplicationStub</string>
        <key>CFBundleIconFile</key>
        <string>certificate-generate.icns</string>
        <key>CFBundleIdentifier</key>
        <string>com.centerm.certificategenerate.Launcher</string>
        <key>CFBundleDisplayName</key>
        <string>certificate-generate</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <string>certificate-generate</string>
        <key>CFBundlePackageType</key>
        <string>BNDL</string>
        <key>CFBundleShortVersionString</key>
        <string>1.0-SNAPSHOT</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
        <string>1.0-SNAPSHOT</string>
        <key>NSHumanReadableCopyright</key>
        <string>ACME</string>
        <key>NSHighResolutionCapable</key>
        <true />
        <key>NSSupportsAutomaticGraphicsSwitching</key>
        <true />
        <key>AdministratorRequired</key>
        <false />
        <key>JavaX</key>
        <dict>
            <key>MainClass</key>
            <string>com.centerm.certificategenerate.Launcher</string>
            <key>ClassPath</key>
            <array>
                <string>Java/certificate-generate-1.0-SNAPSHOT-runnable.jar</string>
            </array>
            <key>WorkingDirectory</key>
            <string>$APP_PACKAGE/Contents/Resources</string>
            <key>JVMOptionsFile</key>
            <string>$APP_PACKAGE/Contents/Resources/certificate-generate.l4j.ini</string>
            <key>RelocateJar</key>
            <true/>
        </dict>
        <key>LSEnvironment</key>
        <dict>
            <key>JAVA_HOME</key>
            <string>Contents/PlugIns/jre.jre/Contents/Home</string>
        </dict>
        <key>NSAppleEventsUsageDescription</key>
        <string>There was an error while launching the application. Please
            click OK to display a dialog with more information or cancel and view
            the syslog for details.</string>
    </dict>
</plist>

Which makes me pay attention to the description in the end. There was an error while launching the application. Please click OK to display a dialog with more information or cancel and view the syslog for details. Is there anything wrong with launching the application which running the Maven package?

fvarrui commented 1 year ago

Which makes me pay attention to the description in the end. There was an error while launching the application. Please click OK to display a dialog with more information or cancel and view the syslog for details. Is there anything wrong with launching the application which running the Maven package?

No, it's fine. This is just a message for MacOS

fvarrui commented 1 year ago

Hi @ouyangyi1998! Sorry, but I've not been able to reproduce your issue 😞. I don't know why the build process gets stuck at that point ... maybe you can try to build your app using a CI/CD service like CircleCI or GitHub Actions?

aomn commented 10 months ago

I also encountered this problem. After many tests, it seems to be related to starting the network proxy.

ouyangyi1998 commented 10 months ago

I also encountered this problem. After many tests, it seems to be related to starting the network proxy.

I have just tested following your suggestion, and everything seems to be Fine! Thx.

ouyangyi1998 commented 10 months ago

@fvarrui While packaging, my MacOS system runs a network proxy(ClashX) in the background. This might be causing the issue.

fvarrui commented 4 months ago

Great! Your solution will help others Thx!