Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Error : Maven Project Configuration for Module isn't available

I keep getting this error when I try to compile my code. I have the pom.xml file in my directories but I am not sure if there is something wrong in there. I found only one link on the internet regarding this and that was not my case: Maven project configuration required for module

Error:Maven Resources Compiler: Maven project configuration required for module 'updater' isn't available. Compilation of Maven projects is supported only if external build is started from an IDE.

Here is the content of my pom file:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0     http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.nothing.updater</groupId>
    <artifactId>Updater</artifactId>
    <version>1.0-SNAPSHOT</version>


    <!--<dependencies>-->
        <!--<dependency>-->
            <!--<groupId>com.nothing.toolbox</groupId>-->
            <!--<artifactId>Toolbox</artifactId>-->
            <!--<version>1.1</version>-->
        <!--</dependency>-->

    <!--</dependencies>-->
</project>

I am using a multi-module project.

like image 900
Nat Avatar asked Aug 14 '15 15:08

Nat


4 Answers

Right-click on pom.xml and then click on "Add as Maven Project".

like image 87
Kajzer Avatar answered Nov 15 '22 20:11

Kajzer


Right click the module and select the Make Module "project module name" option from the pop up menu. The messages will be shown. But go to Problems and see now. This will clear and correct this problem.

like image 37
Ojitha Avatar answered Nov 15 '22 20:11

Ojitha


In my case the problem ocurred after uprgrading IJ from 14.x to 15.x and disappeared when I issued Build -> Rebuild Project

like image 34
Maksymilian Wojakowski Avatar answered Nov 15 '22 20:11

Maksymilian Wojakowski


My problem with this error under 2019.3.4 is related to the build delegating to Maven. Idea is letting Maven build my project first and that build is failing because I broke a test. I get around this problem by not allowing IDEA to delegate to Maven. On Mac OS Catalina: Intellij -> Preferences -> Build, Execution, Deployment -> Build Tools -> Runner and uncheck Delegate IDE Build/run actions to Maven

enter image description here

like image 4
Will Avatar answered Nov 15 '22 21:11

Will