Referring to other projects

These steps are necessary only if you work with the WebSphere Portal Test Environment.

To run or debug portlet projects which refer to other projects in your workspace,...

  1. Add required projects to Java Build Path and Project References.

    1. In the Project Explorer view, right-click the portlet project and select Properties.

    2. In the left pane, select Java Build Path.

    3. Select the Projects tab.

    4. Select all required projects.

    5. In the left pane, select Project References.

    6. Select projects that are referenced by the other projects.

    7. Click OK.

  2. If the required projects are EJB projects,...

    1. Add all required projects to the EAR project for the portlet project.

      1. In the Project Explorer view, expand the EAR project.

      2. Double-click the EAR Deployment Descriptor to open its editor.

      3. Select the Module tab.

      4. In the Modules section, click Add to add a project to use.

      5. Click Finish.

      6. Add other required projects by following the steps above.

      7. Press Ctrl + S to save the data.

      8. Click OK if the Repair Server Configuration dialog appears.

    2. Add Java JAR Dependencies.

      1. In the Project Explorer view, right-click the portlet project and select Properties.

      2. Select the Java JAR Dependencies page.

      3. Select Use EJB JARs or Use EJB client JARs or Allow both.

      4. Select the JAR files from the list and click OK.

    3. Add all required projects to the server.

      1. In the Servers view, right-click the server and select Add and remove projects.

      2. Remove unneeded projects from the Configured projects list box using the Remove or Remove All buttons.

      3. Move the appropriate projects from the Available projects list box to the Configured projects list box using the Add or Add All buttons.

      4. Click Finish.