Configuring the Studio SDK for component development

Before you can start developing components, you must configure the Studio SDK.

To download, install, and configure the Studio SDK:

  1. From the Studio Media Pack for Windows or Linux, download the Studio SDK.
  2. Unzip the file into a separate directory.
    Note: Do not install the Studio SDK in a directory path that contains spaces.
  3. Within the Studio SDK directory:
    1. Create the following file:

      components/build.<user>.properties

      In the file name, <user> is the user name that you use used to log in to the current machine.

    2. Within that file, add the following property:
      portal.base.dir=<absolute_path_to_portal>

      The value <absolute_path_to_portal> is the path to the endeca-portal directory for the Studio instance.

      Note: On Windows, backslashes in paths must be escaped. For example, use:
      portal.base.dir=C:\\my_folder\\endeca-portal
      instead of:
      portal.base.dir=C:\my_folder\endeca-portal
    3. In the shared/ directory, create a shared.properties file .
    4. In shared.properties, add the following property:
      portal.base.dir=<absolute_path_to_portal>

      The value <absolute_path_to_portal> is the path to the endeca-portal directory for the Studio instance.

      Note: On Windows, you must escape backslashes in paths. For example, use:
      portal.base.dir=C:\\my_folder\\endeca-portal
      instead of:
      portal.base.dir=C:\my_folder\endeca-portal
  4. To enable JavaScript minification when building your components:
    1. If you haven't already, obtain the required YUI Compressor .jar files. See Obtaining .jar files for JavaScript minification.
    2. Once the files are in place, from the Studio SDK directory, open the file components\build-common-plugin.xml.
    3. In the file, find the Minify JavaScript section.
    4. Find the following line:
      <available file="${project.dir}/../portal/lib/development/liferay-yuicompressor.jar"/>
    5. Update the path and file name to reflect where you placed yuicompressor-2.4.2.jar.
    6. Next, find the following lines:
      <arg path="${project.dir}/../portal/lib/development/liferay-rhino.jar;
      ${project.dir}/../portal/lib/development/jargs.jar;
      ${project.dir}/../portal/lib/development/liferay-yuicompressor.jar"/>
      <arg line="com.liferay.yahoo.platform.yui.compressor.Bootstrap"/>
    7. In the first line, update the paths and file names to reflect where you placed rhino-1.6R7.jar, jargs-1.0.jar, and yuicompressor-2.4.2.jar.
    8. In the second line, remove liferay from the value.

      The value is then:

      <arg line="com.yahoo.platform.yui.compressor.Bootstrap"/>