I have a maven project, which has a library (hello1.jar), that I add with IDEA. In this jar file I have the class ru.training.Hello1. In project I have the class Hello2, which contains field Hello1 hello1. When I try to compile the project with maven lifecycle, I get an error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project Learning: Compilation failure: Compilation failure:
[ERROR] /C:/Projects/Learning/src/main/java/reflection/Hello2.java:[3,19] package ru.training does not exist
[ERROR] /C:/Projects/Learning/src/main/java/reflection/Hello2.java:[7,13] cannot find symbol
[ERROR] symbol: class Hello1
What can I do to fix this error?