Versions Compared

Key

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

...

Upgrading jars and plugins to a new version

Often 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.

Upgrading a jar without releasing any plugins

Simple jar upgrade

If the jar is to be installed as part of a plugin installation, see the section below. Otherwise, follow these steps. First, if the server is running, stop the server. Second, If no plugins will be (re)-released using the new dependency, you have to do some work by hand. First copy the new jar into the appropriate place directory in your geronimo server's repository. Then add For instance:

Code Block

mkdir -p repository/org/foo/myjar/1.1/
cp ~/newFooJar/myjar-1.1.jar repository/org/foo/myjar/1.1/

Alternatively, the admin console portlet Services->Repository can be used to add artifacts to the server's repository.

Finally, after the new jar is installed in the server's repository, add a line to var/config/artifact_aliases.properties (or the equivalent file for , if the server using the jar) like this, for org.foo:myjar:1.0:jaris using a non-standard alias file). For instance, to replace myjar-1.0.jar with myjar-1.1.jar:

Code Block
org.foo/myjar/1.0/jar=org.foo/myjar/1.1/jar

With this configuration, the server will substitute myjar-1.1.jar for any myjar-1.0.jar dependency.

Upgrading a jar while releasing a plugin

If you are releasing the jar is installed as part of a plugin installation, you can including include configuration upgrade information in the geronimo-plugin.xml to automatically install the jar upgrade entry when the plugin is . During plugin installation, the upgraded jar will be automatically installed. This is easiest to specify in the car-maven-config configuration in the pom.xml, prior to building the plugin.

Code Block
<artifact-alias key="org.foo/myjar/1.0/jar">org.foo/myjar/1.1/jar</artifact-alias>