1

I trying to convert Ice build to use Java modules, we build source and doc JARs along the main jars and put all of them in a lib directory

When I try to use the new modules setting --modules-path to the lib directory, I getting errors related to same module found in the main jar and the doc jar.

java --describe-module com.zeroc.ice --module-path lib
Error occurred during initialization of boot layer
java.lang.module.FindException: Two versions of module icestorm found in lib (icestorm-3.7.2.jar and icestorm-3.7.2-javadoc.jar)

Is there something I can do to avoid this kind of conflict, or should I Just not be putting the doc and sources JAR files in the lib directory along the main JARs.

Naman
  • 27,789
  • 26
  • 218
  • 353
José
  • 3,041
  • 8
  • 37
  • 58
  • By the names of those `jar`s, just have `icestorm-3.7.2-javadoc` there in the `lib` folder. Assuming it means including all class(from the `icestorm-3.7.2` jar) as well as javadoc generated jar. Cause: Both these modules are ending up with same module name(mostly automatic modules) in the module-path. You can try out the `jar` tool on individual jars to [describe modules for those jars](https://stackoverflow.com/a/46393846/1746118) and confirm the same. – Naman Jun 27 '19 at 10:28
  • My concern is just that I'll not be able to use `--module-path lib` for build applications, I guess I will have to move the sources and doc jars to separate folder if I want to do that – José Jun 27 '19 at 10:39
  • 1
    ... or if these are automatic modules, you can rename the `icestorm-3.7.2-javadoc` to `icestorm-javadoc-3.7.2`, should work I believe. – Naman Jun 27 '19 at 13:46

0 Answers0