loading table of contents...

3.5.4.2. Building the Web Applications

  1. You need two Maven profiles to build the Blueprint web applications according to the Apache setup. This concerns mainly the domains for absolute URLs. Add the profiles to your .m2/settings.xml file:

    <profile>
      <id>localEnvironment</id>
      <properties>
        <cae.is.standalone>false</cae.is.standalone>
        <livecontext.ibm.wcs.host>shop-ref.ecommerce.mycompany.com</livecontext.ibm.wcs.host>
        <livecontext.apache.wcs.redirect.host>shop-helios.blueprint-box.vagrant</livecontext.apache.wcs.redirect.host>
        <blueprint.site.mapping.helios>//helios.blueprint-box.vagrant</blueprint.site.mapping.helios>
        <livecontext.cookie.domain>.blueprint-box.vagrant</livecontext.cookie.domain>
        <livecontext.ibm.wcs.store.id.perfectchef>10851</livecontext.ibm.wcs.store.id.perfectchef>
        <livecontext.ibm.wcs.store.id.aurora>10202</livecontext.ibm.wcs.store.id.aurora>
      </properties>
    </profile>
    <profile>
      <id>localPreviewEnvironment</id>
      <properties>
        <cae.is.standalone>true</cae.is.standalone>
        <livecontext.ibm.wcs.host>shop-ref.ecommerce.mycompany.com</livecontext.ibm.wcs.host>
        <livecontext.apache.wcs.redirect.host>shop-preview-helios.blueprint-box.vagrant</livecontext.apache.wcs.redirect.host>
        <studio.previewUrlPrefix>/blueprint/servlet</studio.previewUrlPrefix>
        <blueprint.site.mapping.helios>//preview-helios.blueprint-box.vagrant</blueprint.site.mapping.helios>
        <STUDIO_WEBAPP_NAME></STUDIO_WEBAPP_NAME>
        <STUDIO_ENVIRONMENT>development</STUDIO_ENVIRONMENT>
        <livecontext.cookie.domain>.blueprint-box.vagrant</livecontext.cookie.domain>
        <livecontext.ibm.wcs.store.id.perfectchef>10851</livecontext.ibm.wcs.store.id.perfectchef>
        <livecontext.ibm.wcs.store.id.aurora>10202</livecontext.ibm.wcs.store.id.aurora>
    
        <!-- copied from profile development-ports in the blueprint pom -->
        <PREVIEW_AJP_PORT_SUFFIX>010</PREVIEW_AJP_PORT_SUFFIX>
        <PREVIEW_HTTP_PORT_SUFFIX>081</PREVIEW_HTTP_PORT_SUFFIX>
      </properties>
    </profile>
  2. Build the web applications (Studio, Preview CAE and Live CAE) and the RPMs for Apache as follows:

    cd blueprint
    mvn clean install -DskipTests -am -pl :cae-preview-webapp,:studio-webapp  -PlocalPreviewEnvironment
    mvn clean install -DskipTests -am -pl :cae-live-webapp -PlocalEnvironment
    mvn clean install -am -pl :studio-apache -PlocalPreviewEnvironment
    mvn clean install -am -pl :delivery-apache -PlocalEnvironment
    cd boxes
    mvn clean install -DskipTests
    cd ..

  3. Create a .vagrantuser file in $CM_BLUEPRINT_HOME with the following content:

    yum:
      remi_repository_mirrorlist: "http://centos-mirror/rpms.famillecollet.com/enterprise/6/remi/mirror"
    vm:
      memory: "1024"
      cpu: "1"
      tld: "blueprint-box.vagrant"
    
    chef:
      run_list: "role[apache-only]"
    
  4. Install and start the vagrant box with the following call. This will take a few minutes if you do it for the first time.

    cd blueprint
    vagrant up