Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

First, we consider the single server instance case, and just add a second repository. Say we want to leave Geronimo in its repository, but add a second repository to deploy our applications. Adding a second repository is pretty easy.

...

Tip

The detailed steps to install a server specific repository as specified next can be bypassed by utilizing an easy to install Geronimo Plugin

...

for Geronimo 2.1+. In fact, the plan displayed below was generated by building that plugin. Reference the specific steps to gain a deeper understanding or if you need to follow the manual steps to customize the result. However, if this general plan is sufficient for you just simply install the Geronimo Server Specific Repository Plugin (org.apache.geronimo.plugins/server-repo/1.0/car) and pick up the discussion on using the new repository.

  1. Create a plan (say server-repo.xml) for your repository module.1. If you would rather use this plan with Geronimo 2.1 you must update the j2ee-system dependency version.
    Code Block
    xml
    xml
    borderStylesolid
    titleserver-repo.xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!--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.-->
    <!--$Rev: 663365665870 $ $Date: 2008-06-0409 16:1410:0416 -0400 (WedMon, 0409 Jun 2008) $-->
    <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
      <!--Repository-->
      <environment>
        <moduleId>
          <groupId>org.apache.geronimo.plugins</groupId>
          <artifactId>server-repo</artifactId>
          <version>1.0</version>
          <type>car</type>
        </moduleId>
        <dependencies>
          <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>j2ee-system</artifactId>
            <version>2.1.1</version>
            <type>car</type>
          </dependency>
        </dependencies>
        <hidden-classes/>
        <non-overridable-classes/>
      </environment>
      <!--Repository-->
      <gbean name="ServerRepo" class="org.apache.geronimo.system.repository.Maven2Repository">
        <attribute name="root">var/repository/</attribute>
        <attribute name="resolveToServer">true</attribute>
        <reference name="ServerInfo">
          <name>ServerInfo</name>
        </reference>
      </gbean>
      <!--Configuration Store service-->
      <gbean name="Local2" class="org.apache.geronimo.system.configuration.RepositoryConfigurationStore">
        <reference name="Repository">
          <name>ServerRepo</name>
        </reference>
      </gbean>
    </module>
    
  2. Create the repository's root directory via mkdir <geronimo_home>/var/repository#* The directory is specified by the root attribute of the Maven2Repository GBean, repository/ in the above example. It is a path relative to the base server directory <geronimo_home>.
    • The resolveToServer attribute specifies the repository's location.
      • true means this path is relative to baseServer, which is useful with multiple server instances.
      • false means this path is relative to the base directory <geronimo_home>.
  3. Deploy the repository module by deploying server-repo.xml via deploy deploy server-repo.xml.
    Tip

    The deploy command is the script <geronimo_home>/bin/deploy.{bat,sh}, depending on your operating system. It is invoked by typing simply deploy either from the <geronimo_home>/bin directory, or by having that directory in your path.

...