...
The Geronimo Eclipse Plugin (GEP) requires the following prerequisite software (Note: Update the list once GEP 2.1 is released).all of which is platform specific):
- Sun JDK 5.0 (J2SE 5.0)
- Eclipse 3.3.1.1 (Eclipse Classic package of Europa distribution), which is platform specific
- Web Tools Platform (WTP) 2.0.1
- Data Tools Platform (DTP) 1.5.1
- Eclipse Modeling Framework (EMF) 2.3.1
- Graphical Editing Framework (GEF) 3.3.1
- IDE for Java EE Developers
Sun JDK 5.0 can be downloaded from Sun's J2SE 5.0 Downloads site. WTP and all the other prerequisites The Eclipse IDE for Java EE Developers can be downloaded from WTP Downloads site.the Eclipse Downloads site. Download and extract the Eclipse IDE for Java EE Developers archives to a directory of your choice (for e.g. C:\eclipse). The archive will be extracted to a directory named eclipse under the directory you specified (for e.g. C:\eclipse\eclipse), referred to as <eclipse_home> from now on. Make sure that the JDK in the PATH is Sun JDK 5.0. Launch Eclipse by running <eclipse_home>/eclipse.
The Geronimo server can be installed from within using the Geronimo Eclipse Plugin. This feature does not work currently for , or optionally you may install the manually. To install it manually, download the Geronimo 2.1 server. Download Geronimo 2.1 server from http://www.apache.org/dist/geronimo/ and extract the archive to a directory of your choice (for e.g. C:\g). The archive will be extracted to a directory geronimo-tomcat6-javaee5-2.1.1 (for e.g. C:\g\geronimo-tomcat6-javaee5-2.1.1) or geronimo-jetty6-javaee5-2.1.1 depending on whether you downloaded Geronimo 2.1.1 distribution with Tomcat or Jetty as the web container. We will refer to this directory as <geronimo_home> from now on.
...
The JBoss to Geronimo Migration Tool (J2G) is an Eclipse plugin designed to assist in migrating the sources of an application written for the JBoss application server or written for Java Enterprise Edition (Java EE) to the Apache Geronimo platform. For more information on using the J2G tool follow this link.
...
Maven Integration for Eclipse
The prerequisite software for GEP can be downloaded either as a single download or individual downloads. In this section we discuss the various options available to install the prerequisite software.
WTP All-in-One package
WTP along with all the other prerequisites can be downloaded in one combined bundle from WTP Downloads site. Download WTP All-In-One Package specific to your platform from v2.0.1 of WTP. Extract the archive to a directory of your choice (for e.g. C:\wtp). The archive will be extracted to a directory named eclipse under the directory you specified (for e.g. C:\wtp\eclipse), referred to as <eclipse_home> from now on. This completes the installation of eclipse.
Eclipse and WTP downloaded separately
Alternatively you can download Eclipse and WTP separately and install the prerequisites using the following steps:
- Download Eclipse 3.3.1.1 from http://www.eclipse.org/downloads/.
- Extract the archive to a directory of your choice (for e.g. C:\wtp). The archive will be extracted to a directory named eclipse under the directory you specified (for e.g. C:\wtp\eclipse), referred to as <eclipse_home> from now on.
- In WTP Downloads site, follow the link corresponding to v2.0.1 of WTP.
- Download each of the prerequisites DTP, EMF and GEF and extract the archives to <eclipse_home>.
- Download the wtp-sdk package listed under Web Tools Platform Complete and extract the archive to <eclipse_home>
Launch Eclipse by running <eclipse_home>/eclipse. Make sure that the JDK in the PATH is Sun JDK 5.0.
Installing Geronimo Eclipse Plugin
The Geronimo Eclipse Plugin (GEP) can be installed using the following options:
- Using WTP
- Using Eclipse Update Manager
- 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:
...
#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:
...
Maven Integration for Eclipse provides tight integration for Maven into the IDE and providing the following features:
- Launching Maven builds from within Eclipse
- Dependency management for Eclipse build path based on Maven's pom.xml
- Resolving Maven dependencies from the Eclipse workspace without installing to local Maven repository
- Automatic downloading of the required dependencies from the remote Maven repositories
- Wizards for creating new Maven projects, pom.xml or to enable Maven support on plain Java project
- Quick search for dependencies in Maven remote repositories
- Quick fixes in the Java editor for looking up required dependencies/jars by the class or package name
For more details and installation instructions, visit http://m2eclipse.codehaus.org/.
Installing Eclipse
See How to install Geronimo Eclipse Plugin v2.1.2
Geronimo Server Runtimes and Servers
A Geronimo Server Runtime in GEP associates a Geronimo 2.1 Server installation with a JRE to be used to run that server. A Geronimo Server in GEP associates a Geronimo Server Runtime with a profile consisting of Security settings, Publish Settings, Port Configuration, Java VM settings to be used with that Geronimo Server Runtime.
Defining a Geronimo Server Runtime
In order to define a new Geronimo Server v2.1 Runtime, follow the steps below:
- Click Window -> Preferences -> Server -> Installed Runtimes.
- Click Add to launch New Server Runtime dialog.
- Select Apache Geronimo v2.1 Runtime, uncheck Also create new local server (we will discuss about the use of this option later) and click Next.
- Select Workbench default JRE (click Installed JREs to add any new JREs and return to this dialog once done).
- If you already have Geronimo v2.1 installation that you want to use with GEP, enter the directory name or browse to <geronimo_home> and click Next. Skip the next three steps and go to selecting source archive.
- Enter a directory for Application Server Installation Directory, under Download Options select the web container and click Download and Install.
Note title Important The directory specified for Application Server Installation Directory must exist in order to select Download Options.
- Click OK for Install Confirmation. This will install the selected Geronimo v2.1 server and fill the Application Server Installation Directory field accordingly.
- Click Next.
- Select the location of the archive containing Geronimo source. This is required only if you intend to debug into Geronimo source code.
- Click Finish to return to Installed Server Runtime Environments dialog.
Additional Server Runtimes to use a different Geronimo server installation or a different JRE can be added in a similar manner.
Defining a Geronimo Server
(Note: Add more instructions once GEP for 2.1 is released. Currently the Geronimo Eclipse Update site does not host GEP v2.1)
#3. Manual Installation of GEP
Download the GEP 2.1 from http://www.apache.org/dist/geronimo/eclipse/. Close Eclipse if it is already running. Extract the archive to <eclipse_home>. Launch Eclipse by running <eclipse_home>/eclipse.
...
Follow the steps below to define a new Geronimo v2.1 Server:
- Launch eclipse by running <eclipse_home>/eclipse.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.
- From any Perspective: Select File, -> New, -> Other, -> Server.
- Select Apache Geronimo v2.1 Server, select an Apache Geronimo v2.1 Runtime from the Server runtime dropdown and click Next.
Select Workbench default JRE (click Installed JREs to add any new JREs
dialogNote Additional Geronimo Server Runtimes can be installed by clicking on Installed Runtimes button and return to this
), enter the directory name or browse to <geronimo_home> and click Next. (Note: Download options part of this dialog does not work currently.)step once done
Select the location of the archive containing Geronimo source and click Next. This is required only if you intend to debug into Geronimo source codeto select the newly added server runtime.
- Modify Hostname, Administrator Id, Administrator password, Web Connector port and RMI Naming port if necessary and click Finish. 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 and server. 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.
Additional servers using the same Geronimo 2.1 installation can be defined in a similar manner. If you intend to define additional servers that use a different Geronimo 2.1 installation, you will need to create a new Server runtime as given below:
...
...
Note |
---|
A Geronimo Server can also be defined while creating a Geronimo Server Runtime by checking the option |
Also create new local server |
...
. This will present an additional dialog to configure the hostname, ports, etc. |
Creating a new project
Once Geronimo Server Runtimes are defined, Eclipse provides these runtime for selecting as a target runtime while creating an EJB, Web and Java EE projects. Notice the Target Runtime field in the Dynamic Web Project dialog shown in the figure below.
Upon adding the Geronimo 2.1 Server Runtime as the target runtime, the Geronimo server libraries and Java EE specification libraries get automatically added to the build path of the project. GEP will also create Geronimo specific deployment plans.
In order to run an application on Geronimo, follow the steps below:
- Right-click on the project and click Run As ->
The newly added server runtime can be selected from Server runtime drop-down in Define a New Server dialog while defining a new server.
Creating a new project
To create a new Web project, follow the steps below:
- Click File, New, Project to launch the New Project dialog. Select Dynamic Web Project and click Next.
- In the Project Explorer view, Right click on mywebapp and select New, JSP.
- Enter index.jsp for File name and click Finish.
- Change the content of index.jsp to the following:
Code Block html html borderStyle solid title index.jsp Right-click on mywebapp and select Run As, Run on Server.<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>My WebApp</title> </head> <body> <h1>Welcome to My WebApp</h1> </body> </html>
- Click Choose and existing server, select Apache Geronimo v2.1 Server at localhost and click Finish.
Enter mywebapp for project name, select Apache Geronimo v2.1 Runtime for Target Runtime, select Default Configuration for Apache Geronimo v2.1 Runtime and click Finish.
The application will can also be run on the selected server and the welcome page will display in a web browser window inside eclipseGeronimo by adding the project to the Geronimo server explicitly as given below:
- In the Servers view, Right-click on Apache Geronimo v2.1 Server at localhost and select Add and Remove Projects.
- In the Add and Remove Projects dialog, select the project under Available projects and click on Add button. The project will now be listed under Configured projects.
- Click Finish.
- If the server status is shown as Republish, right-click on the server and select Publish.
Configuring your development environment
In this section we discuss various options to configure your development environment.
Editing a Server configuration
In order to edit the configuration of a server, double click on server in the Servers view to open the overview of the server as shown below.
- General Information
Edit the fields in this section to change the name of the server or to associate the Geronimo Server with a different Apache Geronimo v2.1 Runtime or to change the hostname with which the Geronimo Server is associated. - Security Credentials
The default User ID is system with a password manager. If your server installation uses a different set of credentials, change these accordingly. These security credentials configured here are used to detect server status as well as deploying and undeploying of applications. - Automatic Publishing
All servers use the default publishing settings. The server can be configured to not publish automatically by selecting the Never publish automatically option. The default publish setting can be overridden by selecting the Override default settings option and providing a new Publish interval. - Port Configuration
The default HTTP and RMI ports are 8080 and 1099 respectively. If your server installation uses a different HTTP and/or RMI port, edit these values accordingly. Altering the values here does not change the corresponding ports in the associated Geronimo Server Runtime. - Console Output
The default server console output log level is INFO. If you want to enable debug output to console, select DEBUG. - Server Startup
The settings under this section control the ping thread that polls to the server while to detect the server status when the server is starting up. (Need to figure the exact use of these setting)started from within eclipse. Ping delay specifies the time the ping thread will wait before polling the server. Ping interval controls the time between successive pings. Maximum Pings is the number of times the ping thread will poll the server to detect a successful startup. If the server startup can not be confirmed, the ping thread will stop the server.
In case of a remote server, Ping interval controls the time between successive pings to update the server status. - Server VM Arguments
Any additional arguments to be passed on to the server VM can be specified here.
Other configuration
Children Display |
---|