You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This Quick start guide for developers is organized in the following sections:

Getting the software

The Geronimo Eclipse Plugin (GEP) requires the following prerequisite software (Note: Update the list once GEP 2.1 is released).

  • Java Runtime Environment (JRE) 5.0
  • Eclipse 3.3.1
  • WTP 2.0.1

Java Runtime Environment can be downloaded from http://java.sun.com/javase/downloads/index_jdk5.jsp. Eclipse and WTP can be downloaded in one combined bundle from http://people.apache.org/dist/geronimo/eclipse/unstable/ECLIPSE_AND_WTP.zip (Note: Update the URL once GEP 2.1 is released and prereqs are defined.) Download and extract the archive to a directory of your choice (for e.g. C:\eclipse). Make sure that the JRE in the path is a 5.0 JRE. Launch Eclipse by running eclipse.exe on Windows (for example c:\eclipse\eclipse.exe) and ??? on Linux.

Installing Geronimo Eclipse Plugin

The Geronimo Eclipse Plugin (GEP) can be installed using the following options:

  1. Using WTP
  2. Using Eclipse Update Manager
  3. Manual Installation

#1. Install GEP Using WTP

The GEP can be installed directly from within WTP while defining a server runtime. Follow the steps below to install GEP:

  1. Launch the Define a New Server dialog using one of the following:
    • From the Servers view in the Java EE Perspective: Right-click, New, Server (See Figure 1).
    • From any Perspective: Select File, New, Other, Server
  2. Click on the Download additional server adapters link (See Figure 2).
  3. In the Install New Server Adapter dialog, select Geronimo v2.1 Server Adapter and click Next. (See Figure 3. Note: Needs to be updated once GEP 2.1 is released).
  4. Read and accept any License Agreements and click Finish. Click OK to continue installation.

This will download and install the GEP. The Progress view will display the installation status. Once the installation is completed, restart Eclipse. Define a New Server dialog will now show an Apache Geronimo v2.1 Server option under Apache (See Figure 4).

#2. Install GEP Using Eclipse Update Manager

The GEP can also be installed via the Eclipse Update manager by creating a new remote site pointing to http://www.apache.org/dist/geronimo/eclipse/updates/. Follow the steps below to install GEP:

  1. Open the Eclipse Update Manager as follows:
    • Select Help, Software Updates, Find and Install...
    • Select Search for new features to install and click Next (See Figure 5).
  2. Create a Eclipse Remote Update Site as follows:
    • Click the New Remote Site... button (See Figure 6).
    • Type Geronimo Eclipse Update Site (or other suitable unique name) in the Name field.
    • Type the URL of the Geronimo Eclipse Update site http://www.apache.org/dist/geronimo/eclipse/updates in the URL field.
    • Click OK.
  3. Select only the Geronimo Eclipse Update Site in the Sites to include in search selection box and click Finish.
  4. Select a mirror and click OK if prompted to do so.

(Note: Add more instructions once GEP for 2.1 is released)

#3. Manual Installation of GEP

Download the GEP from http://people.apache.org/dist/geronimo/eclipse/unstable/geronimo-eclipse-plugin-2.1.0-SNAPSHOT-deployable.zip and unzip it into the same directory where all the prereqs are installed (e.g., c:\eclipse). Restart eclipse once done.

(Note: Update the download link once GEP 2.1 is released)

Defining a New Server Runtime

Once Geronimo Eclipse Plugin is installed, start Eclipse and follow the steps below to define a new Geronimo v2.1 Server Runtime:

  1. Launch the Define a New Server dialog using one of the following:
    • From the Servers view in the Java EE Perspective: Right-click, New, Server (See Figure 1).
    • From any Perspective: Select File, New, Other, Server.
  2. Select Apache Geronimo v2.1 Server and click Next (see Figure 4).
  3. Select a 1.5 JRE (click Installed JREs to add any new JREs and return to this dialog once done), enter the directory name or browse to the directory where Geronimo 2.1 server is installed and click Next (see Figure 7). (Note: Download options part of this dialog does not work currently.)
  4. Select the location of the archive containing Geronimo source and click Next. This is required only if you intend to debug into Geronimo source code.
  5. Modify Hostname, Administrator Id, Administrator password, Web Connector port and RMI Naming port if necessary and click Finish (see Figure 8). Normally you will not need to change the default values for these fields for a newly installed Geronimo 2.1 server.

This completes defining a new Geronimo 2.1 Server runtime. The newly added server will appear in the Servers view. The server can be started by selecting the server and clicking on the Start server button (see Figure 9).

Package your applications

If you do not have your application already in the Eclipse workspace, import the application archive using the following steps:

  1. Select File, Import to launch the Select dialog.
  2. Based on your application type, select as given below:
    • For Web application, Select Web, WAR file.
    • For EAR application, Select J2EE, EAR file.
    • For EJB application, Select EJB, EJB JAR file.
  3. Click Next (Note: Remainder of the steps are based on a web application)
  4. Type the name of the WAR file or select the WAR file by clicking on Browse, enter/edit the Project Name and select Apache Geronimo v2.1 Runtime as Target Runtime.
  5. Click Finish to complete the import.

The imported application can be viewed in the Project Explorer view. The GEP will create a Geronimo specific deployment plan, in this case geronimo-web.xml under WebContent/WEB-INF, if one is not already present in the archive. You may need to edit the deployment plan to map any resources used by your applicatio.

Deploy your application

To deploy the application on Geronimo, follow the steps below:

  1. In the Servers view, Right-click" on the server select *Add and Remove Projects.
  2. Select the project under Available projects and click on Add button. The project will now be listed under Configured projects. Click Finish.

The application will be deployed when the server is Started or a Publish is invoked.

Run your application

In order to run the application follow the steps below:

  1. In the Project Explorer view, Right-click on the project, select Run As, Run on server.
  2. Select Choose an existing server and select Apache Geronimo v2.1 server at localhost.
  3. Click Finish.

This will start the server if it not already started and run the application. The application's welcome page will open in a browser inside Eclipse.

  • No labels