Results 1 to 7 of 7

Thread: Running Greenhouse in Standard mode

Hybrid View

  1. #1

    Default Running Greenhouse in Standard mode

    Hi

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

    Thanks

  2. #2

    Default mode can be set in web.xml

    <!-- 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>

  3. #3
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    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
    Keith Donald
    Core Spring Development Team

  4. #4
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default

    Keith,

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

    Thanks,
    Dan

  5. #5
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Well, the Maven properties plugin is declared in the .pom.

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

    Code:
    <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>
    Keith Donald
    Core Spring Development Team

  6. #6
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default

    Keith,

    Thank you.

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

    Code:
    	<!-- 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>

  7. #7
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default

    Keith,

    Nevermind, I figured it out with some testing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •