annotate website/build-maven.md @ 5:ee158994651f

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