Installing a Liferay server in IntelliJ is easy. In just a few steps, you’ll have your server up and running.
Follow these steps to install your server:
-
Right-click your Liferay Workspace and select Liferay → InitBundle.
This downloads the Liferay DXP bundle specified in your workspace’s
gradle.properties
file. You can change the default bundle by updating theliferay.workspace.bundle.url
property. For example, this is required to update the default bundle version and/or type (e.g., Wildfly). The downloaded bundle is stored in the workspace’sbundles
folder. -
Navigate to the top right Configurations dropdown menu and select Edit Configurations. From here, you can configure your server’s run and debug configurations.
Figure 1: You have several options to choose from the server dropdown menu.
-
Click the Add New Configuration button (
) and select Liferay Server.
-
Give your server a better name and modify any other configurations, if necessary. Then select OK .
Figure 2: Set your Liferay server's configurations in the Run/Debug Configurations menu.
Your server is now available in IntelliJ! Make sure to select it in the Configurations dropdown before executing the configuration buttons (below).
For reference, here’s how the IntelliJ configuration buttons work with your Liferay DXP instance:
- Start (
): Starts the server.
- Stop (
): Stops the server.
- Debug (
): Starts the server in debug mode. For more information on debugging in IntelliJ, see the IntelliJ Debugging article.
Now you’re ready to use your server in IntelliJ!