PDA

View Full Version : Running Greenhouse in Standard mode



sunilkrverma
Jun 26th, 2011, 09:59 AM
Hi

How can I run GH in standard mode? Where do I set database.url property?

Thanks

sunilkrverma
Jun 26th, 2011, 10:49 AM
<!-- Specifies the default mode of this application, to be activated if no other profile (or mode) is specified -->
<context-param>
<param-name>spring.profiles.default</param-name>
<param-value>embedded</param-value>
</context-param>

Keith Donald
Jun 26th, 2011, 07:23 PM
We pass a VM parameter -Dspring.profiles.active=standard to switch on standard mode. We set the properties in a maven profile in our .m2/settings.xml file and ensure the profile is activated when the .war is built. We use the Maven properties plugin to generate the classpath:application.properties file read in standard mode.

Keith

dmfrey
Jul 29th, 2011, 10:17 AM
Keith,

Can you post .settings configuration as well as the maven properties plugin?

Thanks,
Dan

Keith Donald
Jul 29th, 2011, 01:53 PM
Well, the Maven properties plugin is declared in the .pom.

Our Maven .settings file looks like this, with our secure property values removed:



<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<profiles>
<profile>
<id>greenhouse-prod</id>
<properties>
<application.url>http://greenhouse.springsource.org</application.url>
<application.secureUrl>https://greenhouse.springsource.org</application.secureUrl>
<application.secureChannel>https</application.secureChannel>

<database.url></database.url>
<database.username></database.username>
<database.password></database.password>

<redis.hostName></redis.hostName>
<redis.port></redis.port>
<redis.password></redis.password>

<security.encryptPassword></security.encryptPassword>
<security.encryptSalt></security.encryptSalt>

<s3.accessKey></s3.accessKey>
<s3.secretKey></s3.secretKey>

<facebook.appId></facebook.appId>
<facebook.appSecret></facebook.appSecret>
<twitter.consumerKey></twitter.consumerKey>
<twitter.consumerSecret></twitter.consumerSecret>
<linkedin.consumerKey></linkedin.consumerKey>
<linkedin.consumerSecret></linkedin.consumerSecret>
<tripit.consumerKey></tripit.consumerKey>
<tripit.consumerSecret></tripit.consumerSecret>
</properties>
</profile>
</profiles>
</settings>

dmfrey
Aug 3rd, 2011, 09:38 AM
Keith,

Thank you.

One more question. I assume setting the profile as a JVM argument supersedes this setting in web.xml, correct?




<!-- Specifies the default mode of this application, to be activated if no other profile (or mode) is specified -->
<context-param>
<param-name>spring.profiles.default</param-name>
<param-value>embedded</param-value>
</context-param>

dmfrey
Aug 3rd, 2011, 09:46 AM
Keith,

Nevermind, I figured it out with some testing.