Generating the Eclipse project for the component

The Component SDK includes a script to generate an Eclipse project for a new component.

New components are extensions of the EndecaPortlet class, which is in turn an extension of the basic Java Portlet class.

To create a new component:

  1. At a command prompt, change to the components/portlets directory in the Component SDK.
  2. Run the appropriate .sh or .bat version of the create command:

    For example:

    create.sh <componentName> "<componentDisplayName>"

    Where:

    Parameter Description
    <componentName> The name of the component. The component name:
    • Must be all lower case.
    • Cannot have spaces.
    • Cannot include the string -ext, because it causes confusion with the ext plug-in extension. For example, my-component-extension would not be a valid name.
    <componentDisplayName> The display name for the component.

    If the display name contains spaces, it must be enclosed in quotation marks.

    For example:

    create.sh my-test "My New Test Component"

    The script creates in the portlets directory a new directory for the new component.

    The directory is the component name, with endeca- pre-pended and -portlet appended automatically. For example, if you set the name to my-test, the directory is named endeca-my-test-portlet.

    This directory is an Eclipse project that you can import directly into Eclipse.

  3. Import the project into Eclipse.

    If your components depend on shared library projects located within the /shared directory, import those as well.

    Note that it takes some time for projects to build after they are imported.

After you generate and import the component project, you can begin the actual component development.