Modifying a distribution to use a different version of Aspire

Jump to: navigation, search

For Information on Aspire 3.1 Click Here

Wanting to run Aspire under Java 7?

If you're already running under Java 7, or you're running under Java 6 with no intention of moving to Java 7, then you can ignore this section.

If you want to run Aspire under Java 7, you need to run Aspire in Apache Felix version 4.0.3 or later.

You can check which version of Apache Felix you're using by going to the Felix console and typing ps. Look for the version of the system bundle:

Felix> ps
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (4.3.0)
[   1] [Active     ] [    1] Apache Commons FileUpload Bundle (1.2.1)
[   2] [Active     ] [    1] Commons IO (2.4.0)
[   3] [Active     ] [    1] Apache Geronimo Bundles: json-20090211 (20090211.0.0.1)
[   4] [Active     ] [    1] Apache Felix Shell Service (1.4.3)
[   5] [Active     ] [    1] Apache Felix Configuration Admin Service (1.4.0)
[   6] [Active     ] [    1] Apache Felix Log Service (1.0.1)
[   7] [Active     ] [    1] Apache Felix Metatype Service (1.0.4)
[   8] [Active     ] [    1] Apache Felix Http Jetty (2.2.0)
[   9] [Active     ] [    1] Apache Felix Web Management Console (4.0.0)
[  11] [Active     ] [    1] Aspire Application (2.0.0.SNAPSHOT)

The methods detailed below will allow you to change the version of Aspire you use. However, they will not change the version of Apache Felix that Aspire runs inside.

If you want to run Aspire under Java 7, you need to make sure that the distribution you use is from Aspire 1.1 or later.

The easiest way to upgrade if you're not on Felix 4.0.3 or later is to use the Distribution Archetype, and generate a new distribution. You can then transfer across any custom applications and files, and merge the settings.xml in to the new copy.

Internet connected Installations

If your Aspire instance is configured to automatically load bundles from Maven via the network, follow the instructions below to update the version of Aspire you're running. If your server is not connected to the internet, instructions for updating can be found further down the page.

Version 1.2 or Earlier

If you're using an Aspire distribution project that was created using the distribution archetype version 1.2 or earlier and you want to change the version of Aspire it uses, you'll need to:

  • Change the default version in your distribution's config/settings.xml file to the desired version:
 <repository type="maven">
   <defaultVersion>AspireVersion</defaultVersion>                      <<<<<<<< Change this
  • Change the reference to the jar file in your distribution's config/ to the desired version: \
   file:bundles/system/ \
   file:bundles/system/ \
   file:bundles/system/org.apache.felix.configadmin.jar \
   file:bundles/system/org.apache.felix.log.jar \
   file:bundles/system/org.apache.felix.metatype.jar \
   file:bundles/system/org.apache.felix.http.jetty.jar \
   file:bundles/system/org.apache.felix.webconsole.jar \
   file:bundles/system/ \
   file:bundles/aspire/aspire-application-AspireVersion.jar            <<<<<<<< Change this
  • Change the aspire-application dependency in your distribution’s pom.xml to the desired version:
   <version>AspireVersion</version>                                    <<<<<<<< Change this
  • Rebuild your distribution using Maven:
 mvn install

WARNING: if you use the goal clean in the command above, any changes made to the distribution since the initial build will be lost

NOTE: in the above, AspireVersion refers to the version of Aspire you wish to use, and will be of the form #.#[.#][-SNAPSHOT]


Version 1.3 and later

 (1.3 Release)   If your distribution was created from the distribution archetype version 1.3 or later, it will by default be using the Aspire Bootloader. You can tell if it's using the Aspire Bootloader, as when you start Aspire you'll see a message (either to the console or felix.log file) similar to:

* Bundle id : 12
* Location  : file:bundles/boot/aspire-bootloader-1.3-SNAPSHOT.jar

Maven update policy: always

If this is the case, you only need to change the default version in your distribution's config/settings.xml file to the desired version:

 <repository type="maven">
   <defaultVersion>AspireVersion</defaultVersion>                      <<<<<<<< Change this

Restarting Aspire will then download the configured version of Aspire.

If you're not using the bootloader, use the same process for versions before 1.3 (above)

Servers with no Internet access

In the case of a server that has no internet access, you will already have modified the pom file to add <dependency> tags for all the bundles you're using.

To update the version of Aspire, you'll need to update these to the desired version, and follow the same process for versions before 1.3 (above).

However, you must remove the old versions of the bundles from the bundles/aspire directory, either manually or by running a clean - but beware, using clean will remove any modifications you made to the configuration.