I am new to intellij. I would like to add program arguments for my maven command-line application so that they can be used in a method main(String[] args), for example:, -pg 541which indicates some method that will be launched in my main function.
I tried to do this using the Maven configuration (Run / Debug Configurations), adding the arguments directly to the command line section, but this failed.
I also tried JUnit, which launches the Maven project, but the program options section is disabled.
Here is a snapshot of what I tried.
using unit configuration:

using maven configuration:
