{scrollbar}

This article is about how to use the Geronimo Eclipse Plugin(GEP) to convert Applications into Geronimo plugins and install them back into the server.

We use Apache Geronimo v2.2 and an existing sample application throughout the tutorial. See Stateless Session Bean for development and deployment of the application.

Creating Geronimo plugins

Prerequisites

In order to convert applications into Geronimo plugins, the Geronimo Server must be installed and started. Note that only a Geronimo configuration with file type .car can be exported from a server.

And you must have installed the sample application on the running server.

Creating plugins using GEP

Once done, follow the steps below to export Geronimo plugins using GEP.

  1. Double-click the Geronimo server that you defined will display the Server Editor in the main window, and then select Plugin page.
  2. Click Convert Apps to Plugins button will show a wizard named as Plugin Manager.



  3. Enter or create a directory name, and then select create Geronimo plugin radio button. The directory that you defined is a temporary repository to store exported plugins, and you can make any manual updates there if necessary.



  4. The next page of the wizard contains a drop-down list of all the modules that can be converted into Geronimo plugins on the running server. For example, select the console.dbpool/jdbc_userds/1.0/car from the list.



  5. Select your application objects (one at a time) and click Next will bring up pages that allow you to change the attributes in geronimo-plugin.xml file before saving. All the fields on the next two pages are data that will be saved with the plugin and will help with installation.



  6. The next page has 2 tables. You can update the data in both the License table and Prerequisite table using the Add, Edit, and Remove buttons.



  7. Click Next on the page, and the plugin is saved together with a geronimo-plugin.xml file. The wizard goes back to the first page for user to export another plugin.
  8. (Optional)To export multiple plugins, repeat the steps above. For example, export ApplicationClient and StatelessSessionEJB plugins using the same procedure by selecting them from the list.
  9. (Optional) Click Cancel to quit the wizard.

The above process creates a maven-like repository with the name specified in Local Plugin Repository field at the first page of the wizard. A geronimo-plugin.xml file is created for each plugin under its /META-INF directory. The top directory of the repository includes a geronimo-plugins.xml file which keeps track of all the plugins that have been created. The values in these files came from fields in the last two pages of the wizard.

geronimo-plugins.xmlsolid <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <ns2:geronimo-plugin-list xmlns="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns:ns2="http://geronimo.apache.org/xml/ns/plugins-1.3"> <ns2:plugin> <ns2:name>jdbc_userds</ns2:name> <ns2:category>Unknown</ns2:category> <ns2:description/> <ns2:url/> <ns2:author/> <ns2:plugin-artifact> <ns2:module-id> <ns2:groupId>console.dbpool</ns2:groupId> <ns2:artifactId>jdbc_userds</ns2:artifactId> <ns2:version>1.0</ns2:version> <ns2:type>car</ns2:type> </ns2:module-id> <ns2:geronimo-version>2.2-SNAPSHOT</ns2:geronimo-version> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>system-database</ns2:artifactId> <ns2:version>2.2-SNAPSHOT</ns2:version> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>transaction</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>j2ee-server</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:obsoletes> <ns2:groupId>console.dbpool</ns2:groupId> <ns2:artifactId>jdbc_userds</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:obsoletes> </ns2:plugin-artifact> </ns2:plugin> <ns2:plugin> <ns2:name>ApplictionClient</ns2:name> <ns2:category>Unknown</ns2:category> <ns2:description/> <ns2:url/> <ns2:author/> <ns2:plugin-artifact> <ns2:module-id> <ns2:groupId>default</ns2:groupId> <ns2:artifactId>ApplictionClient</ns2:artifactId> <ns2:version>1.0</ns2:version> <ns2:type>car</ns2:type> </ns2:module-id> <ns2:geronimo-version>2.2-SNAPSHOT</ns2:geronimo-version> <ns2:dependency> <ns2:groupId>default</ns2:groupId> <ns2:artifactId>StatelessSessionEJB</ns2:artifactId> <ns2:version>1.0</ns2:version> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>tomcat6</ns2:artifactId> <ns2:version>2.2-SNAPSHOT</ns2:version> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>concurrent</ns2:artifactId> <ns2:version>2.2-SNAPSHOT</ns2:version> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>j2ee-corba-yoko</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>openjpa</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>openejb</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>axis</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>axis2</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>jasper</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:obsoletes> <ns2:groupId>default</ns2:groupId> <ns2:artifactId>ApplictionClient</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:obsoletes> </ns2:plugin-artifact> </ns2:plugin> <ns2:plugin> <ns2:name>StatelessSessionEJB</ns2:name> <ns2:category>Unknown</ns2:category> <ns2:description/> <ns2:url/> <ns2:author/> <ns2:plugin-artifact> <ns2:module-id> <ns2:groupId>default</ns2:groupId> <ns2:artifactId>StatelessSessionEJB</ns2:artifactId> <ns2:version>1.0</ns2:version> <ns2:type>car</ns2:type> </ns2:module-id> <ns2:geronimo-version>2.2-SNAPSHOT</ns2:geronimo-version> <ns2:dependency> <ns2:groupId>console.dbpool</ns2:groupId> <ns2:artifactId>jdbc_userds</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>openejb</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>system-database</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>tomcat6</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>concurrent</ns2:artifactId> <ns2:version>2.2-SNAPSHOT</ns2:version> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>j2ee-corba-yoko</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>openjpa</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>axis</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:dependency> <ns2:groupId>org.apache.geronimo.configs</ns2:groupId> <ns2:artifactId>axis2</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:dependency> <ns2:obsoletes> <ns2:groupId>default</ns2:groupId> <ns2:artifactId>StatelessSessionEJB</ns2:artifactId> <ns2:type>car</ns2:type> </ns2:obsoletes> </ns2:plugin-artifact> </ns2:plugin> <ns2:default-repository>http://geronimo.apache.org/plugins/geronimo-2.2/</ns2:default-repository> </ns2:geronimo-plugin-list>

Installing Geronimo Plugins

Prerequisites

If you intend to install plugins into the same server that is used to export the plugins, you have to remove the projects and relevant resources from the server firstly.

Installing the plugins

To install the plugins back into a Geronimo server, follow the steps below:

  1. Select Plugin page and then click Convert Apps to Plugins button.
  2. Enter the name of the plugin repository, and then select install Geronimo plugins radio button.



  3. Click Next to select the Geronimo plugins that you want to install on the server.



  4. Click Next to install all selected plugins. After that, a confirmation page comes up showing that the plugins have been installed successfully.