Maven Error : Maven Project Configuration for Module isn't available
Solution 1
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.
Solution 2
Right-click on pom.xml and then click on "Add as Maven Project".
Solution 3
In my case the problem ocurred after uprgrading IJ from 14.x to 15.x and disappeared when I issued Build -> Rebuild Project
Solution 4
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
Solution 5
In my case, I had to use the following trick:
Right click the module name in the project panel
Select "Open Module Settings"
In the pop-up window, click Dependencies
Select java version 1.8.0_151
Related videos on Youtube
Nat
Updated on July 09, 2022Comments
-
Nat almost 2 years
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.
-
Nat over 8 yearsThanks for your reply, I see. I am gonna try it but two questions: 1. how do I know it originates from line 43 and 2. Where can I see it needs configuration.xml? Thank you!
-
Lars Gendner over 8 yearsTo your questions: 1. line 43 reads
context.processMessage(new CompilerMessage(BUILDER_NAME, BuildMessage.Kind.ERROR, "Maven project configuration required for module '" + target.getModule().getName() + "' isn't available. Compilation of Maven projects is supported only if external build is started from an IDE."));
, which pretty much is the error message you get. And 2. you find that when you descend intoJpsMavenExtensionService.getInstance().getMavenProjectConfiguration
. -
matbrgz over 6 yearsJust had same issue with a rather intricate maven project with 2017.2.1. Why does this help?
-
robbie70 about 5 yearsunbelieveable, I have spent days trying to sort this problem out and tried a million things but finally your solution worked for me ! thank you. For info I am using Intellij 2018.3, java 11 (but only using version 8 language level in my project), maven 3.6. Update : Although this works - there is something strange going on - after I run Rebuild Project and then run my "mvn clean", "mvn validate", "mvn compile" - I sometimes still get the error mentioned above.
-
Mike Miller over 4 yearsThis just fixed a problem I had when upgrading from 2019.1.2 to 2019.2.1; so whatever is going on, it is still an issue.
-
luizfzs over 4 yearsWorked on 2018.2.1
-
cellepo over 4 yearsI think this helped me on
2019.2.2 (Ultimate Edition)
for Mac. -
pernpas over 4 yearsI had the same issue when after update to 2019.3 on Ubuntu. After rebuilding the project the problems are gone now
-
packoman over 4 yearsThis solve this error, that I had:
Error:Maven Resources Compiler: Maven project configuration required for module '...' isn't available. Compilation of Maven projects is supported only if external build is started from an IDE.
-
ABC123 over 4 yearsIn IntelliJ 2019.3 the menu item I found was 'Build Module <project module name>'.
-
Christoph over 2 yearsThank you, this simple step helped me too on 2021.2.2 (Community Edition) for Linux!
-
Varun over 2 yearsThanks. But it was already unchecked for me, so didn't work.
-
Varun over 2 yearsI'm on intelliJ and can not not find the option to 'Open Module Settings'.
-
Varun over 2 yearsIt didn't for me. Thanks, tho'.
-
Varun over 2 yearsI'm on IntelliJ and I can not find the option to 'Make Module'. Thanks, tho'.
-
Varun over 2 yearsIt's already added as Maven Project in my case. Tried 'Unlink Maven Project' and followed the solution then, but it didn't work. Thanks, tho'.
-
Jason Huang almost 2 yearsWorked for me in 2022. Thanks