comparison website/build-maven.md @ 4:7ad66b7151e0

start markdownification
author casties
date Tue, 27 Aug 2013 18:46:41 +0200
parents
children ee158994651f
comparison
equal deleted inserted replaced
3:9a472dab7e09 4:7ad66b7151e0
1 # Building digilib with Maven
2
3 The easiest way to get the latest and greatest digilib is the [Maven](http://maven.apache.org/) build tool.
4 It will download, compile, and install the latest digilib version and all required libraries.
5
6 ## What you need
7
8 * [Java](http://www.java.com/) (1.5 or higher)
9 * [Maven](http://maven.apache.org/)
10 * [Mercurial](http://mercurial.selenic.com/)
11 * A Servlet container like [Tomcat](http://tomcat.apache.org/)
12 or [Jetty](http://www.eclipse.org/jetty/) to run the web application.
13
14 ## Quick build
15
16 The fastest way to build the digilib web application is to download the digilib
17 project file [pom.xml](http://hg.berlios.de/repos/digilib/raw-file/tip/pom.xml)
18 (download and save it) and run
19
20 mvn scm:bootstrap -N
21
22 in the same directory as the `pom.xml` file.
23
24 This will create a web application directory `digilib-webapp-2.2-SNAPSHOT`
25 and a WAR file `digilib-webapp-2.2-SNAPSHOT-srv3.war` (or similar)
26 in the subdirectory `target/checkout/webapp/target/`
27
28 Digilib uses the Asynchronous Servlet API (3.0) by default. You will need Java version 6
29 and Tomcat version 7 or Jetty version 8 or later to use it.
30 If you want to use the old non-Asynchronous Servlet API (2.3) add `-Pservlet2`
31 to the Maven command line above.
32
33 ## Developer build
34
35 If you are developing with digilib it is helpful to check out the source
36 code separately so you can keep it around, modify it or change the configuration
37 before you deploy.
38
39 To check out the latest source code into the directory `digilib` run
40
41 hg clone http://hg.berlios.de/repos/digilib
42
43 The digilib configuration files are now in `digilib/webapp/src/main/webapp/WEB-INF/`
44
45 If you want to update your copy of digilib to the latest version at some time in the future
46 just run
47
48 hg pull
49 hg up
50
51 in the `digilib` directory.
52
53 To build the resulting source code, change into the `digilib`
54 directory you checked out above and run
55
56 mvn package
57
58 This will create a web application directory `digilib-webapp-2.2-SNAPSHOT`
59 and a WAR file `digilib-webapp-2.2-SNAPSHOT-srv3.war` (or similar) in
60 the subdirectory `webapp/target/` .
61
62 Digilib uses the Asynchronous Servlet API (3.0) by default. You will need Java version 6
63 and Tomcat version 7 or Jetty version 8 or later to use it.
64 If you want to use the old non-Asynchronous Servlet API (2.3) add `-Pservlet2`
65 to the Maven command line above.
66
67 ## Deploying the web application by hand
68
69 To deploy digilib just copy the web application directory into the `webapp`
70 directory of the Servlet container.
71
72 Since the URL of your digilib server starts with the name of the web application
73 and the name of the web application is derived from the name of the web
74 application directory **please rename the web application directory to `digitallibrary`
75 before you start**
76
77 Then you should see your digilib running at the URL
78 [http://localhost:8080/digitallibrary/jquery/digilib.html](http://localhost:8080/digitallibrary/jquery/digilib.html)
79
80 ## Configuring digilib
81
82 To change the configuration of digilib just edit the file `digilib-config.xml`
83 in the web application directory (`digitallibrary/WEB-INF/digilib-config.xml`).
84 Documentation of the configuration options is [here](digilib-config.html).
85
86 You can see a summary of your running digilib configuration at the URL
87 [http://localhost:8080/digitallibrary/server/dlConfig.jsp](http://localhost:8080/digitallibrary/server/dlConfig.jsp)
88