Project

General

Profile

Deploying » History » Version 4

Paula Gearon, 03/04/2010 03:21 PM
Updates to versions in the JAR files

1 4 Paula Gearon
2
h1. Deployment
3
4 1 Paula Gearon
When building Mulgara for deployment you have to select one or more build targets. This page describes the various targets, and what the resulting artifacts are used for.
5
6 4 Paula Gearon
The standard target is simply _dist_ which builds all the major deployment targets.
7 1 Paula Gearon
8 4 Paula Gearon
9
h2. Targets
10
11 1 Paula Gearon
The artifacts created by each of the deployment targets are:
12 4 Paula Gearon
 *dist::
13 1 Paula Gearon
   All other distribution targets.
14 4 Paula Gearon
 *embedded-dist*::
15
   Creates mulgara-_version_.jar
16
 *querylang-dist*::
17
   Creates querylang-_version_.jar
18
 *driver-dist*::
19
   Creates driver-_version_.jar
20
 *descriptor-dist*::
21
   Creates descriptor-_version_.jar
22
 *mulgara-war*::
23
   Creates mulgara-_version_.war
24
 *lite-dist*::
25
   Creates mulgara-lite-_version_.jar
26
 *raw-dist*::
27
   Creates mulgara-raw-_version_.jar
28
 *core-dist*::
29
   Creates mulgara-core-_version_.jar
30 1 Paula Gearon
31 4 Paula Gearon
32
h2. JARs
33
34 1 Paula Gearon
The selection of which Jar to use is dependent on the deployment environment. The following is a description of each Jar.
35
36 4 Paula Gearon
37
h3. mulgara-_version_.jar
38
39 1 Paula Gearon
This is the general server jar. This contains the complete Mulgara system, and includes all the 3rd party libraries that Mulgara relies on. The Jar is executable, so it can be started easily with:
40 4 Paula Gearon
<pre>
41
<code class="sh">
42 1 Paula Gearon
 java -jar mulgara-x.y.z.jar
