Skip to content

Commit 9fe8e05

Browse files
authored
Merge pull request #318 from adamretter/refactor/remove-war-build
We no longer support building a WAR file
2 parents 67b1f67 + 9a848be commit 9fe8e05

File tree

6 files changed

+32
-136
lines changed

6 files changed

+32
-136
lines changed

src/main/xar-resources/data/configuration/configuration.xml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,8 @@
2222
<title>Main configuration file</title>
2323

2424
<para>The main configuration file for <literal>eXist-db</literal> is called
25-
<literal>conf.xml</literal>, which is loaded from different directories depending on the
26-
server set-up (see <link xlink:href="deployment">Server Deployment</link> for more
27-
information). Specifically:</para>
28-
<itemizedlist>
29-
<listitem>
30-
<para>If you installed the standalone eXist-db distribution with the installer, the
31-
<literal>conf.xml</literal> file located in the root directory of the
32-
distribution (as specified by the system property
33-
<literal>exist.home</literal>).</para>
34-
<para/>
35-
</listitem>
36-
<listitem>
37-
<para>If eXist-db is installed as a web application (packaged in a
38-
<literal>.war</literal> file) in a servlet engine like tomcat, <literal>
39-
conf.xml</literal> is read from the <literal>WEB-INF</literal> directory of the
40-
web application.</para>
41-
<para>eXist-db normally has no access to files outside the context in which it is
42-
running when it is deployed as part of a web application. Therefore, when eXist
43-
is deployed in this way, the configuration is read from the
44-
<literal>WEB-INF</literal> directory.</para>
45-
</listitem>
46-
</itemizedlist>
25+
<literal>conf.xml</literal>, which is loaded the root directory of the
26+
distribution (as specified by the system property <literal>exist.home</literal>).</para>
4727

4828
<para>The configuration file <literal>conf.xml</literal> is divided into eleven
4929
sections:</para>

src/main/xar-resources/data/deployment/deployment.xml

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -143,52 +143,6 @@
143143

144144
<!-- ================================================================== -->
145145

146-
<sect1 xml:id="deploy-servlet">
147-
<title>Deploying in a Servlet Container</title>
148-
149-
<para>The standard distribution by default launches eXist-db as a web application deployed
150-
in a <link condition="_blank" xlink:href="http://eclipse.org/jetty/">Jetty</link>
151-
servlet container.</para>
152-
<para>The Jetty configuration can be found in
153-
<literal>tools/jetty/webapps/exist-webapp-context.xml</literal>. It defines a single web
154-
application context value <literal>&lt;Set
155-
name="contextPath"&gt;/exist&lt;/Set&gt;</literal>, mapped to the
156-
<literal>webapp</literal> directory. This value can be set to either
157-
<literal>/exist</literal> or <literal>/</literal>. Users modifying this value should
158-
subsequently remove the <literal>portal</literal> folder at <literal>
159-
/tools/jetty/webapps</literal>, which contains the default exist-db splashscreen
160-
displayed during certain redirects.</para>
161-
<para>Jetty is small, efficient and stable, so there is no need to switch to a different
162-
servlet engine unless your server setup requires this. However, it is not difficult to
163-
deploy eXist in a different servlet container, e.g. Apache's Tomcat.</para>
164-
<para>We usually provide a <literal>.war</literal> web archive for all major releases. You
165-
may either download that or, if you already installed the standard distribution, build a
166-
<code>.war</code> archive yourself. For details on how to do this, see <link xlink:href="exist-building">Building eXist-db</link> </para>
167-
<para>To install the <code>.war</code>, just copy it into the corresponding folder below
168-
your servlet engine installation (usually <literal>webapps</literal>) and rename it to
169-
<literal>exist.war</literal>. The servlet engine will normally unpack the file when you
170-
restart the server. To have better control of where the file is unpacked, you can also
171-
create a directory <literal>exist</literal> below the <literal>webapps</literal> folder
172-
and manually extract the <code>.war</code> there. For instance:</para>
173-
<programlisting>jar xfv exist.war</programlisting>
174-
<important>
175-
<para>Please remember that the <literal>data</literal> and <literal>log</literal>
176-
directories need to be writable!</para>
177-
</important>
178-
179-
<para>There are a few differences between the standard distribution and the
180-
<code>.war</code> install. In particular, the configuration files are found in the
181-
<literal>WEB-INF</literal> directory, including the important files
182-
<literal>conf.xml</literal> (eXist configuration) and <literal>log4j.xml</literal>
183-
(logging). The example data is in <literal>samples</literal>.</para>
184-
<para>To start the <link xlink:href="java-admin-client">Java Admin Client</link>, use the
185-
following command (from within <literal>exist</literal> web application's root
186-
directory):</para>
187-
<programlisting>java -jar WEB-INF/lib/start.jar client -ls</programlisting>
188-
</sect1>
189-
190-
<!-- ================================================================== -->
191-
192146
<sect1 xml:id="run-stand-alone">
193147
<title>Running as a Stand-alone Server</title>
194148

