I am having a problem where I can not use jlink
for compiling and I now kind of know what is wrong: jlink
can not compile automated modules because they have unstable names. Is there a workaround or a fix for this? Here are the relevant parts of my code:
module-info.java
module org.example {
requires MathParser.org.mXparser;
exports org.example;
}
pom.xml
...
<dependency>
<groupId>org.mariuszgromada.math</groupId>
<artifactId>MathParser.org-mXparser</artifactId>
<version>4.4.2</version>
</dependency>
...
Main.java
...
import org.mariuszgromada.math.mxparser.*;
...
When compiling with jlink
, it gives this error message:
Required filename-based automodules detected. Please don't publish this project to a public artifact repository!
This question is no duplicate because it was not answered yet. The suggested question did not receive a fix or a workaround. Still it answers the technical things: What does "Required filename-based automodules detected." warning mean?