You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.apt 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. -----
  2. Getting Started with Archiva
  3. -----
  4. Henri Yandell
  5. -----
  6. 1 October 2006
  7. -----
  8. ~~ Licensed to the Apache Software Foundation (ASF) under one
  9. ~~ or more contributor license agreements. See the NOTICE file
  10. ~~ distributed with this work for additional information
  11. ~~ regarding copyright ownership. The ASF licenses this file
  12. ~~ to you under the Apache License, Version 2.0 (the
  13. ~~ "License"); you may not use this file except in compliance
  14. ~~ with the License. You may obtain a copy of the License at
  15. ~~
  16. ~~ http://www.apache.org/licenses/LICENSE-2.0
  17. ~~
  18. ~~ Unless required by applicable law or agreed to in writing,
  19. ~~ software distributed under the License is distributed on an
  20. ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  21. ~~ KIND, either express or implied. See the License for the
  22. ~~ specific language governing permissions and limitations
  23. ~~ under the License.
  24. ~~ NOTE: For help with the syntax of this file, see:
  25. ~~ http://maven.apache.org/guides/mini/guide-apt-format.html
  26. To checkout the latest code
  27. Using Subversion, either checkout from {{http://svn.apache.org/repos/asf/maven/archiva/trunk/}} or to get all of Maven 2, checkout from {{http://svn.apache.org/repos/asf/maven/trunks/}}.
  28. To build
  29. If this is the first time, and if you've not pulled this down for some other reason then it will save time to do the following first:
  30. * Download the 1.0 connector zip from: {{http://java.sun.com/j2ee/connector/download.html}}
  31. * Unpack the zip to get the jar
  32. * Run: mvn install:install-file -DgroupId=javax.resource -DartifactId=connector -Dversion=1.0 -Dpackaging=jar -Dfile=connector.jar
  33. * Download the 1.0.1B jta zip from: {{http://java.sun.com/products/jta/}}
  34. * Install it: mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=jta-1_0_1B-classes.zip
  35. Otherwise:
  36. * Build Archiva: mvn install
  37. To test-deploy Archiva on the embedded Jetty
  38. * cd archiva-web/archiva-webapp
  39. * mvn jetty:run
  40. To deploy Archiva to Tomcat 5.5
  41. * Create a directory in tomcat called archiva, at the same level as bin, conf, logs and the others.
  42. * Copy the war file from archiva/archiva-webapp/target into the new directory
  43. * Create a conf/Catalina/localhost/archiva.xml file with the following data:
  44. +-------------------------------------------------------------------------+
  45. <?xml version="1.0" encoding="UTF-8"?>
  46. <Context path="/archiva"
  47. docBase="${catalina.home}/archiva/archiva-webapp-1.0-SNAPSHOT.war">
  48. <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
  49. username="sa"
  50. password=""
  51. driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
  52. url="jdbc:derby:database/archiva;create=true" />
  53. <Resource name="jdbc/archiva" auth="Container" type="javax.sql.DataSource"
  54. username="sa"
  55. password=""
  56. driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
  57. url="jdbc:derby:database/archiva;create=true" />
  58. <Resource name="mail/Session" auth="Container"
  59. type="javax.mail.Session"
  60. mail.smtp.host="localhost"/>
  61. </Context>
  62. +-------------------------------------------------------------------------+
  63. * <<Note>>: Tomcat 5.5.20 and 5.5.23 are missing MailSessionFactory and a
  64. few other classes. JNDI mail sessions will <not> work. Use Tomcat 5.5.17
  65. instead, or see {{{http://issues.apache.org/bugzilla/show_bug.cgi?id=40668}
  66. Bug 40668}} for a workaround.
  67. * 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
  68. * 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):
  69. +-------------------------------------------------------------------------+
  70. <servlet-mapping>
  71. <servlet-name>jsp</servlet-name>
  72. <url-pattern>*.jspf</url-pattern>
  73. </servlet-mapping>
  74. +-------------------------------------------------------------------------+
  75. 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.
  76. To deploy Archiva on Plexus
  77. Plexus is a container developed as a part of Maven. It provides a very simple way to get started with Archiva:
  78. * Unpack the archiva-plexus-runtime/target/archiva-bin.tar.gz archive into a directory of your choice.
  79. * Start with: ./bin/plexus.sh start or a platform specific version.
  80. * A Derby exception "Schema 'SA' does not exist" occurs, but is not of concern.
  81. Setting up your Archiva instance
  82. * Goto {{http://localhost:9091/}} if on the embedded Jetty, {{http://localhost:8080/archiva/}} if on Tomcat or {{http://localhost:8080/archiva/}} if on Plexus.
  83. * On the first page - setup your administration user. The password requires a numerical character and must not be longer than 8 chars. You'll then need to log in. User 'admin' as the username and the password you've entered.
  84. * On the second page - setup your first repository. It can be both an m1 and an m2 repository.
  85. * On the third page - setup your indexing. Mostly this means choosing a directory to put the index in. It'll re-index every hour.
  86. A useful repository to setup when exploring is your local Maven repository.
  87. +-------------------------------------------------------------------------+
  88. Identifier: LOCAL
  89. Name: Maven2 Local Repository
  90. Location: $HOME/.m2/repository
  91. +-------------------------------------------------------------------------+
  92. Updating Archiva within a Tomcat
  93. While exploring Archiva, or perhaps while developing with it, you will want to delete the
  94. current state. Presuming you followed the instructions above, you will need to remove the
  95. following files from the ${catalina.home} directory. Ensure your Tomcat has first been
  96. shutdown.
  97. +-------------------------------------------------------------------------+
  98. # Remove the database
  99. rm -r bin/database/ bin/derby.log
  100. # Remove the archiva configuration
  101. rm $HOME/.m2/archiva.xml
  102. # Remove the temporary Tomcat files
  103. rm webapps/archiva/ work/Catalina/localhost/archiva/ logs/*
  104. # Remove the war file (if you're deploying a new one)
  105. rm archiva/*.war
  106. +-------------------------------------------------------------------------+