java - NoModuleFileException:具有 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>
推荐阅读
- javascript - JavaScript array.includes 返回 false(比较来自链接数组的用户输入)
- python - BeautifulSoup - 如何从更深层的 html 中提取信息
- html - 添加到叠加图像的链接
- javascript - window.open() 打不开网站,怎么办?
- amazon-web-services - Get Account ID from Account Alias (boto3)
- asynchronous - 未处理的异常:类型 '_InternalLinkedHashMap
' 不是类型 'Future 的子类型 ' - jquery - Problem in Jquery & Ajax call to Spring MVC Controller
- php - PDO could not find driver, even with extension=pdo_pgsql enabled
- docker-compose - Docker: run multiple container on same tcp ports with different hostname
- javascript - SVG 与其他具有数千个节点的绘图效率