S
S
swaro2020-05-13 13:59:01
Maven
swaro, 2020-05-13 13:59:01

What if Maven can't build the project because it can't find the library?

Hello! I work in IntellijIDEA and I have this problem: an external library is imported (.jar), the IDE itself sees it, but when I run "mvn package" I get an error that the classes could not be imported.
I tried to add the library itself in 3 ways:

  1. I created a "lib" folder in the root of the project and threw the .jar of the library there, then opened "lib" inside the IDE, selected the library and pressed "add to library".
  2. Opened Project Structure, went to "Libraries", then chose "New Project Library -> Java"
  3. The same as in the second method, only added through "New Project Library -> From Maven ..."

What do I need to do in order for Maven to be able to build the project?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question