@@ -596,4 +550,4 @@
596550
target directory (which we prepared above), and compile and run it with:</para>
597551
<programlisting>javac TestDB.java java -Dexist.initdb=true -Dexist.home=. TestDB</programlisting>
598552
</sect1>
599-
</article>
553+
</article>

src/main/xar-resources/data/documentation/documentation.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@
435435
<varlistentry>
436436
<term> <link xlink:href="exist-building">Building eXist</link> </term>
437437
<listitem>
438-
<para>How to build Java <code>.jar</code> or <code>.war</code> files from an
438+
<para>How to build Java <code>.jar</code> files from an
439439
eXist distribution.</para>
440440
</listitem>
441441
</varlistentry>
@@ -552,7 +552,7 @@
552552
<varlistentry>
553553
<term> <link xlink:href="exist-building">Building eXist</link> </term>
554554
<listitem>
555-
<para>How to build Java <code>.jar</code> or <code>.war</code> files from an
555+
<para>How to build Java <code>.jar</code> files from an
556556
eXist distribution.</para>
557557
</listitem>
558558
</varlistentry>

src/main/xar-resources/data/exist-building/exist-building.xml

Lines changed: 26 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,7 @@
1212
</info>
1313
<!-- ================================================================== -->
1414

15-
<para>This article will tell you how to build a Java <code>.war</code> or <code>.jar</code> file for eXist-db. If you are building exist-db from source, please also check the <link xlink:href="https://github.com/eXist-db/exist/blob/develop/BUILD.md">build instructions</link> in the source-code repo.</para>
16-
17-
<!-- ================================================================== -->
18-
19-
<sect1 xml:id="war">
20-
<title>Building a <code>.war</code> file from the Standard Distribution</title>
21-
22-
<para>If you would like to deploy eXist-db into an existing servlet engine (e.g. tomcat), you will need a <literal>.war</literal> file. We no
23-
longer distribute a <literal>.war</literal> build, but it is easy to create one from the standard distribution by
24-
<emphasis>repackaging</emphasis> (not building) it:</para>
25-
<orderedlist>
26-
<listitem>
27-
<para>
28-
<emphasis role="bold">Install the standard distribution</emphasis>
29-
</para>
30-
<para>Get a standard distribution from eXist-db <link xlink:href="http://exist-db.org/exist/apps/homepage/index.html#download" condition="_blank">download
31-
page</link>. Install it into a directory of your choice. Make sure you include the <emphasis>source package</emphasis>.</para>
32-
</listitem>
33-
<listitem>
34-
<para>
35-
<emphasis role="bold">Generate the WAR</emphasis>
36-
</para>
37-
<para>Open a command line prompt and change to the directory where you just installed eXist-db. Call</para>
38-
<programlisting>build.sh dist-war</programlisting>
39-
<para>or</para>
40-
<programlisting>build.bat dist-war</programlisting>
41-
<para>once. This will generate a <literal>.war</literal> archive into directory <literal>dist</literal>.</para>
42-
</listitem>
43-
</orderedlist>
44-
<para>Note that generating a <code>.war</code> archive does only repackage the files in the distribution. So if the distribution worked properly
45-
for you, the <code>.war</code> should as well. You don't need to recompile eXist-db or sign any jars.</para>
46-
</sect1>
15+
<para>This article will tell you how to build a Java <code>.jar</code> file for eXist-db. If you are building exist-db from source, please also check the <link xlink:href="https://github.com/eXist-db/exist/blob/develop/BUILD.md">build instructions</link> in the source-code repo.</para>
4716

4817
<!-- ================================================================== -->
4918

@@ -92,11 +61,11 @@
9261
<title>Using the Build System</title>
9362

