Home > Documentation > Installing and running > Initial configuration > Substituting one module with another |
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
/path/like/groupId/artifactId/version/artifactId-version.type
An artifact is structured like
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.
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
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.
Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2013, The Apache Software Foundation, Licensed under ASL 2.0. |