43 4 Paula Gearon
</code></pre>
44 1 Paula Gearon
No classpath is necessary to execute this jar, since everything is included.
45
46
If the built-in configuration is used, then Mulgara will create a database on disk, start an HTTP server with various web services, and an RMI server for Java connections. The default database will support all of the default resolvers and content handlers.
47
48 4 Paula Gearon
A different configuration can be set up at compile time (by editing the "conf/mulgara-config.xml":http://mulgara.org/svn/mulgara/trunk/conf/mulgara-config.xml file), or at runtime by using the *-c* command-line option. Note that the *-c* option is used to point to a URL, and not a file. So an example of using this might be:
49
<pre>
50
<code class="sh">
51 1 Paula Gearon
 java -jar mulgara-x.y.z.jar -c "file:/home/user/mulgara-config.xml"
52 4 Paula Gearon
</code></pre>
53
Use the *-h* option for a full set of command line options for the server program.
54 1 Paula Gearon
55
While useful, this jar is not suitable for use in an existing environment like Tomcat, due to the potential conflict between the environment path and the 3rd party jars that have been built in.
56
57
58 4 Paula Gearon
h3. querylang-_version_.jar
59
60
The is the general client jar. This contains everything needed to connect to a server, including a console application for issuing commands. Like _mulgara-version.jar_ this jar includes all the 3rd party libraries it needs, though this is significantly less.
61
62 1 Paula Gearon
The console application can be started in one of two modes. The default is a GUI console:
63 4 Paula Gearon
<pre>
64
<code class="sh">
65 2 Paula Gearon
 java -jar querylang-x.y.z.jar
66 4 Paula Gearon
</code></pre>
67
This brings up a Swing window containing a "command shell", useful for typing TQL commands, complete with command line editing and shell history. Java does not provide terminal controls by default, which made it impossible to develop this for use on the command line. However, the "Jline":http://jline.sourceforge.net/ library now makes this feasible, and consequently we expect to deprecate the Swing version soon.
68 2 Paula Gearon
69 4 Paula Gearon
It is also possible to run the client without a window, on a batch script. This uses the *-s* switch, and must specify a URL for the script. An example of running a script in a local file is:
70
<pre>
71
<code class="sh">
72 2 Paula Gearon
 java -jar querylang-x.y.z.jar -s "file:/home/user/data/myscript.tql"
73 4 Paula Gearon
</code></pre>
74
Use the *-h* option for a full set of command line options for this client. Also consider using the tools found in the "*tools*" directory of the sources. While these were built to demonstrate the use of the various APIs, they are often more useful than the complete client application. There are two applications here: *org.mulgara.tools.Tql* and *org.mulgara.tools.Sparql*. See the associated "README.txt":http://mulgara.org/svn/mulgara/trunk/tools/README.txt file for building and using these.
75 2 Paula Gearon
76 4 Paula Gearon
Like _mulgara-version.jar_, this jar contains more than is desirable for some environments.
77 2 Paula Gearon
78
79 4 Paula Gearon
h3. driver-_version_.jar
80 2 Paula Gearon
81 4 Paula Gearon
This jar contains the client API library. This is very similar to *querylang-_version_.jar*, but it does not include a command line interface, or the shell GUI.
82
83
This Jar provides the Connection API. This starts with a Connection, along with the SPARQL and TQL parsers for creating Commands to send over the Connection. For an example of using this API, see the "Tql":http://mulgara.org/svn/mulgara/trunk/tools/src/org/mulgara/tools/Tql.java and "Sparql":http://mulgara.org/svn/mulgara/trunk/tools/src/org/mulgara/tools/Sparql.java example tools.
84
85
86
h3. descriptor-_version_.jar
87
88 2 Paula Gearon
This provides a servlet for deploying Descriptors on a Java web server. Descriptors allow queries to be attached to a URL, with the results rendered through XSLT.
89
90 4 Paula Gearon
91
h3. mulgara-_version_.war
92
93 2 Paula Gearon
This is a WAR file (Web ARchive). It makes Mulgara available to services in a Java web server, and provides a web interface to the database.
94
95 4 Paula Gearon
96
h3. lite-_version_.jar
97
98 2 Paula Gearon
This version of Mulgara has fewer features than the main distribution, but not by much. This may be dropped soon.
99 3 Paula Gearon
100 2 Paula Gearon
101 4 Paula Gearon
h3. raw-_version_.jar
102 2 Paula Gearon
103 4 Paula Gearon
The full Mulgara distribution, but without embedded 3rd party libraries. You will want to use this version instead of *mulgara-_version_.jar* if need to avoid conflicts in the class path, such as deploying into Tomcat.
104
105
106
h3. core-_version_.jar
107
108
This contains the classes required to instantiate a *Database* object.
109
110 3 Paula Gearon
It contains no HTTP services, and avoids some of the optional resolvers. The remaining resolvers are:
111 4 Paula Gearon
* Store resolver: _the main database._
112
* File resolver: _select from RDF files._
113
* Lucene resolver: _full text searching._
114
* HTTP resolver: _select from URLs starting with !http://._
115
* URL resolver: _select from static RDF documents._
116
* Memory resolver: _store and select from temporary graphs stored in RAM._
117
* View resolver: _Select from graphs defined by other queries._
118
* Remote resolver: _Select from graphs on other Mulgara servers._
119
* Relational resolver: _Select from a "D2RQ":http://semanticweb.org/wiki/D2RQ transformation on a relational database._
120
* XSD resolver: _Provides virtual statements on literals, based on their "XSD datatypes":http://www.w3.org/TR/xmlschema-2/#built-in-datatypes._
121
* Prefix resolver: _Provides selection based on the start of a URI, or string literals._
122
* Node type resolver: _Provides selection of RDF nodes based on the 3 types: URIs/Literals/Blank._
123
* Null resolver: _provides the "empty" graph._
124 1 Paula Gearon
125 4 Paula Gearon
A cut down configuration file representing the reduced services is provided in this jar (_/conf/mulgara-x-config.xml_). Also, the *org.mulgara.server.!EmbeddedMulgaraServer* class is still present in this jar, meaning that it _is_ possible to start up a minimal server from the command line.
126 1 Paula Gearon
127
To use this jar, the following jars must be available in the classpath:
128 4 Paula Gearon
* activation-1.1.1.jar
129
* antlr.jar
130
* carol-2.0.5.jar
131
* castor-1.2-xml.jar
132
* commons-codec-1.3.jar
133
* commons-discovery-1.2.jar
134
* commons-httpclient-3.1.jar
135
* commons-logging-1.1.1.jar
136
* connector-1_5.jar
137
* emory-util-2.1-remote.jar
138
* howl-logger-0.1.11.jar
139
* icu4j_3_4.jar
140
* interruptiblermi-1.1.jar
141
* jargs-0.2.jar
142
* jena-2.5.6.jar
143
* joda-time-1.5.2.jar
144
* jotm-2.0.10.jar
145
* jotm_jrmp_stubs-2.0.10.jar
146
* jta-spec1_0_1.jar
147
* log4j-1.2.15.jar
148
* lucene-core-2.4.0.jar
149
* saaj-1.4.jar
150
* serializer-2.7.0.jar
151
* sesame-model-2.2.1.jar
152
* trove-2.0.4.jar
153
* xercesImpl-2.9.1.jar
154 1 Paula Gearon
155 4 Paula Gearon
This list may be reduced in future versions. It should also be clear that the _lucene_ jar is only needed by the Lucene resolver, and the _commons-httpclient_ jar is only used by the HTTP resolver. If a configuration without these resolvers is provided, then these jars can be skipped.
156 1 Paula Gearon
157 4 Paula Gearon
Despite not providing HTTP services, running the EmbeddedMulgaraServer application also requires:
158
* jetty-6.1.11.jar
159
* jetty-util-6.1.11.jar
160 1 Paula Gearon
161
We expect to remove the requirement for these jars in an upcoming version.