I've created a JavaFX project using IntelliJ, together with Maven. I'm trying to test some system that adds items into an XML file and then parses it and shows me all the items added to the file.
I want to use FasterXML/Jackson for parsing the files. In my pom.xml
, I've added the following dependency:
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.13.2</version>
</dependency>
(...) and I also loaded the Maven changes from the button provided by IntellJ. I also pressed the Reload all Maven Changes button. The "Dependencies" folder seems to be all okay. I've received no errors or complaints:
However, when I'm trying to import some Jackson-related class, such as ObjectMapper
, like this:
import com.fasterxml.jackson.databind.ObjectMapper;
(...) I receive such an error:
Package 'com.fasterxml.jackson.databind' is declared in module 'com.fasterxml.jackson.databind', but module 'com.example.demo1' does not read it
.
This is my project structure:
What could be the problem?