Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

If you get some weird classpath errors (packages appear as src.main.java.org.*), this is because of old .project files being present in the checkout. Delete them and the .classpath files and import again.

Set up a Tomcat server

Info

For more information on setting up Tomcat in general, see the Archiva documentation

This is what I needed to get a working Tomcat server:

  • go to preferences, then choose Server > Installed Runtimes
  • install a Tomcat 5.5 runtime (or of your choice, but these instructions follow that for Tomcat 5.5), specifying the installation directory
  • go to the Servers view (it may need to be opened from Window > Show view)
  • right click and select New > Server
  • Select the Tomcat server and press Finish
  • right click the server and select Properties
  • click the Switch Location button so that it says /Servers/Tomcat v5.5 Server at localhost-config and press Ok
  • double click the server to bring up the properties pane
  • change the Deploy path to a convenient location (such as /path/to/workspace/Servers/Tomcat v5.5 Server at localhost-config/webapps). Save the file.
  • click "Open launch configuration"
  • under the Classpath tab, select User Entries, and click Add External JARs...
  • add the mail-1.4.jar and derby-10.1.3.1.jar from your file system (perhaps a local repository)
  • right click archiva-webapp and select Maven 2 > Package artifact (you need to do this step to generate the Plexus resources and to populate WEB-INF/lib due to a bug. If the web application fails to start, check these two things)
  • right click archiva-webapp and select Properties
  • Select Web Project Settings and change the Context Root to archiva then press Ok
  • Edit server.xml in the Servers project that was created in your workspace and add this inside the existing Context for archiva:
    Code Block
    xml
    xml
    
     <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"/>
    
  • right click archiva-webapp and select Refresh
  • right click archiva-webapp and select Run as > Run on Server
Info

For more information on setting up Tomcat in general, see the Archiva documentation