Exist: Betterform integration in build target 禄dist芦

Created on 13 Oct 2017  路  4Comments  路  Source: eXist-db/exist

What is the problem

when building eXist with the target "dist" (to place an executable version of the software in a single directory without the sources) the resulting software comes without a complete betterform integration, the initial observation is that the dashboard is not available (the browser reports 404 when requesting dojo.js from bfResources)

it seems that the web.xml misses the corresponding servlets configuration which get added by the build target patchWebXml from extensions/betterform/build.xml.

(if we manually call this task after the build is complete, we can correct this problem, thanks to @Lena-Luise who found this solution)

What did you expect

a working instance of the database with a working dashboard - obviously.

Describe how to reproduce or add a test

./build.sh dist
./dist/eXist*/bin/startup.sh
curl http://localhost:8080/exist/apps/bfResources/scripts/dojo/dojo.js

Context information

Please always add the following information

  • eXist-db version 3.6.0-SNAPSHOT commit f0d3647ec7b3fd66c642d3541a2645ffe244276e
  • openjdk 1.8.0_131
  • Linux, Ubuntu Server 64 bit
  • no custom changes, just a cloned repo
bug

Most helpful comment

@mathias-goebel can I now close this one?

All 4 comments

To make the patchWebXml work it seems to be important to follow a certain build order. The following should be reproducable:

# git clone https://github.com/eXist-db/exist.git
# cd exist
exist# git checkout eXist-4.3.0
exist# ./build.sh
exist# ./build.sh dist
exist# cd dist/eXist-db-4.3.0/
exist/dist/eXist-db-4.3.0# ant -f extensions/betterform/build.xml patchWebXml
exist/dist/eXist-db-4.3.0# bin/startup.sh

The Dashboard should be now visible in the Browser.

@mathias-goebel @inormann So I think the following should work:

git clone https://github.com/eXist-db/exist.git
cd exist
git checkout eXist-4.3.0
./build.sh extension-betterform dist

The problem you have is that the Dashboard (and some apps) were designed in a way that lacked a separation of concerns, as such they require a component from betterForm which is actually not really anything to do with XForms or betterForm.

Unfortunately that means they will not work without betterForm being present. Normally when you compile eXist-db, it sets up and installs betterForm for you by default. If you disable betterForm in $EXIST_HOME/extensions/local.build.properties and just build eXist from source - you will see the same problems with the Dashboard etc.

Another option may be to follow this process:

git clone https://github.com/eXist-db/exist.git
cd exist
git checkout eXist-4.3.0
./build.sh
./build.sh dist

The first ./build.sh will compile eXist which set's up betterForm in the web.xml, that web.xml will then be used for the dist build.

I will also point out that in 5.0.0 we have a slight variation on this problem. Whilst betterForm is disabled in 5.0.0, the shared component from betterForm required for the Dashboard etc still needs to be enabled in web.xml.

Let me know how it goes...

@mathias-goebel can I now close this one?

yes, and thank you for pointing this out. i proceed building the from source and continue with the "dist" target in a following call.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bpolitycki picture Bpolitycki  路  4Comments

wolfgangmm picture wolfgangmm  路  3Comments

joewiz picture joewiz  路  4Comments

mathias-goebel picture mathias-goebel  路  6Comments

lguariento picture lguariento  路  5Comments