Intelli J does not use maven to create a project that uses its own build process. It uses the pom file as a project description.
This means a couple of things, if you want to create an artifact, such as a war file when working in tomcat, then you only need to tell IntelliJ to build a war in the Run / Debug Configurations dialog box. IntelliJ will automatically create any artifacts that you specify on the deployment tab of the run / debug configuration. Therefore, if you indicate a blown up war, it will build a blown up war, if you indicate a regular war, it will build a regular war.
Sometimes people need to run custom plugins or create goals, in which case you can configure IntelliJ to run maven custom goals.
You can also tell intellIJ to start the target of the maven package, rather than build an artifact. IntelliJ will deploy everything under the target directory for tomcat.
The important answer is that IntellIJ uses two separate build systems. You must tell each build system what to do. And you need to tell IntelliJ, who is building a system to use for what. IntelliJ will use its own build system by default after importing the project, unless you tell it to use maven for something.
While IntelliJ will build the artifact that you specify in the pom file, it will not do such things as expand their artifact repository (local or other wise) unless you click on the deployment target in the Maven tool window.
In addition, if you change your pom file and do not enable automatic re-import, these changes will not be reflected in your project until you click the force re-import option from the maven tool window.
Karthik Ramachandran Apr 28 2018-11-11T00: 00Z
source share