2

I have a simple non-modular jar file main.jar that depends on libA.jar and libB.jar. These three jar files all reside in the current directory. I want jdeps (version 15.0.1) to generate a module-info.java file for main.jar. Here's my shell command (using cmd.exe on Windows):

jdeps --module-path .  --add-modules=ALL-MODULE-PATH --generate-module-info . main.jar

This command indeed produces the desired module-info.java file but also issues this warning:

Warning: split package: org.example.main file:///D:/Temp/./main.jar main.jar
writing to .\main\module-info.java

The package org.example.main does only exist in main.jar - so I reckon there should be no warning.

Any hints as to why jdeps does see a problem here ?

Angle.Bracket
  • 1,438
  • 13
  • 29
  • 2
    what is your `--module-path` and why are you trying to generate the module-info in the same folder as it (`.`)? you can refer to a sample command in [this answer](https://stackoverflow.com/a/47512109/1746118) – Naman Jan 08 '21 at 17:16
  • @Naman: I tried to keep it simple and put the jar files `libA.jar`, `libB.jar` (on which `main.jar` depends) and `main.jar` in the current directory. If I put only `libA.jar` and `libB.jar` in a new subfolder `modules` and run `jdeps --module-path modules --add-modules=ALL-MODULE-PATH --generate-module-info . main.jar` the warning disappears. But I still don't get why it appeared when all jars resided in the same directory. – Angle.Bracket Jan 11 '21 at 09:29
  • I cannot really say much about why it warned while other jars were there. Maybe a reproducible example over GitHub can help explain things better? – Naman Jan 11 '21 at 09:54

0 Answers0