Closed 983183947 closed 4 months ago
Hi @983183947!
Yes, this problem was already reported https://github.com/fvarrui/JavaPackager/issues/352 😢 ... I'm not being able to reproduce it, so I don't now how to proceed.
Maybe trying to build the app using some CI solution (CircleCI or GitHub Actions) ... Sorry!! I hope we can find a solution soon. 🤷♂️
Knowing the development environment where the app is being built would be helpful to try to narrow down the problem.
@fvarrui Hi! this is my debug log
[INFO] Using packager io.github.fvarrui.javapackager.packagers.MacPackager
[INFO] Creating app ...
[INFO] Initializing packager ...
[INFO] PackagerSettings [outputDirectory=/Users/chukongxiang/Project/pgsql-runner/target, licenseFile=null, iconFile=null, generateInstaller=true, forceInstaller=false, mainClass=com.dyt.pgsql.runner.RunnerApplication, name=pgsql-runner, displayName=pgsql-runner, version=1.0, description=Parent pom providing dependency and plugin management for applications built with Maven, url=http://maven.apache.org, administratorRequired=true, organizationName=ACME, organizationUrl=, organizationEmail=null, bundleJre=false, customizedJre=true, jrePath=null, jdkPath=/Users/chukongxiang/Project/pgsql-runner/Java/lib/java, additionalResources=[/Users/chukongxiang/Project/pgsql-runner/Java], modules=[], additionalModules=[], platform=mac, envPath=null, vmArgs=[], runnableJar=/Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner-1.0.jar, copyDependencies=false, 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.dyt.pgsql.runner.RunnerApplication, 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, tarballName=null, createZipball=false, zipballName=null, extra=null, useResourcesAsWorkingDir=true, assetsDir=/Users/chukongxiang/Project/pgsql-runner/assets, classpath=null, jreMinVersion=null, manifest=null, additionalModulePaths=[], fileAssociations=[], packagingJdk=/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre, scripts=Scripts [bootstrap=null, preInstall=null, postInstall=null], arch=x64, templates=[Template [name=windows/iss.vtl, bom=true]]]
[INFO] Packager initialized!
[INFO]
[INFO] Creating app structure ...
[INFO] App folder created: /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner
[INFO] Assets folder created: /Users/chukongxiang/Project/pgsql-runner/target/assets
[INFO] App file folder created: /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app
[INFO] Contents folder created: /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents
[INFO] Resources folder created: /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/Resources
[INFO] Java folder created: /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/Resources/Java
[INFO] MacOS folder created: /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/MacOS
[INFO] App structure created!
[INFO]
[INFO] Resolving resources ...
[INFO] Trying to resolve license from POM ...
[INFO] File downloaded from [https://www.apache.org/licenses/LICENSE-2.0] to [/Users/chukongxiang/Project/pgsql-runner/target/assets/LICENSE]
[INFO] License resolved /Users/chukongxiang/Project/pgsql-runner/target/assets/LICENSE!
[INFO]
[INFO] License file found: /Users/chukongxiang/Project/pgsql-runner/target/assets/LICENSE
[INFO] Copying resource [/mac/default-icon.icns] to file [/Users/chukongxiang/Project/pgsql-runner/target/assets/pgsql-runner.icns]
[INFO] Icon file resolved: /Users/chukongxiang/Project/pgsql-runner/target/assets/pgsql-runner.icns
[INFO] Effective additional resources [/Users/chukongxiang/Project/pgsql-runner/Java, /Users/chukongxiang/Project/pgsql-runner/target/assets/LICENSE, /Users/chukongxiang/Project/pgsql-runner/target/assets/pgsql-runner.icns]
[INFO] Resources resolved!
[INFO]
[INFO] Copying additional resources
[INFO] Copying folder [/Users/chukongxiang/Project/pgsql-runner/Java] to folder [/Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/Resources]
[INFO] Executing command: /bin/sh -c cd '/Users/chukongxiang/Project/pgsql-runner/.' && 'cp' -R /Users/chukongxiang/Project/pgsql-runner/Java /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/Resources
[INFO] Copying file [/Users/chukongxiang/Project/pgsql-runner/target/assets/LICENSE] to folder [/Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/Resources]
[INFO] Executing command: /bin/sh -c cd '/Users/chukongxiang/Project/pgsql-runner/.' && 'cp' /Users/chukongxiang/Project/pgsql-runner/target/assets/LICENSE /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/Resources/LICENSE
[INFO] Copying file [/Users/chukongxiang/Project/pgsql-runner/target/assets/pgsql-runner.icns] to folder [/Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/Resources]
[INFO] Executing command: /bin/sh -c cd '/Users/chukongxiang/Project/pgsql-runner/.' && 'cp' /Users/chukongxiang/Project/pgsql-runner/target/assets/pgsql-runner.icns /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/Resources/pgsql-runner.icns
[INFO] All additional resources copied!
[INFO]
[INFO] Copying all dependencies ...
[INFO] Dependencies copied to null!
[INFO]
[INFO] Using runnable JAR: /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner-1.0.jar
[WARNING] JRE artifact generation skipped!
[INFO] Copying file [/Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner-1.0.jar] to folder [/Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/Resources/Java]
[INFO] Executing command: /bin/sh -c cd '/Users/chukongxiang/Project/pgsql-runner/.' && 'cp' /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner-1.0.jar /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/Resources/Java/pgsql-runner-1.0.jar
[DEBUG] Initializing Velocity, Calling init()...
[DEBUG] Starting Apache Velocity v2.3
[DEBUG] Default Properties resource: org/apache/velocity/runtime/defaults/velocity.properties
[DEBUG] ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader
[DEBUG] FileResourceLoader: adding path '/Users/chukongxiang/Project/pgsql-runner/assets'
[DEBUG] ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] initialized (class org.apache.velocity.runtime.resource.ResourceCacheImpl) with class java.util.Collections$SynchronizedMap cache map.
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Stop
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Define
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Break
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Evaluate
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Include
[DEBUG] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
[DEBUG] Created '20' parsers.
[DEBUG] "velocimacro.library.path" is not set. Trying default library: velocimacros.vtl
[DEBUG] Could not load resource 'velocimacros.vtl' from ResourceLoader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] Default library velocimacros.vtl not found. Trying old default library: VM_global_library.vm
[DEBUG] Could not load resource 'VM_global_library.vm' from ResourceLoader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] Old default library VM_global_library.vm not found.
[DEBUG] allowInline = true: VMs can be defined inline in templates
[DEBUG] allowInlineToOverride = false: VMs defined inline may NOT replace previous VM definitions
[DEBUG] allowInlineLocal = false: VMs defined inline will be global in scope if allowed.
[DEBUG] autoload off: VM system will not automatically reload global library macros
[DEBUG] ResourceManager: found mac/startup.vtl with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] Null reference [template 'mac/startup.vtl', line 4, column 48]: $SCRIPTPATH cannot be resolved.
[INFO] Startup script file created in /Users/chukongxiang/Project/pgsql-runner/target/pgsql-runner/pgsql-runner.app/Contents/MacOS/startup
[DEBUG] ResourceManager: found mac/Info.plist.vtl with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[DEBUG] Null reference [template 'mac/Info.plist.vtl', line 112, column 33]: $APP_PACKAGE cannot be resolved.
[DEBUG] Null reference [template 'mac/Info.plist.vtl', line 115, column 33]: $APP_PACKAGE cannot be resolved.
pom.xml
<build>
<finalName>${jarName}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
<mainClass>com.dyt.pgsql.runner.RunnerApplication</mainClass>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.fvarrui</groupId>
<artifactId>javapackager</artifactId>
<version>1.7.5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>package</goal>
</goals>
<configuration>
<mainClass>com.dyt.pgsql.runner.RunnerApplication</mainClass>
<bundleJre>false</bundleJre>
<!-- <packagingJdk>false</packagingJdk>-->
<jdkPath>./Java/lib/java</jdkPath>
<copyDependencies>false</copyDependencies>
<generateInstaller>true</generateInstaller>
<administratorRequired>true</administratorRequired>
<platform>auto</platform>
<runnableJar>${project.basedir}/target/${jarName}.jar</runnableJar>
<additionalResources>
<additionalResource>${project.basedir}/Java</additionalResource>
</additionalResources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
I also encountered this problem. After many tests, it seems to be related to starting the network proxy. It will look like this when the network proxy is turned on, and it will be normal if it is turned off.
So, is it not related to JavaPackager?
I am using the maven plug-in 1.7.3. When packaging the mac, I found that the progress has been stuck as follows:
This is my configuration: