Does the "Run" button trigger a clean installation?
已回答
After making a change to a Java class, is it enough to press “Run” for IDEA to run a maven installation or do I first need to specifically run `mvn clean install` before I press “Run”?
Any links to IDEA documentation about this are also appreciated.
请先登录再写评论。
For Maven-based Project it is best to use options from Maven Tool Window and the corresponding Run/Debug Configurations.
Options from the Build Menu rely on IDEA's Native Build System, which follows logic similar to Maven's, but does not have the same exact Goals/Lifecycles.
What confuses me is this: i run a build from the IDEA builtin terminal `mvn clean install`. When I then hit “run”, it again goes to the “Build tab where it says ”writing classes" and more.. Why is it doing this, because compilation was already as part of the mvn command no?
Can you please clarify which option you are referring to as “run” (if possible, provide a screenshot)?
Most likely, it is an option that relies on IDEA's Native Build System, mentioned in my previous message. This system is completely independent from Maven and therefore does not account for tasks performed by it.
Roman Vatagin Sure, one of these buttons
Thank you for the clarification!
Those buttons run/debug the currently selected Run/Debug Configuration.
IDEA support a variety of different Run/Debug Configurations types, including Maven's ones and IDEA native ones ("application" type).
Based on your description it appears you are running one of the native ones, which, as mentioned above, is “parallel” to Maven.