Ask Your Question
0

How can I prevent Maven from executing tests during the compilation process in IntelliJ?

asked 2022-08-22 11:00:00 +0000

lalupa gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-03-21 21:00:00 +0000

lakamha gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-08-22 11:00:00 +0000

Seen: 12 times

Last updated: Mar 21 '23