Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Eric Smith
Conditional statements in portal-ext.properties
15 mai 2013 12:37
Réponse

Eric Smith

Rang: Junior Member

Publications: 58

Date d'inscription: 28 août 2012

Publications Récentes

Are there any plans on adding conditional statements to portal-ext.properties? They would be useful for standardizing portal-ext.properties files across several developers (and development environments). It would make updating the file and keeping it synchronized much easier. It may also be useful in production in a multi-server configuration.

I'm not sure exactly how it could be implemented, but we would want to base certain properties on IP address, hostname or something like that. One example of a property that we would make dependent is a database connection.
Jorge Ferrer
RE: Conditional statements in portal-ext.properties
15 mai 2013 17:03
Réponse

Jorge Ferrer

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2757

Date d'inscription: 31 août 2006

Publications Récentes

You can achieve the same by including a file based on a system variable. Don't have the exact syntax right now but it would look something like this:

include-and-override=portal-env-${environment}.properties

Where "environment" could be a sysproperty.

Another commonly used solution is to just place portal-ext.properties in the liferay.home or in the user.home and have it be different in each environment (since it's not inside the distributed packages)
Eric Smith
RE: Conditional statements in portal-ext.properties
16 mai 2013 12:59
Réponse

Eric Smith

Rang: Junior Member

Publications: 58

Date d'inscription: 28 août 2012

Publications Récentes

Perfect, that will work for me.
Eric Smith
RE: Conditional statements in portal-ext.properties
20 juin 2013 13:15
Réponse

Eric Smith

Rang: Junior Member

Publications: 58

Date d'inscription: 28 août 2012

Publications Récentes