How to rebuild / make .iml files in a multi-module maven project in Intellij 13.1.4

I work in a multi-module maven project in Intellij. In another module, there was a snapshot update that required updating in several POMs. Usually I click "Re-import all maven projects" from the maven plugin tool and then complete the build.

However, this time, the .iml files associated with the modified POM were not updated. Only after that, "Build-> Rebuild Project" updated the .iml files. Does anyone know how to update .iml files as part of the build configuration?

Note. Before rebuilding the project, I know that mvn at least picked up the change because my local .m2 repository had the last snapshot.

EDIT # 1: So, this is also true if I add the maven runtime dependency in the module. He will not pick up the changes if I do not rebuild the project.

+8
java intellij-idea maven
source share
1 answer

I had similar problems with newer versions of IntelliJ (2018.2.7) where my .iml is deprecated. This happens inconsistently, so I'm not sure what is the main reason, but the following workaround allows me to avoid a complete rebuild:

  1. Delete the .iml file for the project
  2. Reimport pom.xml for the project
  3. IntelliJ will automatically update the updated .iml file.
0
source share

All Articles