Workspace Properties and Configurations
Workspace properties and configurations play a crucial role in tailoring your Liferay development workflow and project setup. Here, you'll explore essential properties and settings that Clarity's development team members can use to enhance their processes.
Gradle Properties
Before you begin working with your workspace, you should review and configure your workspace's Gradle properties set in the gradle.properties
file. You can go to the workspace’s GETTING_STARTED.markdown
file to see available properties and their default values. To customize these settings, copy these properties in to the gradle.properties
file and assign your preferred value.
For example, if you want to store your modules in a folder other than [ROOT]/modules
, add the liferay.workspace.modules.dir
variable and set it to a different value. For a complete list, review your workspace’s GETTING_STARTED.markdown
file.
Portal Properties
Portal properties enable you to customize and override the default behavior of Liferay DXP. The default properties file is embedded within your Liferay installation's portal-impl.jar
. To override one of these properties, you'll need to create an extension portal properties file (portal-ext.properties
) and specify the properties you want to change. In this extension file, you only need to include the properties you want to override.
For example, to configure your local portal to use a MySQL database, you would add the following properties to your [Liferay Home]/portal-ext.properties
file:
See Portal Properties for a complete list of configurable portal properties.
Property File Prioritization
Liferay uses a hierarchy to determine which property file takes precedence when multiple files define the same property. Here's the order of priority from highest to lowest:
[Liferay Home]/portal-setup-wizard.properties
[user home]/portal-setup-wizard.properties
[Liferay Home]/portal-ext.properties
[user home]/portal-ext.properties
[Liferay Home]/portal-bundle.properties
[user home]/portal-bundle.properties
[Liferay Home]/portal.properties
portal-impl.jar/portal.properties
Due to its relatively high priority, [Liferay Home]/portal-ext.properties
is the most commonly used file for overriding default properties.
Conclusion
By understanding and leveraging workspace properties and configurations, you can tailor your Liferay development environment to match your project's requirements. Next, you'll explore how to use a workspace’s configs
folder to manage environment-specific configurations.
Capabilities
Product
Education
Contact Us