Project

General

Profile

Deploying » History » Version 3

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

1 1 Paula Gearon
= Deployment =
2
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.
3
4
The standard target is simply ''dist'' which builds all the major deployment targets.
5
6
== Targets ==
7
The artifacts created by each of the deployment targets are:
8
 '''dist::
9
   All other distribution targets.
10
 '''embedded-dist'''::
11
   Creates mulgara-''version''.jar
12
 '''querylang-dist'''::
13
   Creates querylang-''version''.jar
14
 '''driver-dist'''::
15
   Creates driver-''version''.jar
16
 '''descriptor-dist'''::
17
   Creates descriptor-''version''.jar
18
 '''mulgara-war'''::
19
   Creates mulgara-''version''.war
20
 '''lite-dist'''::
21
   Creates mulgara-lite-''version''.jar
22
 '''raw-dist'''::
23
   Creates mulgara-raw-''version''.jar
24
 '''core-dist'''::
25
   Creates mulgara-core-''version''.jar
26
27
== JARs ==
28
The selection of which Jar to use is dependent on the deployment environment. The following is a description of each Jar.
29
30
=== mulgara-''version''.jar ===
31
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:
32
{{{
33
#!sh
34
 java -jar mulgara-x.y.z.jar
35
}}}
36
No classpath is necessary to execute this jar, since everything is included.
37
38
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.
39
40
A different configuration can be set up at compile time (by editing the [http://mulgara.org/svn/mulgara/trunk/conf/mulgara-config.xml 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:
41
{{{
42
#!sh
43
 java -jar mulgara-x.y.z.jar -c "file:/home/user/mulgara-config.xml"
44
}}}
45
Use the '''-h''' option for a full set of command line options for the server program.
46
47
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.
48
49
=== querylang-''version''.jar ===
50
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.
51
52
The console application can be started in one of two modes. The default is a GUI console:
53
{{{
54
#!sh
55
 java -jar querylang-x.y.z.jar
56
}}}
57 2 Paula Gearon
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 [http://jline.sourceforge.net/ Jline] library now makes this feasible, and consequently we expect to deprecate the Swing version soon.
58 1 Paula Gearon
59
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:
60
{{{
61
#!sh
62
 java -jar querylang-x.y.z.jar -s "file:/home/user/data/myscript.tql"
63
}}}
64
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 [http://mulgara.org/svn/mulgara/trunk/tools/README.txt README.txt] file for building and using these.
65
66
Like ''mulgara-version.jar'', this jar contains more than is desirable for some environments.
67
68 2 Paula Gearon
=== driver-''version''.jar ===
69
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.
70
71
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 [http://mulgara.org/svn/mulgara/trunk/tools/src/org/mulgara/tools/Tql.java Tql] and [http://mulgara.org/svn/mulgara/trunk/tools/src/org/mulgara/tools/Sparql.java Sparql] example tools.
72
73
=== descriptor-''version''.jar ===
74
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.
75
76
=== mulgara-''version''.war ===
77
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.
78
79
=== lite-''version''.jar ===
80
This version of Mulgara has fewer features than the main distribution, but not by much. This may be dropped soon.
81
82
=== raw-''version''.jar ===
83
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.
84
85
=== core-''version''.jar ===
86
This contains the classes required to instantiate a '''Database''' object.
87
88
It contains no HTTP services, and avoids some of the optional resolvers. The remaining resolvers are:
89
 * Store resolver: ''the main database.''
90
 * File resolver: ''select from RDF files.''
91
 * Lucene resolver: ''full text searching.''
92
 * HTTP resolver: ''select from URLs starting with !http://.''
93
 * URL resolver: ''select from static RDF documents.''
94
 * Memory resolver: ''store and select from temporary graphs stored in RAM.''
95
 * View resolver: ''Select from graphs defined by other queries.''
96
 * Remote resolver: ''Select from graphs on other Mulgara servers.''
97
 * Relational resolver: ''Select from a [http://semanticweb.org/wiki/D2RQ D2RQ] transformation on a relational database.''
98
 * XSD resolver: ''Provides virtual statements on literals, based on their [http://www.w3.org/TR/xmlschema-2/#built-in-datatypes XSD datatypes].''
99
 * Prefix resolver: ''Provides selection based on the start of a URI, or string literals.''
100
 * Node type resolver: ''Provides selection of RDF nodes based on the 3 types: URIs/Literals/Blank.''
101
 * Null resolver: ''provides the "empty" graph.''
102
103
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.
104
105
To use this jar, the following jars must be available in the classpath:
106
 * activation-1.1.1.jar
107
 * antlr.jar
108
 * carol-2.0.5.jar
109
 * castor-1.2-xml.jar
110
 * commons-codec-1.3.jar
111
 * commons-discovery-1.2.jar
112
 * commons-httpclient-3.1.jar
113 3 Paula Gearon
 * commons-logging-1.1.1.jar
114 2 Paula Gearon
 * connector-1_5.jar
115
 * emory-util-2.1-remote.jar
116 1 Paula Gearon
 * howl-logger-0.1.11.jar
117 3 Paula Gearon
 * icu4j_3_4.jar
118
 * interruptiblermi-1.1.jar
119 2 Paula Gearon
 * jargs-0.2.jar
120 3 Paula Gearon
 * jena-2.5.6.jar
121 2 Paula Gearon
 * joda-time-1.5.2.jar
122 1 Paula Gearon
 * jotm-2.0.10.jar
123 2 Paula Gearon
 * jotm_jrmp_stubs-2.0.10.jar
124 1 Paula Gearon
 * jta-spec1_0_1.jar
125
 * log4j-1.2.15.jar
126 3 Paula Gearon
 * lucene-core-2.4.0.jar
127 2 Paula Gearon
 * saaj-1.4.jar
128
 * serializer-2.7.0.jar
129 3 Paula Gearon
 * sesame-model-2.2.1.jar
130
 * trove-2.0.4.jar
131
 * xercesImpl-2.9.1.jar
132 2 Paula Gearon
133 3 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.
134 2 Paula Gearon
135
Despite not providing HTTP services, running the !EmbeddedMulgaraServer application also requires:
136
 * jetty-6.1.11.jar
137
 * jetty-util-6.1.11.jar
138
139
We expect to remove the requirement for these jars in an upcoming version.