Comments (9)
Hi @streamingdv!
I planned to split some JP features into several Maven plugins and Gradle tasks, so you can combine them, e.g, you can call CreateAppTask
, run your stuff, and then call GenerateInstallerTask
. I think this could bring a lot of possibilities. JP internal logic is able to do this:
Anyway, I'll try to reproduce your issue and find a simple solution or a workaround.
If you want to do some research by yourself, take a look into this:
This is the snipet of code which copies dependencies in Gradle.
from javapackager.
It's explained here
from javapackager.
Thanks, it works now with the provided Snapshot. :)
I hope this will make it into the next release.
from javapackager.
Hi again!
I've managed to reproduce your issue:
C:\Users\fvarrui\GitHub\HelloWorldGradle>build\HelloWorldGradle\HelloWorldGradle.exe
Error occurred during initialization of boot layer
java.lang.module.FindException: Two versions of module javafx.graphics found in libs (javafx-graphics-22-win.jar and javafx-graphics-20.0.1-win.jar)
The problem is not about duplicated jars, but duplicated modules (javafx.graphics
module is twice) ... what if you call your custom javafx.graphics.jar
with the same name as the JAR which is being included by javafx-gradle-plugin
('javafx-graphics-22-win.jar
), so it'll be ovewriten with your custom JavaFX jar. I've just released a SNAPSHOT version with DuplicatesStrategy=EXCLUDE when copying libraries to avoid this error: 1.7.6-20240421.230018-6
... try it and give me some feedback, please.
from javapackager.
Could not find io.github.fvarrui:javapackager:1.7.6-20240421.230018-6
Which maven repo should I include in my gradle script in order to use the snapshot?
from javapackager.
New snapshot released: 1.7.6-20240423.010107-7
.
Now duplicatesStrategy=WARN
by default, but you can set a different duplicates strategy to your PackageTask
:
tasks.register('packageApplication', PackageTask) {
// mandatory
mainClass = 'com.grill.app.Launcher'
// optional
bundleJre = true
generateInstaller = true
administratorRequired = false
copyDependencies = true
[...]
duplicatesStrategy = DuplicatesStrategy.[EXCLUDE|FAIL|INCLUDE|INHERIT|WARN]
}
and this should work too:
tasks.configureEach {
if (it instanceof Copy || it instanceof Zip || it instanceof Tar || it instanceof PackageTask) {
it.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
from javapackager.
Please, let's keep this issue open untill it's released
from javapackager.
Branch issue-400
merged into devel
, ready to be released in 1.7.6
from javapackager.
v1.7.6 released to Maven Central
from javapackager.
Related Issues (20)
- After turning on administrator Required, there is no response after entering the password when starting under mac. HOT 14
- With "org.apache.poi" in my project, there is always "module not found" error occured HOT 17
- mis/exe installation package custom installation path HOT 3
- Fat Jar doesn't seem to work as expected HOT 13
- How to make a clean terminal app for MacOS? HOT 5
- How can I set the singleInstance property of launch4j through a plugin HOT 3
- About GraalVM HOT 2
- when I try tro execute the .exe file, it repots "The application requires a java Runtime Environment" HOT 21
- How can I package for macOS with the demo ? https://github.com/fvarrui/JavaPackager/issues/409 HOT 1
- Erro “require java runtime environment......” in 1.7.6-SNAPSHOT HOT 2
- Question (or bug) about PKCS11 keystore type HOT 13
- How to keep old data files when upgrading? HOT 10
- Resource loading exception HOT 5
- javapackager packaging and security HOT 1
- Plugin searches for some library `tool.jar` on Mac under hard coded, non-existing path and fails right away HOT 12
- I need help about that HOT 1
- Path resolution causes bundled jre to not be found on linux when building from windows HOT 15
- Incomplete set of modules for customized JRE HOT 4
- Duplicate symbol 'File:default_local.policy' found. This typically means that an Id is duplicated. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javapackager.