NoModuleFileException:具有 uri 的模块不存在文件

NoModuleFileException: File does not exist for module having uri

我正在 websphere 上部署一个 J2ee 项目,我已经使用 intelliJ 设置了工件、ear 等。 这是一个多模块 Maven 项目,在我不小心修改了 intelliJ 中的一些设置之前一直运行良好。

可能是什么原因?什么 intelliJ 设置会影响这个?我已经尝试调查 pom 但它们看起来不错,而且我在问题之前没有修改它们。

错误是:

A file does not exist for module element having uri: namefile.war

如果您的 war 有快照更改您的 ear 插件以跳过文件名中的版本控制,如下所示:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <configuration>
                <version>6</version>
                <fileNameMapping>no-version</fileNameMapping>
            </configuration>
        </plugin>