Maven错误:模块的Maven项目配置不可用 [英] Maven Error : Maven Project Configuration for Module isn't availabe

查看:9343
本文介绍了Maven错误:模块的Maven项目配置不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试编译代码时,我一直收到此错误。我的目录中有pom.xml文件,但我不确定那里是否有错误。我发现互联网上只有一个关于此的链接,这不是我的情况: Maven项目配置模块所需

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

错误:Maven资源编译器:模块更新程序所需的Maven项目配置不可用。只有在从IDE启动外部构建时才支持Maven项目的编译。

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.

这是我的pom文件的内容:

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 would really appreciate your help. Thanks!

推荐答案

右键单击模块,然后从弹出菜单中选择Make Moduleproject module name选项。将显示消息。但是转到问题并立即查看。这将清除并纠正此问题。

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.

这篇关于Maven错误:模块的Maven项目配置不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