首页 > 解决方案 > NoModuleFileException:具有 uri 的模块的文件不存在

问题描述

我正在 websphere 上部署一个 J2ee 项目,并且我已经使用 intelliJ 设置了工件、ear 等。这是一个多模块的 maven 项目,工作正常,直到我不小心修改了 intelliJ 中的一些设置。

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

错误是:

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

标签: javaintellij-ideawebsphere

解决方案


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

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

推荐阅读