Maven cannot resolve modules
I am trying to create a source for this project (Kryo) . It has two modules defined in pom.xml
:
<modules>
<module>pom-main.xml</module>
<module>pom-shaded.xml</module>
</modules>
Both modules are red, with an error like "Unable to resolve symbol pom-main.xml
"
I have not found any other project examples where modules are defined by something other than a subdirectory with another pom.xml
file in it. Here, two files refer to the parent element pom.xml
.
As a result, it doesn't import the dependencies of the child modules and I can't build the project. I suspect that I didn't import the project correctly into IntelliJ IDEA, but couldn't figure out how to do it. I went to import project and selected parent directly from pom.xml
and it created a project with one module called kryo-parent
. I tried to check the checkboxes for "Import Maven Projects Automatically" and "Create Module Groups for Multi-Module Maven Projects", but both result in the same single module project kryo-parent
with unresolved modules.
I tried to navigate to File-> New-> Module from existing sources ... but it says "Can't import anything from C: / .... pom-main.xml". I tried to import a new project by selecting pom-main.xml
, but it gave the same error when I select one of these xml files.
source to share
No one has answered this question yet
Check out similar questions: