Monday, September 29, 2008

Upgrading Archiva from 1.0.2 to 1.1.2

Upgrading Archiva from v1.0.2 to v1.1.2: Note before starting! I don't know that this is the best way of doing this, since I appeared to lose the user information during the upgrade. Please ask for help on the users at list if you need help. You must send an email to users-subscribe at to subscribe first (and confirm the email you get back from them). Our internal Archiva v1.0.2 instance was being extremely slow this morning for some reason (so maven 2 builds were slow), so I thought I might upgrade to the latest version to see if it would help. After a little while searching I found some info at the bottom of: about upgrading Archiva, which read: "Upgrading Archiva Upgrading Archiva is straightforward if the directions for separating the base from the installation above are followed. Simply retain the data/repositories and data/databases/users directories, and the configuration files (in the conf directory, or the other locations specified above) and use a new extracted installation of Archiva. Note that the users database must always be retained as it contains the permissions and user information across versions. However, in order to take advantage of the improvements in search in Archiva 1.1 (and higher versions), s.a. search by java class/package/method, the archiva database must be re-created. So you need to delete the data/databases/archiva directory, delete the .index directories of your respective repositories, and execute the repository and database scanners after starting Archiva. The repository data is portable across versions, and multiple versions can be configured to look at the same repositories (though not run simultaneously)." Arnaud Heritier also shared the following wiki page: Downloaded latest standalone version from: I tar/gzipped the (standalone) apache-archiva-1.0.2 dir>/data dir and extracted it into the new/never started (standalone) apache-archiva-1.1.2 dir (which didn't already have a data dir). Did my best to follow directions by deleting the apache-archiva-1.1.2/data/archiva/database directory and then searched for *.index directories under apache-archiva-1.1.2/data, but didn't find any to remove. (Optional step, because we have symlinks to all apps) I removed the symlink to the old archiva and replaced with a new one. I noticed that the new platform independent start/stop script is bin/archiva (or archiva.bat). Also noticed that instead of having to change the ports in conf/plexus.xml you change it in conf/jetty.xml. Then I started Archiva and learned that I had to recreate the admin user. Luckily I had the username/password handy. It appears that users are lost when upgrading. :( ! Then per directions, I logged in as admin and clicked on all of the following (according to the instructions you only need to "execute the repository and database scanners", but I did all of this just in case): * Repository Scanning -> Update Consumers * Database -> Update Cron * Database -> Update Database Now * Database -> Update Consumers (click on this under all sections) * Repositories -> Scan Repository Now (click on this under all sections) That's all. I wish I could say this worked great, but it seems that the upgrade is a little painful.

No comments: