Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can prevent Maven from executing tests during the compilation process by adding the following option in the Run Configuration in IntelliJ:

-DskipTests=true

To do so, follow these steps:

  1. Open the Run Configuration dialog in IntelliJ by selecting "Edit Configurations" from the drop-down menu next to the Run button.

  2. Select the Maven project from the list of configurations.

  3. In the "Command line" field, add -DskipTests=true at the end of the command.

  4. Click on "OK" to save the configuration.

Now, when you run the Maven project, IntelliJ will skip the test phase and only compile the code.