Currently, I am trying to link a maven project with Java 9's module system however I keep getting the same error in every module.. (using Java 11)
Module 'common' reads package 'javafx.beans' from both 'javafx.base' and 'javafx.base'
I have been struggling with it for hours now. So far, I can conclude that every time I require javafx module it happens and it has probably something to do with duplication. In Project Structure (Intellij IDEA) two of each exists, version 11.0.2 (I have installed) and version 11.0.1 (from fontawesomefx). If I remove all the 11.0.1 versions, the implementation won't work.
module-info.java
module common {
exports common.services;
exports common.sidebar;
requires de.jensd.fx.fontawesomefx.commons;
requires javafx.graphics; // comment both javafx out, no error occurs except in the implementation.
requires javafx.controls;
}
pom.xml of common:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>parent</artifactId> <!-- replaced original id -->
<groupId>me.name</groupId> <!-- replaced original name -->
<version>0.0.6</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>common</artifactId>
<dependencies>
<dependency>
<groupId>de.jensd</groupId>
<artifactId>fontawesomefx-commons</artifactId>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
</dependency>
</dependencies>
</project>
I hope this is enough information otherwise I can provide more. Thanks!