wiverson / maven-jpackage-template

Sample project illustrating building nice, small cross-platform JavaFX or Swing desktop apps with native installers while still using the standard Maven dependency system.
Apache License 2.0
347 stars 53 forks source link

Jdeps missing dependencies #8

Closed Luthien-in-edhil closed 3 years ago

Luthien-in-edhil commented 3 years ago

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:

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 ... 😓

Luthien-in-edhil commented 3 years ago

Sure, that’s fine!

On 16 Mar 2021, at 23:10, Will Iverson @.***> wrote:

 I'm going to go ahead and close this issue down, as I think it's been sorted out - tl;dr don't bother with modules if you don't work on the JDK or JavaFX. Ha.

Please feel free to email me directly if you have any Qs or updates. :) wiverson AT gmail DOT com.

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