Specify gradle project properties when running "Deploy/Run WAR on Weblogic"

Answered

I have a multi project application which builds a WAR file.  I have a project property "rundev" which I can specify on the command line when building the war

gradle war -Prundev

I need this project property set when I run the "Deploy/Run WAR on Weblogic" run configuration from inside IntelliJ.  This command will build the war then deploy it to my local Weblogic.   I can not work out how to set this project properties so when the war is build it uses this project property.

Any suggestions how to do this?

My IntelliJ version

IntelliJ IDEA 2021.2.3 (Ultimate Edition)
Build #IU-212.5457.46, built on October 12, 2021
Licensed to Oracle

Runtime version: 11.0.12+7-b1504.40 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2032M
Cores: 8

Kotlin: 212-1.5.10-release-IJ5457.46

0
1 comment

You can build your WAR file using Gradle and deploy it as External Source configuration from IntelliJ IDEA.

Create a new configuration for the Gradle task that builds the war from the Gradle tool window, specify the options you need:

 

Then in your WebLogic configuration add this Gradle build configuration in Before Launch steps:

 

 

In the Deployment tab use External Source option and provide the path to the war file produced by the Gradle war build configuration:

0

Please sign in to leave a comment.