Preparing your system for Component SDK development

After installing the Component SDK, before you can start development, you must complete some initial preparation on your system.

This includes:
  • Extracting the Studio .ear file and portal .war file
  • Configuring build files to point to the directories for these extracted files
  • Optionally, enabling JavaScript minification for custom components.

    If minification is enabled, then files in the docroot/js directory of custom components are minifiied.

To prepare your system for custom component development:

  1. Extract the Studio .ear file and portal .war file:
    1. From the Big Data Discovery Media Pack, download the .ear file.
    2. Extract the .ear file to a directory on your machine.
    3. From that directory, extract the file endeca-portal.war to a directory within the extracted .ear file directory.

    For example, if the .ear file is extracted to /bdd_ear, the contents of the extracted .war file might be in /bdd_ear/portal/.

  2. Next, in the Component SDK, create and configure the build properties files:
    1. Go to the components directory of the Component SDK.
    2. In the components directory, create a file called build.<user>.properties, where <user> is the user name that you use to log in to the current machine.

      For example, if your user name is jsmith, then you would create a file called build.jsmith.properties.

    3. Add the following properties to build.<user>.properties:
      portal.base.dir=<extracted .ear file directory>
      app.server.lib.global.dir=<extracted .ear file directory>/APP-INF/lib
      app.server.portal.dir=<extracted portal .war file directory>
      war.output.dir=<directory for generated components>
      

      The war.output.dir setting indicates where the build process should place the .war file that it generates when you compile a custom component. This can be any directory on your system.

      So for example, if:
      • You extracted the .ear file to a directory called /bdd_ear
      • You extracted the portal .war file to a portal directory in /bdd_ear
      • You want the generated .war files for custom components to be placed in /generated_components

      the settings would be:

      portal.base.dir=/bdd_ear
      app.server.lib.global.dir=/bdd_ear/APP-INF/lib
      app.server.portal.dir=/bdd_ear/portal
      war.output.dir=/generated_components
      
    4. In the components directory, create a file called build.shared.properties.
    5. In build.shared.properties, add the following property:
      portal.base.dir=<extracted .ear file directory>
  3. To enable JavaScript minification when building custom components:
    1. If you haven't already, obtain the required YUI Compressor .jar file. See Requirements for using the Component SDK.
    2. In the components directory of the Component SDK, update build.<user>.properties to add the following property:
      yui.compressor.jar=<path to YUI Compressor .jar file>
      
  4. In Eclipse, create the following Eclipse classpath variables:
    Name Path
    DF_GLOBAL_LIB Path to the application server global library, which is:

    <extracted .ear file directory>/APP-INF/lib

    DF_PORTAL_LIB Path to the Web application library, which is:

    <extracted portal .war file directory>