当从项目中删除某些Java文件(手动或通过版本控制手动删除)时,我经常遇到问题。在项目的.iml文件中仍然存在引用。
这会导致在构建过程中出错(在IntelliJ中开始构建):
Error:osgi: [myproject] Input file does not exist: C:/dev/myproject/src/main/java/com/mycompany/myproject/IntentionallyDeletedFile.java
检查.iml文件,可以在以下位置找到引用:
<component name="FacetManager">
<facet type="Osmorc" name="OSGi">
<configuration manifestGenerationMode="OsmorcControlled" ...>
<additionalProperties>
...
<property key="Include-Resource"
当我从那里手动删除它时,该构建再次起作用。但是我认为IntelliJ应该能够自动处理此问题。