aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-docs/src/site/apt/adminguide/webapp.apt
blob: e06f0814a6a74a59c1c5ce6b519463a9c7a15eaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 ------
 Installing Apache Archiva as a Web Application
 ------

Installing Apache Archiva as a Web Application

~~TODO: link to wiki location for other application servers

  Archiva can be deployed as a web application into any Java EE application server. This document will show an
  example of doing so with Tomcat 5.5.

To deploy Archiva on Tomcat 5.5

   * Create a directory in tomcat called archiva, at the same level as bin, conf, logs and the others.

   * Copy the war file into the new directory

   * Create a conf/Catalina/localhost/archiva.xml file with the following data (replace the database paths with a suitable location):

+-------------------------------------------------------------------------+
 <?xml version="1.0" encoding="UTF-8"?>
 <Context path="/archiva"
          docBase="${catalina.home}/archiva/archiva-webapp-1.0.war">

 <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
           username="sa"
           password=""
           driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
           url="jdbc:derby:/path/to/database/archiva;create=true" />

 <Resource name="jdbc/archiva" auth="Container" type="javax.sql.DataSource"
           username="sa"
           password=""
           driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
           url="jdbc:derby:/path/to/database/archiva;create=true" />

 <Resource name="mail/Session" auth="Container"
            type="javax.mail.Session"
            mail.smtp.host="localhost"/>
 </Context>
+-------------------------------------------------------------------------+

   * <<Note>>: Tomcat 5.5.20 and 5.5.23 are missing MailSessionFactory and a
   few other classes.  JNDI mail sessions will <not> work.  Use Tomcat 5.5.17
   instead, or see {{{http://issues.apache.org/bugzilla/show_bug.cgi?id=40668}
   Bug 40668}} for a workaround.

   * Install <<<derby-10.1.3.1.jar>>> into the Tomcat <<<common/lib>>>. This is required since the data sources are
     instantiated before the web application.

 When you first start Archiva, you will see an Exception that schema SA does not exist - however it doesn't 
 cause a problem. If you use a username other than 'sa', such as 'archiva', then you seem to get the same error but
 Tomcat fails to start the context and you have to shutdown and restart again.

Archiva Configuration

 Archiva is configured using the <<<~/.m2/archiva.xml>>> configuration file by default when using a Java EE application server. 

~~TODO: how to configure the other file

Upgrading Archiva

  To upgrade the Archiva web application, simply replace the web application with an alternative. Since the database and configuration files are stored
  externally to the application, no further maintainance is needed.

  For general information about upgrading Archiva, see the relevant section in the {{{standalone.html#Upgrading%20Archiva} Installing standalone}} guide.

Configuring and Running Archiva

  Once Archiva is running, it is configured in the same way as the standalone instance. See the {{{../quick-start.html#Setting%20up%20your%20Archiva%20instance} quick start}} guide for more information.