Maven additional arguments in IDEA
Hi,
I have been trying to find a way to specify addional arguments to a maven target/goal.
For example in the command line I could write
mvn compile -Denforcer.skip=true
or
mvn compile -Pprofile
Can someone teach me how to set up specific properties or profiles like in the previous example.
Cheers.
Vitor.
Please sign in to leave a comment.
How are you executing the goals? If you are using the Maven tool window there is a "Profiles" tree you can expand and check off the ones you want (it reads these from your settings and POM):


If you are executing via Run Configuration there is a field specifically for profiles:
In the "Runner" tab of that same screen you can set VM options which is where you can put your -D options. You can create Run Configurations from the Maven Tool Window by right clicking a goal and selecting "Create" with the little gear next to it.
That was extremly helpfull Russ, thank you very much.