I am trying to use moditect in order to allow creating runtime image while using automated named modules (ArcGIS). ArcGIS module requires openjfx 11 (which I have added as dependency as well, since it is an JavaFX project). However, when I am trying to build the runtime image, I am getting the following error
java.lang.IllegalArgumentException: duplicate element: javafx.base
I think it is because maven is also adding the ArcGIS openjfx dependency to the project (this includes openjfx for every platform (win, mac, linux), which causes it to have duplicate javafxs.
How should I add module info without also adding the openjfx dependencies?
Here the part of pom.xml
with moditect plugin if that helps
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<executions>
<execution>
<id>add-module-info-to-dependencies</id>
<phase>package</phase>
<configuration>
<overwriteExistingFiles>true</overwriteExistingFiles>
<outputDirectory>${project.build.directory}/modules</outputDirectory>
<modules>
...
<module>
<artifact>
<groupId>com.esri.arcgisruntime</groupId>
<artifactId>arcgis-java</artifactId>
<version>${arcgis.version}</version>
</artifact>
<moduleInfo>
<name>com.esri.arcgisruntime</name>
</moduleInfo>
</module>
</modules>
</configuration>
<goals>
<goal>add-module-info</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>