Jdeps missing dependencies

See original GitHub issue

Hello,

I’m somewhat reluctant to ask because I have a hunch I’m overlooking something silly, but I feel I’ve checked everything I could think of a couple of times over. I must confess this is the first time I’m using Java modules, and I have a hunch there is something not quite right in that general direction. This is what I did so far:

  • set up the environment according to the readme.md;
  • created a new repo using your template;
  • cloned it locally, tried it out, got a TestApp.dmg, installed that and it works fine;
  • merged the code from my original application in that repository;
  • changed some settings, like adding the javafx-fxml and javafx-web modules (I should replace the -web one with something more light-weight, I only use it to render rich text);
  • added the required Spring boot, H2 and FXWeaver dependencies and the H2 db files …

and hit mvn clean install

Result: git 2021-03-04 01-36-31 2

There’s a small .jar with only the classes from the src/ directory, and one of around ~30Mb in the shaded-jar directory. The unpacked-shade dir looks as if it contains what I would expect (eg Spring, H2, Hibernate etc.). But it goes wrong in the jdeps step. The java-tool reports:

Failed to execute goal io.github.wiverson:jtoolprovider-plugin:1.0.25:java-tool (jdeps) on project ithildin: jdeps 1 Details:

[INFO] 
[INFO] --- jtoolprovider-plugin:1.0.25:java-tool (jdeps) @ ithildin ---
[ERROR] jdeps failed with error code [1]
[ERROR]    --add-modules
[ERROR]    javafx.base,javafx.controls,javafx.graphics,javafx.fxml,javafx.web,java.logging
[ERROR]    --generate-module-info
[ERROR]    /Users/luthien/git/aduial/ithildin-app/target/work
[ERROR]    --module-path
[ERROR]    /Users/luthien/git/aduial/ithildin-app/mac-javafx/javafx-sdk-15.0.1/lib/
[ERROR]    /Users/luthien/git/aduial/ithildin-app/target/shaded-jar/ithildin.jar
[INFO] Error: Missing dependencies: classes not found from the module path and classpath.
To suppress this error, use --ignore-missing-deps to continue.
ithildin
   ch.qos.logback.classic.ViewStatusMessagesServlet   -> javax.servlet.http.HttpServletRequest              not found
   ch.qos.logback.classic.ViewStatusMessagesServlet   -> javax.servlet.http.HttpServletResponse             not found
... (4500 more lines like this)

It’s a LONG list 😉 - it looks like, well, as if I would generate the “Effective POM” in IntelliJ and then spell out every method included therein. Again, I have a hunch this is something really silly, but I can’t find it … 😓

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:51 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
Luthien-in-edhilcommented, Mar 16, 2021

I guess that goes to show I’m way more used to building backend services than desktop gui applications!

Thanks for the suggestions! MyBatis and JOOQ sound like they could be useful, I’ll check those out.

On 16 Mar 2021, at 21:48, Will Iverson @.***> wrote:

Looks like the javafx-weaver project hasn’t been updated in around a year.

Technically it’s possible to pick-and-choose bits of Spring. For example, you could just grab the dependency-injection core and Spring Data JPA and embed only those components. That said, my guess is that it’s going to be a lot of work sorting out the various components for relatively little reward.

If you are just looking for something to make queries easier, I’d check out MyBatis (https://blog.mybatis.org) and JOOQ instead. (https://www.jooq.org). Both of those are easier for embedding into an app like JavaFX than Spring Boot (IMHO). I love Spring Boot as a web development framework, but my (entirely personal, subjective) take is that it’s probably more work to embed in your situation than not.

As an aside, I actually do think there is a scenario for creating a Spring Boot local desktop app, more along the lines of an Electron (or even more precisely, https://neutralino.js.org) app. That would allow a Java/Spring Boot or JavaScript dev to build an app with a Spring Boot backend and ordinary HTML/JavaScript frontend.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

1reaction
wiversoncommented, Mar 12, 2021

Ok, I’ve updated the plugin to play better with Maven (e.g. running install again without running clean first), and also gone through and massively cleaned up, simplified, and documented the pom.xml and the rest of the documentation.

Let me know what you think!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing dependencies when generate-module-info jdeps
When you execute the following: jdeps --module-path modules --generate-module-info out com.demo.market.jar. The modules that are resolved ...
Read more >
jdeps
You use the jdeps command to launch the Java class dependency analyzer. ... Doesn't show missing dependencies from –generate-module-info output.
Read more >
6.2. Use jdeps to determine dependencies and identify way to ...
The jdeps command shows the package-level or class-level dependencies of Java class files. The input class can be a path name to a...
Read more >
jdeps --print-module-deps should report missing dependences
This option transitively analyzes libraries on class path and module path if referenced. Use --no-recursive option for non-transitive dependency ...
Read more >
Can't run jdeps · Issue #7044 · eclipse/jetty.project
jdeps --print-module-deps --ignore-missing-deps target/jetty11-1.0-SNAPSHOT-jar-with-dependencies.jar Exception in thread "main" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found