I need to generate module-info file for legacy jar which named as: selenium-chrome-driver-3.141.59.jar using the command:
jdeps --module-path modules --generate-module-info out selenium-chrome-driver-3.141.59.jar
But I'm getting as result:
Missing dependence: C:\...\selenium.chrome.driver\module-info.java not generated
Error: missing dependencies
org.openqa.selenium.chrome.ChromeDriver -> com.google.common.collect.ImmutableMap not found
org.openqa.selenium.chrome.ChromeDriver -> org.openqa.selenium.Capabilities not found
org.openqa.selenium.chrome.ChromeDriver -> org.openqa.selenium.WebDriverException not found
org.openqa.selenium.chrome.ChromeDriver -> org.openqa.selenium.html5.LocalStorage not found
org.openqa.selenium.chrome.ChromeDriver -> org.openqa.selenium.html5.Location not found
org.openqa.selenium.chrome.ChromeDriver -> org.openqa.selenium.html5.LocationContext not found
org.openqa.selenium.chrome.ChromeDriver -> org.openqa.selenium.html5.SessionStorage not found
org.openqa.selenium.chrome.ChromeDriver -> org.openqa.selenium.html5.WebStorage not found
org.openqa.selenium.chrome.ChromeDriver -> org.openqa.selenium.interactions.HasTouchScreen not found
...
I tried as mentioned here and here:
jdeps --module-path modules --add-modules=ALL-MODULE-PATH --generate-module-info out selenium-chrome-driver-3.141.59.jar
Then I'm getting the same error.
As alternative way, I tried to add separately modules like:
jdeps --module-path modules --add-modules org.openqa.selenium.chrome,org.openqa.selenium.remote --generate-module-info out selenium-chrome-driver-3.141.59.jar
And I see this:
Exception in thread "main" java.lang.module.FindException: Module org.openqa.selenium.chrome not found
at java.base/java.lang.module.Resolver.findFail(Resolver.java:877)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:128)
at java.base/java.lang.module.Configuration.resolve(Configuration.java:411)
at java.base/java.lang.module.Configuration.resolve(Configuration.java:245)
at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration.<init>(JdepsConfiguration.java:117)
at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration$Builder.build(JdepsConfiguration.java:563)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.buildConfig(JdepsTask.java:589)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:543)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:519)
at jdk.jdeps/com.sun.tools.jdeps.Main.main(Main.java:49)
And no matter which module I'll add, the issue will be always as:
java.lang.module.FindException name_of_your_module
Using one level higher didn't help me also:
jdeps --module-path modules --add-modules org.openqa.selenium --generate-module-info out selenium-chrome-driver-3.141.59.jar
The error will be:
Exception in thread "main" java.lang.module.FindException: Module org.openqa.selenium not found
at java.base/java.lang.module.Resolver.findFail(Resolver.java:877)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:128)
at java.base/java.lang.module.Configuration.resolve(Configuration.java:411)
So, the last thing that I can do is to create module-info manually and write inside each module using exports
?
Updated:
jdeps -cp guava-25.0-jre.jar;selenium-api-3.141.59.jar;selenium-remote-driver-3.141.59.jar selenium-chrome-driver-3.141.59.jar
To find classes via -cp option:
selenium-chrome-driver-3.141.59.jar -> guava-25.0-jre.jar
selenium-chrome-driver-3.141.59.jar -> java.base
selenium-chrome-driver-3.141.59.jar -> selenium-api-3.141.59.jar
selenium-chrome-driver-3.141.59.jar -> selenium-remote-driver-3.141.59.jar
I have added to selenium-chrome-driver-3.141.59.jar
, selenium-api-3.141.59.jar
also guava-25.0-jre.jar
and selenium-remote-driver-3.141.59.jar
.