Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{scrollbar}

Aliasing jars and modules

Excerpt

You may want to change the version of jars or plugins from those used when your Geronimo server was assembled, or completely replace one with another.

This can be done for any artifacts in the Geronimo repository, but not for jars in the lib directory. We hope to move almost all the jars out of lib shortly, but this is not yet possible.

Recall that the Geronimo repository, like a maven 2 repository, is structured like

Code Block
/path/like/groupId/artifactId/version/artifactId-version.type

An artifact is structured like

Code Block
path.like.groupId/artifactId/version/type

To install a new version of an artifact you typically need to create a new directory corresponding to the version, then copy the artifact into that directory. There is an administrative console page that helps with Adding JARs to the Geronimo repository.

Dependencies in Geronimo plugins can be specified with or without a fixed version. If all the dependencies on the artifact you are replacing are specified without a fixed version, you can simply add your new artifact to the appropriate place in the Geronimo repository and, if the version is newer than the old artifact, it will be used by Geronimo the next time the plugins that use it are started. If your artifact has a lower version than what it is replacing, you need to remove the old artifact.

If at least one dependency is specified with a fixed version or you are using a different artifact, you need to specify the replacement more explicitly. For the main Geronimo server this would be in the var/config/artifact_aliases.properties file, and for the application client it would be in the var/config/client_artifact_aliases.properties file.

The format for entries in these files is oldartifactid=newartifactId. Here are two examples.

  • Versions can be omitted on the left side but not the right. This can also specify explicit versions in the same format.
  • Note that many of these examples have two lines for the "same" replacement.
    • If all the dependencies specify the version, you only need the line with the version specified in the left hand side.
    • If all the dependencies omit the version, you only need the line without the version specified in the left hand side. At the moment whether or not versions are specified in geronimo dependencies is somewhat disorganized and random.
No Format
titleartifact-aliases.properties
borderStylesolid
org.apache.geronimo.configs/j2ee-server//car=org.apache.geronimo.configs/j2ee-server/2.2/car
org.apache.geronimo.configs/j2ee-server/2.2/car=org.apache.geronimo.configs/j2ee-server/2.2/car
No Format
titleclient-artifact-aliases.properties
borderStylesolid
org.apache.geronimo.framework/j2ee-system//car=org.apache.geronimo.framework/client-system/2.2/car
org.apache.geronimo.framework/j2ee-system/2.2/car=org.apache.geronimo.framework/client-system/2.2/car
org.apache.geronimo.framework/j2ee-security//car=org.apache.geronimo.configs/client-security/2.2/car
org.apache.geronimo.framework/j2ee-security/2.2/car=org.apache.geronimo.configs/client-security/2.2/car
org.apache.geronimo.configs/j2ee-server//car=org.apache.geronimo.configs/client/2.2/car
org.apache.geronimo.configs/j2ee-server/2.2/car=org.apache.geronimo.configs/client/2.2/car
org.apache.geronimo.configs/transaction//car=org.apache.geronimo.configs/client-transaction/2.2/car
org.apache.geronimo.configs/transaction/2.2/car=org.apache.geronimo.configs/client-transaction/2.2/car

While you can modify these files by hand, a more recommended method is to deploy your applications as Geronimo plugins and to install these aliases through the geronimo-plugin.xml descriptor, which is genereated when you build your plugin using maven. There are some examples about Deploying and administering plugins.

And you can also update or remove artifact aliases on the Geronimo server by using JAR Aliases feature on the Console.