Hi I am new with java modules so this might be a dumb question.
I was trying to sign my jar file with keystore and got the following error.
user@Ubuntu:libs(master)$ jarsigner -keystore keyStoreFileName Test.jar alias
Enter Passphrase for keystore:
jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: module-info.class
I couldn't find any documentation of how to avoid this.
So I did jar -tf to check the content of the jar and yes, it does have multiple module-info.class files
Is there any option to combine them? and how?
my module-info.java contains the following.
module module_name {
requires java.desktop;
requires java.prefs;
requires javafx.controls;
requires javafx.fxml;
requires javafx.web;
requires org.jsoup;
opens com.test.apps to javafx.fxml;
exports com.test.apps;
}
and I am creating jar with gradle like this
jar {
manifest {
attributes 'Main-Class': 'com.test.apps.Main'
attributes 'Application-Name': 'Test'
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
I know I shouldn't post screenshots, but here is the jar opened with archive manager

there are 7 module-info.class files, 1st one generated on 23-Dec-18 (today) rest all are from 05-Nov-18 which I remember upgrading to java 11 that day,
so those are added from my dependencies, how can I integrate them into one class? or are there other option to sign a jar?
again, this is coming from a noob.
[Edit] if you are looking for complete source code, it is in GitHub -> https://github.com/CodingOtaku/Animu-Downloaderu