|1. Download Archiva from http://archiva.apache.org/.|
2. Unzip Archiva into a directory. On my Windows box, I extracted it to: C:\java\apache-archiva-1.1
3. Choose a destination location for the repo, config, logs, etc (so that you don't loose them during upgrades). Create this directory and set the environment variable ARCHIVA_HOME to it. In my case, that was: U:\private\archiva
4. Create $ARCHIVA_HOME/conf, $ARCHIVA_HOME/logs, $ARCHIVA_HOME/data
5. Copy the files from the archiva install directory's configuration directory (ie: C:\java\apache-archiva-1.1\conf\*.*) into the new configuration directory (ie: U:\private\archiva\conf)
6. Edit the $ARCHIVA_HOME/conf/jetty.xml to have the port you would like to use. I don't keep the default 8080 because then it conflicts with other installs before I have a chance to save them...
7. Start archiva. The instructions tell you how to use 'archiva install' and 'archiva start' but I could not get that to work. It would install and it would start but it would immediately die without any known reason given in the logs... So, instead, I have a dedicated dos prompt set up for 'archiva console'. If you are concerned about it not running automatically when Windows starts up, then put a shortcut to it in your Startup folder (ie: C:\Documents and Settings\mdeaelfweald\Start Menu\Programs\Startup).
8. Go to the webpage for it. You could use http://localhost:8090/archiva [replacing the port with the one in step #6] but I prefer to also replace localhost with the machine name so that it is obvious what url to use with other machines on the network. Ie: http://mymachine:8090/archiva. Once you go there, it will require that you setup your admin account.
9. Create a new account (ie: not admin) that you will use to access Archiva from Maven. You'll use the username and password in step #13.
10. Under Managed Repositories, setup any additional remote proxies you are currently using in your maven projects. I setup ibiblio and the legacy java.net maven repo.
11. Under Proxy Connectors, link the new repos (step #10) under the 'internal' (Archiva Managed Internal Repository) repository. Based on the pre-existing ones, I set my settings for the new proxies to:
12. Under Repository Groups, create a new identifier. In this example, we are calling it 'myrepo'. Under this virtual repository, make sure to link both the 'internal' and 'snapshot' repositories.
13. Configure Maven to use Archiva for all its access. Create a settings.xml file as such (replacing the username and password):
14. If you had previously used Maven, then get rid of your old maven repository to force it to download all the jars again. In my case, I simply renamed
C:\Documents and Settings\mdeaelfweald\.m2\repositoryto
C:\Documents and Settings\mdeaelfweald\.m2\eld-repository
15. Build your maven project. It will take quite awhile to re-download all the artifacts the first time, but Archiva will cache them locally thus making future access (even by others on the network) faster.
16. If it fails to find any artifacts, you will probably need to install them. This can be done in the Upload Artifact section.
Enabling snapshot uploads:
1. Go into Repositories, find the "Archiva Managed Snapshot Repository" (snapshot) and click on 'Show POM Snippet'. It will show something like this:
2. Add the
3. Add the
4. In your settings.xml, copy the 'archiva.default' server configuration and change the copies id to match the one in this POM snippet (in this case: 'snapshots')
5. mvn deploy
Environment Setup >