N
N
Nevars2014-06-25 00:02:52
Java
Nevars, 2014-06-25 00:02:52

How to force see dependency in maven project?

Hello.
There are 2 maven projects. I write under IDEA. The first project (let's call it project A) compiled and marked up the artifact in the local repository.
The second project (let's call it project B) uses an artifact from project A, or rather uses an instance of the class. With the help of IDEA features, I add this artifact to project B.
Project B has the structure:

projectB
                            |-- pom.xml
                            |-- src
                                |-- main
                                    |-- java
                                        |--ru
                                            |-- ru.sample
                                                -- Sample.java
                                |-- test
                                    |-- java
                                        |-- ru
                                            |-- ru.sample
                                                -- SampleTest.java

When I write an instance of the project class A in the Sample.java class protected ListElemene element;, IDEA prompts me to either create a class or connect a maven dependency. But in the pom.xml file, the dependency is already there.
How to be in such a situation?
PS If the structure of project B is as follows:
projectB
        |-- pom.xml
        |-- src
             |-- main
                  |-- java
                      --App.java
             |-- test
                  |-- java
                      --  AppTest.java

Then everything will work well
Thank you in advance for your help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2016-10-21
@lemon55

If it is assembled from under the console without problems, then this is a problem with IDEA, or rather its maven plugin. You need to click update dependencies in the maven window, or Import Maven Project Automaticaly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question