Set java system properties in IntelliJ or Eclipse

前端 未结 3 1256
悲&欢浪女
悲&欢浪女 2021-02-01 14:25

I have a project which runs correctly under the terminal command

mvn package exec:java -Dplatform.dependencies -Dexec.mainClass=Demo

Now, I ne

3条回答
  •  执念已碎
    2021-02-01 14:42

    If you are like me, and showed up here trying to run tests that use the -P syntax instead of -D syntax, you can simply follow the instructions from MZF, but use the -D in place of the -P.

    For example, my test on the command line executed as:

    ./gradlew -Penvironment=qa project:test

    Using the -P in intellij on the VM line got rejected. Changing the -P to a -D ended up working, however.

提交回复
热议问题