0

When I try to create an image via Eclipse (clean javafx:jlink) I get this errors:

[WARNING] Required filename-based automodules detected. Please don't publish this project to a public artifact repository!

Error: automatic module cannot be used with jlink: jasperreports from file:///C:/Users/User/.m2/repository/net/sf/jasperreports/jasperreports/6.12.2/jasperreports-6.12.2.jar

[ERROR] Command execution failed.

My module.info:

module my.application {
  requires transitive javafx.base;
  requires javafx.graphics;
  requires javafx.fxml;
  requires jasperreports;
  exports  my.application;
}

My pom.xml:

...
    <!-- https://mvnrepository.com/artifact/net.sf.jasperreports/jasperreports       -->
    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports</artifactId>
        <version>6.12.2</version>
    </dependency>
...
    <plugin>
         <groupId>org.openjfx</groupId>
         <artifactId>javafx-maven-plugin</artifactId>
         <version>0.0.3</version>
         <configuration>
            <stripDebug>true</stripDebug>
            <compress>2</compress>
            <noHeaderFiles>true</noHeaderFiles>
            <noManPages>true</noManPages>
            <mainClass>my.application.App</mainClass>
            <launcher>launcher</launcher>
            <jlinkImageName>my-application</jlinkImageName>
        </configuration>
     </plugin>

How should I solve this problem? I'm using Eclipse IDE 4.15 with OpenJDK 14.

Community
  • 1
  • 1
  • Obviously jasperreports does not have a module name nor at least an Automatic-Module-Name defined...so you need to make a module first of it ... – khmarbaise Apr 08 '20 at 17:12
  • You shall also take a look at https://stackoverflow.com/questions/56395749/error-automatic-module-cannot-be-used-with-jlink-maven-with-javafx and without modular jars `jlink` isn't going to help much. – Naman Apr 08 '20 at 17:49

0 Answers0