9463
<para>You can rebuild all eXist-db packages from the standard distribution or the GitHub repository. You can even create a new distribution from
95-
the one you installed. For example, assume you installed eXist using the installer GUI, but you need to have an exist.war package for deployment
96-
within a different servlet engine. Just call the main build script (<literal>build.sh</literal> or <literal>build.bat</literal>) and pass it the
97-
target <literal>dist-war</literal>:</para>
98-
<programlisting>build.sh dist-war</programlisting>
99-
<para>This will create a fresh <literal>.war</literal> archive in the <literal>dist</literal> directory.</para>
64+
the one you installed. For example, assume you installed eXist using the installer GUI, but you need to have a <literal>.tar.bz2</literal> package for deployment
65+
to a server. Just call the main build script (<literal>build.sh</literal> or <literal>build.bat</literal>) and pass it the
66+
target <literal>dist-bz2</literal>:</para>
67+
<programlisting>build.sh dist-bz2</programlisting>
68+
<para>This will create a fresh <literal>.tar.bz2</literal> archive in the <literal>dist</literal> directory.</para>
10069
<note>
10170
<para>To be able to use the build system, you need to include the "source" module when selecting installable packages in the installer
10271
GUI.</para>
@@ -181,18 +150,34 @@
181150
</row>
182151
<row>
183152
<entry>
184-
<para>dist-tgz</para>
153+
<para>dist-dir</para>
185154
</entry>
186155
<entry>
187-
<para>Packages eXist-db into a <literal>.tgz</literal> file.</para>
156+
<para>Packages eXist-db into a directory.</para>
157+
</entry>
158+
</row>
159+
<row>
160+
<entry>
161+
<para>dist-bz2</para>
162+
</entry>
163+
<entry>
164+
<para>Packages eXist-db into a <literal>.tar.bz2</literal> file.</para>
188165
</entry>
189166
</row>
190167
<row>
191168
<entry>
192-
<para>dist-war</para>
169+
<para>dist-tar</para>
193170
</entry>
194171
<entry>
195-
<para>Packages eXist-db into a <literal>.war</literal> file for deployment within a servlet engine.</para>
172+
<para>Packages eXist-db into a <literal>.tar</literal> file.</para>
173+
</entry>
174+
</row>
175+
<row>
176+
<entry>
177+
<para>dist-tgz</para>
178+
</entry>
179+
<entry>
180+
<para>Packages eXist-db into a <literal>.tgz</literal> file.</para>
196181
</entry>
197182
</row>
198183
<row>

src/main/xar-resources/data/production_good_practice/production_good_practice.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@
422422
<sect1 xml:id="web-deploy">
423423
<title>Web Deployments</title>
424424

425-
<para>eXist-db, like any Web Application Server (Tomcat, WebLogic, GlassFish, etc.), should
425+
<para>eXist-db, like any Web Application Server, should
426426
not be directly exposed to the Web. Instead, we strongly recommend proxying eXist-db
427427
through a Web Server such as <link condition="_blank"
428428
xlink:href="http://wiki.nginx.org/Main">Nginx</link> or <link condition="_blank"

src/main/xar-resources/data/validation/validation.xml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -422,29 +422,6 @@
422422
<para>To avoid potential deadlocking it is considered good practice to store XML
423423
instance documents and grammar documents in separate collections.</para>
424424
</listitem>
425-
<listitem>
426-
<para>Tomcat has an long standing bug which makes it impossible to register a custom
427-
protocol handler (object <link condition="_blank"
428-
xlink:href="https://docs.oracle.com/javase/10/docs/api/java/net/URLStreamHandler.html"
429-
><code>URLStreamHandler</code></link>) to the JVM. The alternative is to
430-
register the object by setting the system property
431-
<code>java.protocol.handler.pkgs</code> but this fails as well.</para>
432-
<para>As a result, the validation features are only partly useable in Tomcat. There
433-
are two alternatives: (1) switch to a recent version of Jetty, or (2) use
434-
absolute URLs pointing the REST interface, e.g.
435-
<code>http://localhost:8080/exist/rest/db/mycollection/schema.xsd</code>.</para>
436-
</listitem>
437-
<listitem>
438-
<para>eXist relies heavily on features provided by the Xerces XML parser. Out of the
439-
box the eXist izPack installer provides all required <code>.jar</code> files.
440-
However, when eXist is installed in for instance Tomcat, the required parser
441-
libraries need to be copied manually from the eXist <code>lib/endorsed</code>
442-
directory into the server <link condition="_blank"
443-
xlink:href="http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html"
444-
>endorsed</link> directory.</para>
445-
<para>Required endorsed files: <code>resolver-*.jar xalan-*.jar serializer-*.jar
446-
xercesImpl-*.jar</code> </para>
447-
</listitem>
448425

449426
<listitem>
450427
<para>The explicit validation is performed by <link condition="_blank"

0 commit comments

Comments
 (0)