Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollbar}

Installing a plugin

If the appropriate admin console plugin is installed (and your geronimo server includes web app support) you can install plugins from a plugin repository. After selecting the "plugins" page from the navigation menu select the plugin repository you want, such as your local maven repository if you have been building your own plugins. Next you see a list of available plugins from the repository. Select multiple plugins using the checkboxes or a single plugin as a link, and on the next page you will see more information on the plugins. On your approval the plugins will be downloaded and installed.

Alternatively you can use gshell to install plugins using the deploy/list-plugins command. This can be run with a command line or interactively. Interactively you can select the plugin repository to use (if more than one is known), and then select the plugins to install. Again, they will be downloaded and installed. An example of command line usage will be seen as followed:

You can install a plugin into an existing server in different ways:

...

  • You can create a plugin as part of a maven build using the car-maven-plugin.
  • You can create a plugin "virtually" by installing a deployed application from a running geronimo server acting as a plugin repository.
  • You can create a plugin using the Geronimo administrative console to create or edit the plugin metadata.

Building,installing plugins and assembling a server from an exsiting server

By far the easiest way to build a Geronimo plugin is with maven using the car-maven-plugin to build a module. Any such module will include a geronimo-plugin.xml descriptor with at least minimal information. When possible, such as the description and license, this information is taken from the pom itself. Normally you will build the dependency list from the modules dependencies which are constructed from the maven dependencies plus whatever additional dependencies the deployers determine are needed. For instance an ejb application will have the openejb plugin added as a dependency by the openejb deployer. If necessary you can specify the dependencies for both the module and plugin descriptor explicitly in the car-maven-plugin configuration.

Here's an example of a car-maven-plugin configuration using maven dependencies and configuring most of the additional information possible:

Code Block
xml
xml

            <plugin>
                <groupId>org.apache.geronimo.buildsupport</groupId>
                <artifactId>car-maven-plugin</artifactId>
                <configuration>
                    <useMavenDependencies>
                        <value>true</value>
                        <includeVersion>true</includeVersion>
                    </useMavenDependencies>
                    <category>Tomcat</category>
                    <instance>
                        <plugin-artifact>
                            <copy-file relative-to="server" dest-dir="var/catalina">tomcat-base/</copy-file>
                            <config-xml-content>
                                <!-- To disable accesslogging uncomment the following lines
                                <gbean name="TomcatEngine">
                                    <reference name="TomcatValveChain" />
                                </gbean>
                                <gbean name="AccessLogValve" load="false"></gbean>
                                -->
                                <gbean name="TomcatWebConnector">
                                    <attribute name="host">${ServerHostname}</attribute>
                                    <attribute name="port">${HTTPPort + PortOffset}</attribute>
                                    <attribute name="redirectPort">${HTTPSPort + PortOffset}</attribute>
                                    <attribute name="maxHttpHeaderSize">8192</attribute>
                                    <attribute name="maxThreads">150</attribute>
                                    <attribute name="minSpareThreads">25</attribute>
                                    <attribute name="maxSpareThreads">75</attribute>
                                    <attribute name="enableLookups">false</attribute>
                                    <attribute name="acceptCount">100</attribute>
                                    <attribute name="connectionTimeout">${WebConnectorConTimeout}</attribute>
                                    <attribute name="disableUploadTimeout">true</attribute>
                                </gbean>
                                <gbean name="TomcatAJPConnector">
                                    <attribute name="host">${ServerHostname}</attribute>
                                    <attribute name="port">${AJPPort + PortOffset}</attribute>
                                    <attribute name="redirectPort">${HTTPSPort + PortOffset}</attribute>
                                    <attribute name="minSpareThreads">25</attribute>
                                    <attribute name="maxSpareThreads">75</attribute>
                                    <attribute name="enableLookups">false</attribute>
                                </gbean>
                                <gbean name="TomcatWebSSLConnector">
                                    <attribute name="host">${ServerHostname}</attribute>
                                    <attribute name="port">${HTTPSPort + PortOffset}</attribute>
                                    <attribute name="maxHttpHeaderSize">8192</attribute>
                                    <attribute name="maxThreads">150</attribute>
                                    <attribute name="minSpareThreads">25</attribute>
                                    <attribute name="maxSpareThreads">75</attribute>
                                    <attribute name="enableLookups">false</attribute>
                                    <attribute name="acceptCount">100</attribute>
                                    <attribute name="disableUploadTimeout">false</attribute>
                                    <attribute name="clientAuth">false</attribute>
                                    <attribute name="algorithm">Default</attribute>
                                    <attribute name="sslProtocol">TLS</attribute>
                                    <attribute name="keystoreFile">var/security/keystores/geronimo-default</attribute>
                                    <attribute name="keystorePass">secret</attribute>
                                    <attribute name="keystoreType">JKS</attribute>
                                </gbean>
                                <gbean name="TomcatHost">
                                    <attribute name="initParams">
                                        name=${ServerHostname}
                                        appBase=
                                        workDir=work
                                    </attribute>
                                </gbean>
                            </config-xml-content>
                            <config-substitution key="HTTPPort">8080</config-substitution>
                            <config-substitution key="AJPPort">8009</config-substitution>
                            <config-substitution key="HTTPSPort">8443</config-substitution>
                            <config-substitution key="ServerHostname">0.0.0.0</config-substitution>
                            <config-substitution key="WebConnectorConTimeout">20000</config-substitution>
                            <config-substitution key="webcontainer">TomcatWebContainer</config-substitution>
                            <config-substitution key="webcontainerName">tomcat6</config-substitution>
                        </plugin-artifact>
                    </instance>
                </configuration>
            </plugin>

As you use maven to build plugins, a geronimo-plugins.xml plugin catalog is automatically maintained in your local maven repository. You can force this to be rebuilt by running

Code Block

mvn org.apache.geronimo.buildsupport:car-maven-plugin:create-pluginlist

This might be necessary if you prune your maven repository and remove plugins listed in the catalog.

Alternatively, you can construct the geronimo-plugin.xml file by hand and include it in a deployed module in a geronimo server.

The admin console also allows limited editing of geronimo-plugin.xml files but editing the information about how the plugin fits into the server is not yet supported.More details about this topic, please see Assembling a new server

Assembling a server using maven.

...

Wiki Markup
{snippet:url=geronimo/plugins/roller/trunk/geronimo-jetty-roller/pom.xml|lang=xml}

Upgrading jars and plugins to a new version

...

Updating a plugin

At times, you may need to upgrade a plugin or jar version, for instance if a new version of a dependency is released but you cannot rerelease all the artifacts that depend on it. Here are some methods to upgrade jar versions.

...