Closed harideva16 closed 3 years ago
I updated this example project. Use this:
tasks.jpackage.doLast {
copy {
from('src/main/resources')
into("$buildDir/jpackage/$project.name/app")
}
}
I am using id 'org.beryx.runtime' version '1.12.5'
the following code not worked .
tasks.jpackage.doLast {
copy {
from('src/main/resources')
into("$buildDir/jpackage/$project.name/app")
}
}
If I use id 'org.beryx.runtime' version '1.12.3'
the following code works only in windows.
tasks.jpackageImage {
doLast {
copy {
from('src/main/resources')
into "$jpackageData.imageOutputDir/$jpackageData.imageName"
}
}
}
in cfg file
java-options=-'-Dlogback.configurationFile=$APPDIR\..
This code not worked in linux and mac.
How to bundle my file with JPackage ?
I want to do this in windows , linux and mac ?
How can I do this ?
See this answer: beryx/badass-runtime-plugin#89 (comment)
I am using github actions to create jpackage.
I download JPackage from github actions recently you did in this project : https://github.com/beryx-gist/badass-runtime-example/actions/runs/1198181759
Then,I installed in my windows 10 os . But , there is no logback.xml file in JPackage.
inside app folder logback.xml file missing
I want my file inside installation folder for all the following os.
How can I do this ?
You're right. It should be doFirst
instead of doLast
:
https://github.com/beryx-gist/badass-runtime-example/blob/1ed0cda3de3ff56a303f483a1609065ad0aab8e3/build.gradle#L43-L48
I fixed the example: https://github.com/beryx-gist/badass-runtime-example/actions/runs/1200701206#artifacts
You're right. It should be
doFirst
instead ofdoLast
: https://github.com/beryx-gist/badass-runtime-example/blob/1ed0cda3de3ff56a303f483a1609065ad0aab8e3/build.gradle#L43-L48I fixed the example: https://github.com/beryx-gist/badass-runtime-example/actions/runs/1200701206#artifacts
I have three devices with windows , linux and mac operating systems.
I tested all JPackages in my devices.
this code worked only in windows JPackage.
But, In linux and Mac logback.xml file missing in JPACKAGE.
Damn, you're right again 😃
I hope this change fixes the issue: https://github.com/beryx-gist/badass-runtime-example/blob/13b68668869d19ca5a01c2912dfeb873ba6158a1/build.gradle#L48-L55
Here the updated images: https://github.com/beryx-gist/badass-runtime-example/actions/runs/1201455602#artifacts
I tested only the msi and deb installers. Please check whether the other installers also work.
I create a JPackage with github actions with myproject.
I tested all JPackages in my devices.
But , this code worked only in windows JPackage.
In linux and Mac logback.xml file missing in JPACKAGE.
This code not worked.
Damn, you're right again 😃
I hope this change fixes the issue: https://github.com/beryx-gist/badass-runtime-example/blob/13b68668869d19ca5a01c2912dfeb873ba6158a1/build.gradle#L48-L55
Here the updated images: https://github.com/beryx-gist/badass-runtime-example/actions/runs/1201455602#artifacts
I tested only the msi and deb installers. Please check whether the other installers also work.
I updated the GitHub Actions to show the logback files contained in the generated packages. As you can see in the logs, logback.xml is definitely there.
Excerpt from the ubuntu-latest job:
Show logback files in DEB package
dpkg -c build/jpackage/*.deb | grep logback
-rw-r--r-- root/root 290339 2021-09-05 13:22 ./opt/non-modular-hello/lib/app/logback-classic-1.2.3.jar
-rw-r--r-- root/root 471901 2021-09-05 13:22 ./opt/non-modular-hello/lib/app/logback-core-1.2.3.jar
-rw-r--r-- root/root 437 2021-09-05 13:22 ./opt/non-modular-hello/lib/app/logback.xml
Show logback files in RPM package
rpm -qlp build/jpackage/*.rpm | grep logback
/opt/non-modular-hello/lib/app/logback-classic-1.2.3.jar
/opt/non-modular-hello/lib/app/logback-core-1.2.3.jar
/opt/non-modular-hello/lib/app/logback.xml
Excerpt from the macOS-latest job:
Show logback files in DMG package
hdiutil attach build/jpackage/*.dmg && find /Volumes/non-modular-hello/non-modular-hello.app/Contents -name "logback*"
/Volumes/non-modular-hello/non-modular-hello.app/Contents/app/logback-classic-1.2.3.jar
/Volumes/non-modular-hello/non-modular-hello.app/Contents/app/logback-core-1.2.3.jar
/Volumes/non-modular-hello/non-modular-hello.app/Contents/app/logback.xml
Since logback.xml has been included in all packages, I think we can close this issue. In this example project, logback.xml is no longer missing.
If logback.xml is still missing in your project, please create a new issue. However, I cannot help you unless you also put your project (or an SSCCE) on GitHub.
I think I know why you thought that logback.xml is still missing: the system property logback.configurationFile
in the applicationDefaultJvmArgs
pointed to the wrong location. The correct value is:
https://github.com/beryx-gist/badass-runtime-example/blob/ae7ac75912ac0f00c3c57ba0b8a5ba09be1c5a00/build.gradle#L21
I think I know why you thought that logback.xml is still missing: the system property
logback.configurationFile
in theapplicationDefaultJvmArgs
pointed to the wrong location. The correct value is: https://github.com/beryx-gist/badass-runtime-example/blob/ae7ac75912ac0f00c3c57ba0b8a5ba09be1c5a00/build.gradle#L21
It worked. thank you.
I copy and paste this logback.xml file using the following code.
But , after creating a JPackage the file missing.
IN APP.cfg file
But , there is no file in that path.
How to bundle my file with JPackage ?