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.propertiesfile. You can change the default bundle by updating the
liferay.workspace.bundle.urlproperty. 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’s
Navigate to the top right Configurations dropdown menu and select Edit Configurations. From here, you can configure your server’s run and debug configurations.
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 .
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!