blob: aabcc8eaa94c39cb671b09a8bb0880ddee8e2e5b (
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
72
73
74
75
76
77
78
79
80
81
|
------
Installing Apache Archiva as a Web Application
------
Installing Apache Archiva as a Web Application
~~TODO: link to wiki location for other application servers
~~TODO: upgrading
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 from apps/archiva/lib into the new directory
* Create a conf/Catalina/localhost/archiva.xml file with the following data:
+-------------------------------------------------------------------------+
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/archiva"
docBase="${catalina.home}/archiva/archiva-webapp-1.0-SNAPSHOT.war">
<Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
username="sa"
password=""
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby: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: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.
* Copy $HOME/.m2/org/apache/derby/derby/10.1.3.1/derby-10.1.3.1.jar (or from the remote repository) into the Tomcat
common/lib
* To deal with a current bug, you'll also need to add the following to your ${catalina.home}/conf/web.xml in the
relevant section (search for jspx):
+-------------------------------------------------------------------------+
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jspf</url-pattern>
</servlet-mapping>
+-------------------------------------------------------------------------+
When you first start Archiva, you will see an Exception that schema SA does not exist - however it doesn't appear to
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.
Updating Archiva within a Tomcat
While exploring Archiva, or perhaps while developing with it, you will want to delete the
current state. Presuming you followed the instructions above, you will need to remove the
following files from the ${catalina.home} directory. Ensure your Tomcat has first been
shutdown.
+-------------------------------------------------------------------------+
# Remove the database
rm -r bin/database/ bin/derby.log
# Remove the archiva configuration
rm $HOME/.m2/archiva.xml
# Remove the temporary Tomcat files
rm webapps/archiva/ work/Catalina/localhost/archiva/ logs/*
# Remove the war file (if you're deploying a new one)
rm archiva/*.war
+-------------------------------------------------------------------------+
~~TODO: what next? revise above too
|