Reputation: 61
Which maven build lifecycle phase is executed by clicking the " load maven changes " in intelliJ (you know, the little m letter that pops up each time you change something in the pom).
Cheers!
Upvotes: 6
Views: 876
Reputation: 321
Not a complete answer but for illustration a screenshot from IJ 2020.2.4. Guessing from the text "Analyzing..." showing up when clicking the "m" IntelliJ performs a mvn dependency:analyze
using Maven dependency plugin.
[]
Upvotes: 1
Reputation: 59
Well, thats a tricky question.
IDEA get project model using maven components classes, during import it does not execute maven goals per se. IDEA loads maven libraries, injects into maven process, and calls maven classes directly.
In short words, at first IDEA reads project model (using
org.apache.maven.model.io.ModelReader
class, I don't know if exact lifecycle exists)
Then dependencies and plugins resolved (well, again using maven classes directly, but this could be mapped to dependency:resolve
). You can look implementation at org.jetbrains.idea.maven.server.Maven3XServerEmbedder
To generate sources, phase which set in File | Settings | Build, Execution, Deployment | Build Tools | Maven | Importing |Phase to be used for folders update
used
Frameworks detection/compiler settings/language level/artifacts configuration/etc, are not taken from maven execution at all. For such things IDEA read pom.xml files using own parser.
But what do to want to achieve? If you describe your issue and what do you want to get in result, I'll try to help you find a solution.
Upvotes: 1