Closed Siedlerchr closed 10 months ago
Do you have non-modularized dependencies in your project? See #154 ?
Hi, yes, there are a few ones. We also have a third-party scala libary (scala does not support jigsaw fully) and we already have the modularizer plugin in our build gradle: This combination works, however, just upgrading openjfx plugin doesn't. https://github.com/JabRef/jabref/blob/1ed081f4e9c2e0f19719ea056eec868c50fcd4f1/build.gradle#L12-L14
Maybe you also need what I mentioned here: https://github.com/openjfx/javafx-gradle-plugin/pull/154#discussion_r1317753483
That is also disabled: https://github.com/JabRef/jabref/blob/1ed081f4e9c2e0f19719ea056eec868c50fcd4f1/build.gradle#L43-L63
Edit//. We also need to configure some exports for run configuration:
Pinging @jjohannes, he might find if the issue is related to the recent changes.
I gave it a quick shot and cloned the repo and switched to the updatejfxplugin
branch. Since I have a clean system luckily I can rule out the repositories { mavenLocal(), ... }
I saw from potentially affecting me.
I managed to get it to work at the end, here's a few observations.
assemble
first, and the first thing I noticed was javafx-{base,control,etc.}-{linux,mac-aarch64}.jar
mixed in. Meaning there were both linux
and mac-aarch64
mixed.exclude group: 'org.openjfx'
on all dependencies I could find that brought JavaFX (via ./gradlew dependencies
). Namely, org.jabref:afterburner.fx
, com.tobiasdiez:easybind
, com.dlsc.gemsfx
, org.controlsfx:controlsfx
.assemble
worked for me. I also tried run
and it worked as well.I'm not sure what the result would be from a dependency with a classfied JavaFX jar via thirdPartyCompatibility
in the Gradle Module Metadata could do after the update to 0.1.0
but likely the issue lies around that. My initial wild guess is that the external classified dependency is causing issues.
Thanks for the info! We will try this ASAP
The analysis @samypr100 did is correct. I Believe the only issue is with org.jabref:afterburner.fx:1.1.0-SNAPSHOT
though (https://s01.oss.sonatype.org/content/repositories/snapshots/org/jabref/afterburner.fx/1.1.0-SNAPSHOT/afterburner.fx-1.1.0-20221226.155809-7.module). @Siedlerchr if you would update the JavaFX plugin in the org.jabref:afterburner.fx
as well and publish a new snapshot, the problem should be gone. It would be a better solution – solving the problem at the source – instead of adding excludes.
@samypr100 This could also be considered a "breaking" change in the plugin. The previous version rewrote the whole classpath/module path and removed the "wrong" transitive Jars. However, I think I would keep it like this. If problems like this occur, the library authors should be informed to publish a patch with fixed metadata. And as an intermediate solutions users might us "exclude" to deal with the wrong metadata. This might be worth a mention in the migration notes (#154).
I published a new snapshot of the afterburner with the new plugin and now it works fine. Thanks again for the support!
I tested this plugins newest version 0.1.0, however, when I tried to start the application using ./gradlew run I got the folllowing error:
Version 0.14 still works: I am using a mac m1 I created a PR/branch for reproducing at our project https://github.com/JabRef/jabref/pull/10339