### Start eXist Server Interactively Source: https://github.com/exist-db/exist/blob/develop/tools/Solaris/README.txt Starts an interactive eXist server instance. This is a prerequisite for setting the admin password. ```bash $ su root # su - exist $ /opt/eXist-db/bin/startup.sh ``` -------------------------------- ### Install a Package using XQuery Source: https://github.com/exist-db/exist/blob/develop/extensions/modules/expathrepo/README.md Import the expath repository module and use the repo:install() function with the package's .xar file name to install it. Ensure the package name is correct. ```xquery import module namespace repo="http://exist-db.org/xquery/repo"; repo:install('functx-1.0.xar') ``` -------------------------------- ### Installer and Package Naming Convention Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Suggested naming convention for installer files (EXE, JAR, DMG) to clearly reflect the project's version number. ```text eXist-db-setup-3.1.0.exe eXist-db-setup-3.1.0.jar eXist-db-3.1.0.dmg ``` -------------------------------- ### GitFlow Init Settings Source: https://github.com/exist-db/exist/blob/develop/CONTRIBUTING.md Example configuration prompts and user inputs for initializing GitFlow with eXist-DB specific settings. ```bash $ git flow init Which branch should be used for bringing forth production releases? - master Branch name for production releases: [master] Branch name for "next release" development: [develop] How to name your supporting branch prefixes? Feature branches? [feature/] Release branches? [release/] Hotfix branches? [hotfix/] Support branches? [support/] Version tag prefix? [] eXist- Hooks and filters directory? [.git/hooks] ``` -------------------------------- ### Enable and Start eXist Standalone Service Source: https://github.com/exist-db/exist/blob/develop/tools/Solaris/README.txt Enables and starts the eXist standalone service using SMF commands. Use `svcs -a | grep eXist` to check the service status. ```bash # svcadm -v enable eXist ``` -------------------------------- ### List Available Packages using XQuery Source: https://github.com/exist-db/exist/blob/develop/extensions/modules/expathrepo/README.md Import the expath repository module and use the repo:list() function to view all installed packages. This is useful for checking the current state of the repository. ```xquery import module namespace repo="http://exist-db.org/xquery/repo"; repo:list() ``` -------------------------------- ### Build and Install eXist-db Module Source: https://github.com/exist-db/exist/blob/develop/exist-indexes-jmh/README.md Builds the exist-indexes-jmh module using Maven, skipping tests and Docker, and installs it into the local Maven repository. Ensures the benchmark picks up your branch's code. ```bash JAVA_HOME=/path/to/java-21 \ mvn install -pl exist-indexes-jmh -am -DskipTests \ -Ddependency-check.skip=true -Ddocker=false ``` -------------------------------- ### Build Docker Image with Custom Cache and Broker Sizes Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Configure eXist-DB's cache size and maximum brokers at build time using Maven build arguments. This example sets MAX_CACHE to 312 and MAX_BROKER to 15. ```bash mvn -DskipTests clean package docker:build --build-arg MAX_CACHE=312 MAX_BROKER=15 . ``` -------------------------------- ### Perform Product Release with Maven Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Execute this command to upload Maven artifacts to Maven Central, Docker images to Docker Hub, and eXist-DB distributions to GitHub releases. Ensure all necessary properties like docker, mac-signing, installer profile, and izpack-signing are set. ```bash $ mvn -Ddocker=true -Dmac-signing=true -P installer -Dizpack-signing=true -Djarsigner.skip=false -Darguments="-Ddocker=true -Dmac-signing=true -P installer -Dizpack-signing=true -Djarsigner.skip=false" release:perform ``` -------------------------------- ### Nightly Build with Timestamp Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Example of appending a timestamp for nightly builds, facilitating integration with Maven-compliant systems and providing a human-readable sequence. ```text eXist-db-setup-3.2.0-SNAPSHOT+20170507213722.exe eXist-db-setup-3.2.0-SNAPSHOT+20170507213722.jar eXist-db-3.2.0-SNAPSHOT+20170507213722.dmg ``` -------------------------------- ### Commit Message Example with Issue Tracking Source: https://github.com/exist-db/exist/blob/develop/CONTRIBUTING.md Example of a correctly formatted commit message, including a label, a summary, and a line indicating closure of a GitHub issue. ```git [bugfix] Fix relative paths in EXPath classpath.txt files. Closes https://github.com/eXist-db/exist/issues/4901 We now store the path of Jar files in each EXPath Package's .exist/classpath.txt file relative to the package's content/ sub-folder. ``` -------------------------------- ### Start Feature Branch with GitFlow Source: https://github.com/exist-db/exist/blob/develop/CONTRIBUTING.md Use GitFlow to start a new feature branch. This command creates and checks out a new branch for your feature development. ```bash git flow feature start my-feature ``` -------------------------------- ### Start and Stop eXist-DB with Docker Compose Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Use these commands to manage the eXist-DB service when running with Docker Compose. Ensure you have a `docker-compose.yml` file configured. ```bash # starting eXist-db docker-compose up -d # stop eXist-db docker-compose down ``` -------------------------------- ### Docker ENV Variable Example (Ineffective) Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Demonstrates that setting environment variables via `docker run -e` does not affect the eXist-DB image build because the final image lacks a shell. Use build arguments or modify Dockerfile for permanent configuration. ```bash # !This has no effect! docker run -dit -p8080:8080 -e MAX_BROKER=10 ae4d6d653d30 ``` -------------------------------- ### Scale Image URL Example Source: https://github.com/exist-db/exist/blob/develop/extensions/images/README.md Access scaled images using the /images/scale/ path followed by the image's database path and the 's' parameter for desired size. ```http http://localhost:8080/exist/images/scale/path/to/image.tif?s=512 ``` -------------------------------- ### Query method descriptions with DuckDB Source: https://github.com/exist-db/exist/blob/develop/AGENTS.md Use DuckDB to query CSV files for method descriptions containing specific keywords. This example retrieves class names, signatures, and descriptions related to 'authentication'. ```bash # Find method descriptions containing a keyword duckdb -c "SELECT \"Class name\", Signature, Description FROM '.moderne/context/method-descriptions.csv' WHERE Description LIKE '%authentication%'" ``` -------------------------------- ### Release Candidate Naming Convention Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Suggested naming convention for Release Candidate (RC) versions of installers and Maven artifacts. ```text eXist-db-setup-4.0.0-RC1.exe eXist-db-setup-4.0.0-RC1.jar eXist-db-4.0.0-RC1.dmg exist-core-4.0.0-RC1.jar exist-core-4.0.0-RC1.pom ``` -------------------------------- ### Run eXist-DB Docker Container Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Starts an eXist-DB container in detached mode, mapping ports for web access and assigning a name. The `-it` flags allow interaction, `-d` detaches, and `-p` maps ports. ```bash docker run -dit -p 8080:8080 -p 8443:8443 --name exist existdb/existdb:latest ``` -------------------------------- ### Crop Image URL Example Source: https://github.com/exist-db/exist/blob/develop/extensions/images/README.md Access cropped images using the /images/crop/ path followed by the image's database path and 'x', 'y', 'w', 'h' parameters for the bounding box. ```http /images/crop/path/to/image.tif?x=10&y=20&w=100&h=50 ``` -------------------------------- ### Store Version in pom.xml Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md The version number is stored in the `exist-parent/pom.xml` file within the `` tag. This example shows how a SNAPSHOT version is represented. ```xml 3.2.0-SNAPSHOT ``` -------------------------------- ### Quick Build (Maven) Source: https://github.com/exist-db/exist/blob/develop/CLAUDE.md Performs a quick Maven build, skipping tests and specific profiles. Ensure JAVA_HOME is set to Java 21. ```bash JAVA_HOME=$(/usr/libexec/java_home -v 21) \ mvn -T1.5C clean install -DskipTests -Ddependency-check.skip=true -Ddocker=false \ -P 'skip-build-dist-archives,!build-dist-archives,!mac-dmg-on-mac,!codesign-mac-dmg,!mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,!appassembler-booter' ``` -------------------------------- ### Set up JDK for Windows CI Source: https://github.com/exist-db/exist/blob/develop/extensions/indexes/vector-it/README.md Configure the Java Development Kit in a GitHub Actions workflow. Use the 'temurin' distribution for Java 21 to ensure compatibility with ONNX Runtime. ```yaml - name: Set up JDK uses: actions/setup-java@v5 with: distribution: temurin java-version: '21' ``` -------------------------------- ### Build with Docker Image Source: https://github.com/exist-db/exist/blob/develop/BUILD.md Build the eXist-db project and include the Docker image in the build process by using the `-Ddocker=true` Maven switch. ```bash mvn -Ddocker=true package ``` -------------------------------- ### Get Summary for a Specific Match Source: https://github.com/exist-db/exist/blob/develop/exist-core/src/main/resources/org/exist/xquery/lib/kwic.xql.html This snippet demonstrates how to get a summary for a specific match within a given set of context nodes. It retrieves matches, iterates through potential ancestors (para, title, td), and calls kwic:get-summary for the first match found within each ancestor. ```xquery let $matches := kwic:get-matches($hit) for $ancestor in $matches/ancestor::para | $matches/ancestor::title | $matches/ancestor::td return kwic:get-summary($ancestor, ($ancestor//exist:match)["1"], $config) ``` -------------------------------- ### Build Website XAR Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Checkout the release tag and build the website XAR using ant. ```bash git checkout eXist-5.3.0 && ant ``` -------------------------------- ### Run XQSuite Tests (Maven) Source: https://github.com/exist-db/exist/blob/develop/CLAUDE.md Executes XQSuite tests for a specific module using Maven. Ensure tests are enabled and dependency checks are skipped. ```bash # XQSuite tests (XQuery test framework) mvn test -pl exist-core -Dtest="xquery.xquery3.XQuery3Tests" -Ddependency-check.skip=true -Ddocker=false ``` -------------------------------- ### Simple Dockerfile for App Deployment Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Use this Dockerfile to create an eXist-db image with a pre-built .xar application. The app is copied to the autodeploy directory. ```docker FROM existdb/existdb:5.0.0 COPY build/*.xar /exist/autodeploy ``` -------------------------------- ### Maven Release Prepare Command Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Execute the Maven release prepare goal to initiate the release process. Use flags like -DdryRun=true for a test run, and specify signing and packaging options as needed. ```bash $ mvn -Ddocker=true -Dmac-signing=true -P installer -Dizpack-signing=true -Darguments="-Ddocker=true -Dmac-signing=true -P installer -Dizpack-signing=true" release:prepare ``` -------------------------------- ### Stop eXist-DB Docker Container Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Command to stop a running eXist-DB Docker container. If the container was started with the `-d` flag, this command is necessary to halt its execution. ```bash docker stop exist ``` -------------------------------- ### Nightly Build with Git Commit ID Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Example of appending a Git commit ID for nightly builds, using the Semantic Versioning mechanism for the optional 5th component. ```text e.g., 3.2.0-SNAPSHOT+ ``` -------------------------------- ### Clone and Build eXist-db Source: https://github.com/exist-db/exist/blob/develop/BUILD.md Clone the eXist-db repository, navigate into the directory, checkout the master branch, and then build the project using Maven, skipping tests. This will produce a compiled version in the `exist-distribution/target` folder. ```bash $ git clone https://github.com/eXist-db/exist.git $ cd exist $ git checkout master $ mvn -DskipTests package ``` -------------------------------- ### Get Contextual Text Chunks Source: https://github.com/exist-db/exist/blob/develop/exist-core/src/main/resources/org/exist/xquery/lib/kwic.xql.html Retrieves preceding or following text chunks relative to a match element. It filters text nodes that are descendants of the root element and highlights matches. ```XQuery declare function kwic:get-context($root as element(), $match as element(exist:match), $mode as xs:string) as node()*{ let $sibs := if ($mode eq 'previous') then $match/preceding::text() else $match/text()/following::text() for $sib in $sibs where exists($root[.//$sib]) return if ($sib/parent::exist:match) then {$sib} else $sib }; ``` -------------------------------- ### Restore Database from Backup Source: https://github.com/exist-db/exist/blob/develop/RECOVERY.md Use this command-line utility to restore database files from a backup. The database should not be running as a server during this process. Check `./bin/backup.sh --help` for more options. ```sh ./bin/backup.sh --restore full20210925-1600.zip --dba-password \ --rebuild --optionuri=xmldb:exist:/// ``` -------------------------------- ### Build Docker Image (Maven) Source: https://github.com/exist-db/exist/blob/develop/CLAUDE.md Builds the Docker image for eXist-db using Maven, skipping tests and enabling the Docker profile. The Dockerfile is then copied and used for building the image. ```bash # Build the Docker image mvn -T1.5C clean package -DskipTests -Ddependency-check.skip=true -Ddocker=true \ -P 'skip-build-dist-archives,!build-dist-archives,!mac-dmg-on-mac,!codesign-mac-dmg,!mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,!appassembler-booter' \ -pl exist-docker -am cp exist-docker/target/classes/Dockerfile exist-docker/target/exist-docker-*-docker-dir/Dockerfile docker build -t existdb/existdb:local exist-docker/target/exist-docker-*-docker-dir/ ``` -------------------------------- ### Build eXist-DB Docker Image with Maven Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Build a Docker image for eXist-DB from a local clone using Maven. The `-Pdocker` profile activates the Docker build process, and `-DskipTests` prevents test execution during the build. ```bash mvn -Pdocker -DskipTests -Ddependency-check.skip=true clean package ``` -------------------------------- ### Modify Log4j2 Configuration in Dockerfile Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Example of modifying `log4j2.xml` during a multi-stage Docker build using `xmlstarlet` to add a `STDOUT` appender reference. This ensures logging is directed to standard output. ```docker # Config files are modified here RUN echo 'modifying conf files'\ && cd $EXIST_HOME/etc \ && xmlstarlet ed -L -s '/Configuration/Loggers/Root' -t elem -n 'AppenderRefTMP' -v '' \ -i //AppenderRefTMP -t attr -n 'ref' -v 'STDOUT'\ -r //AppenderRefTMP -v AppenderRef \ log4j2.xml ``` -------------------------------- ### Launch eXist-db via Command Line Source: https://github.com/exist-db/exist/blob/develop/exist-installer/src/main/izpack/readme.html Execute this command in the terminal to launch eXist-db. Ensure you are in the directory containing start.jar. ```bash java -jar start.jar ``` -------------------------------- ### Git Flow Initialization for eXist-db Source: https://github.com/exist-db/exist/blob/develop/CONTRIBUTING.md Configure GitFlow for eXist-db development. Use 'master' for production releases and 'develop' for integration. Set prefixes for feature, release, hotfix, and support branches, and specify a version tag prefix. ```bash git flow init Which branch should be used for bringing forth production releases? - develop Branch name for production releases: [] master Which branch should be used for integration of the "next release"? - develop Branch name for "next release" development: [develop] How to name your supporting branch prefixes? Feature branches? [feature/] Release branches? [release/] Hotfix branches? [hotfix/] Support branches? [support/] Version tag prefix? [] eXist- Hooks and filters directory? [.git/hooks] ``` -------------------------------- ### ANTLR Grammar Sections Source: https://github.com/exist-db/exist/blob/develop/AGENTS.md Organizes ANTLR grammar rules into labeled sections for better maintainability and to prevent merge conflicts. Examples include sections for XQuery Update Facility and Full Text. ```antlr // === W3C XQuery Update Facility 3.0 === // === Full Text === // === XQuery 4.0 Parser Extensions === ``` -------------------------------- ### Download Windows Binary Source: https://github.com/exist-db/exist/blob/develop/exist-service/bin/README.md Download and unzip the Windows binary package from Apache Commons Daemon. This is the direct native binary for Windows. ```bash wget https://dlcdn.apache.org/commons/daemon/binaries/windows/commons-daemon-1.5.1-bin-windows.zip unzip commons-daemon-1.5.1-bin-windows.zip ``` -------------------------------- ### Run Full Unit Tests (Maven) Source: https://github.com/exist-db/exist/blob/develop/CLAUDE.md Executes the full unit test suite for a specific module using Maven. Dependency checks are skipped. ```bash # Full unit test suite mvn test -pl exist-core -Ddependency-check.skip=true -Ddocker=false ``` -------------------------------- ### Dockerfile for Customizing eXist-DB Instance Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md This Dockerfile demonstrates how to modify the eXist-db instance by copying a custom `conf.xml` and deploying an application from a URL. It uses `RUN` commands to execute administrative tasks. ```docker FROM existdb/existdb # NOTE: this is for syntax demo purposes only RUN [ "java", "org.exist.start.Main", "client", "--no-gui", "-l", "-u", "admin", "-P", "", "-x", "sm:passwd('admin','123')" ] # use a modified conf.xml COPY src/conf.xml /exist/etc ADD https://github.com/eXist-db/documentation/releases/download/4.0.4/exist-documentation-4.0.4.xar /exist/autodeploy ``` -------------------------------- ### Build Linux Binary on macOS (ARM) Source: https://github.com/exist-db/exist/blob/develop/exist-service/bin/README.md Build a Linux binary on macOS with ARM processors using Docker, specifying the amd64 platform. ```bash docker run -it --platform linux/amd64 -v ./commons-daemon-1.5.1-native-src/unix:/commons-daemon-1.5.1-native-src centos:7 ``` -------------------------------- ### Multi-stage Dockerfile with Ant and NodeJS Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md This multi-stage Dockerfile sets up a builder environment with Ant and NodeJS to download frontend dependencies and build a .xar file. The second stage then uses this .xar to create the final eXist-db image. ```docker # START STAGE 1 FROM openjdk:8-jdk-slim as builder USER root ENV ANT_VERSION 1.10.5 ENV ANT_HOME /etc/ant-${ANT_VERSION} WORKDIR /tmp RUN wget http://www-us.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz && mkdir ant-${ANT_VERSION} && tar -zxvf apache-ant-${ANT_VERSION}-bin.tar.gz && mv apache-ant-${ANT_VERSION} ${ANT_HOME} && rm apache-ant-${ANT_VERSION}-bin.tar.gz && rm -rf ant-${ANT_VERSION} && rm -rf ${ANT_HOME}/manual && unset ANT_VERSION ENV PATH ${PATH}:${ANT_HOME}/bin WORKDIR /home/my-app COPY . . RUN apk add --no-cache --virtual .build-deps nodejs nodejs-npm git && npm i npm@latest -g && ant # START STAGE 2 FROM existdb/existdb:release COPY --from=builder /home/my-app/build/*.xar /exist/autodeploy EXPOSE 8080 8443 CMD [ "java", "org.exist.start.Main", "jetty" ] ``` -------------------------------- ### Compile Linux Binary with Docker Source: https://github.com/exist-db/exist/blob/develop/exist-service/bin/README.md Compile a Linux binary for x86_64 from native source using Docker on CentOS 7. Requires glibc 2.17 or later. ```bash wget https://dlcdn.apache.org/commons/daemon/source/commons-daemon-1.5.1-native-src.tar.gz tar zxvf commons-daemon-1.5.1-native-src.tar.gz docker run -it -v ./commons-daemon-1.5.1-native-src:/commons-daemon-1.5.1-native-src centos:7 sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' /etc/yum.repos.d/CentOS-* yum install -y gcc make libcap-devel java-1.8.0-openjdk-headless java-1.8.0-openjdk-devel cd /commons-daemon-1.5.1-native-src/unix export CFLAGS=-m64 export LDFLAGS=-m64 export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk ./configure make ``` -------------------------------- ### Create User and Group for eXist Source: https://github.com/exist-db/exist/blob/develop/tools/Solaris/README.txt Creates the 'exist' user and group required for running the eXist service. Ensure the user's home directory exists. ```bash # groupadd exist # useradd -c "eXist Database" -g exist -m -s /bin/bash exist ``` -------------------------------- ### Push Docker Image with Maven Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Push the built eXist-DB Docker image to a registry using the Maven Docker plugin. ```bash cd exist-docker mvn docker:push ``` -------------------------------- ### Initialize GitFlow Source: https://github.com/exist-db/exist/blob/develop/CONTRIBUTING.md Initialize GitFlow in your cloned repository. This sets up the necessary branches and configurations for GitFlow workflows. ```bash git flow init ``` -------------------------------- ### Run All Tests Locally Source: https://github.com/exist-db/exist/blob/develop/BUILD.md Execute all tests for the eXist-db project from the repository root using Maven. This command includes verbose output, a fresh build, skips dependency checks, and license checks. ```bash mvn -V -B verify -Ddependency-check.skip -Dlicense.skip ``` -------------------------------- ### Build Running Only Integration Tests Source: https://github.com/exist-db/exist/blob/develop/BUILD.md Build the eXist-db project, skipping unit tests but running integration tests, by using `-DskipUnitTests=true`. ```bash mvn -DskipUnitTests=true package ``` -------------------------------- ### Create Emergency Backup Source: https://github.com/exist-db/exist/blob/develop/RECOVERY.md Use this command to create a 'regular' backup or to handle situations with database corruption. The database should not be running during the export process. Check `./bin/export.sh --help` for more options. ```sh ./bin/export.sh --direct --check-docs ``` -------------------------------- ### Copy eXist Standalone Service Manifest Source: https://github.com/exist-db/exist/blob/develop/tools/Solaris/README.txt Places the service manifest file in the correct SMF application directory. This should be done within the zone where eXist will run. ```bash # cp eXist-standalone.smf.xml /var/svc/manifest/application ``` -------------------------------- ### Run eXist-DB Tests with Bats Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Execute the eXist-DB Docker image tests using the Bats framework. Ensure `exist-ci` container is running and no `ex-mod` image exists locally before running. ```bash bats exist-docker/src/test/bats/*.bats ``` -------------------------------- ### Commit and Push Website Changes Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Commit the updated index.html and expath-pkg.xml files and push them to the master branch. ```bash git commit index.html expath-pkg.xml -m "Update for eXist-5.3.0 website" && git push origin master ``` -------------------------------- ### Build Skipping Unit Tests Source: https://github.com/exist-db/exist/blob/develop/BUILD.md Build the eXist-db project while skipping all tests using the `-DskipTests` Maven switch. This is useful for a quicker build when tests are not immediately required. ```bash mvn -DskipTests package ``` -------------------------------- ### Run Tests for exist-core Only Source: https://github.com/exist-db/exist/blob/develop/BUILD.md Execute tests specifically for the `exist-core` module, including any dependent modules, using Maven. This command is a variation of running all tests. ```bash mvn -V -B verify -Ddependency-check.skip -Dlicense.skip --projects exist-core --also-make ``` -------------------------------- ### Configure Build for EXPath Repository Source: https://github.com/exist-db/exist/blob/develop/extensions/modules/expathrepo/README.md Set this property in local.build.properties or build.properties to include the expathrepo module during the build process. ```properties include.module.expathrepo = true ``` -------------------------------- ### Maven Release Interactive Prompts Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Maven's release plugin will prompt for release version, SCM tag, and the next development version. Provide the correct values to proceed with the release preparation. ```text [INFO] --- maven-release-plugin:2.1:prepare (default-cli) @ exist --- [INFO] Verifying that there are no local modifications... [INFO] ignoring changes on: pom.xml.next, pom.xml.releaseBackup, pom.xml.tag, pom.xml.backup, pom.xml.branch, release.properties [INFO] Executing: /bin/sh -c cd /Users/aretter/code/exist.maven && git status [INFO] Working directory: /Users/aretter/code/exist.maven [INFO] Checking dependencies and plugins for snapshots ... What is the release version for "eXist-db"? (org.exist-db:exist) 5.3.0: : What is SCM release tag or label for "eXist-db"? (org.exist-db:exist) eXist-5.3.0: : What is the new development version for "eXist-db"? (org.exist-db:exist) 5.4.0-SNAPSHOT: : ``` -------------------------------- ### Announce Release via Email Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Send an announcement email to the exist-open mailing list with the release details and notes. ```plaintext [ANN] Release of eXist 5.3.0 ``` -------------------------------- ### Run Vector Integration Tests Source: https://github.com/exist-db/exist/blob/develop/extensions/indexes/vector-it/README.md Execute integration tests for vector search and ONNX models using Maven. The `-Ponnx-model` profile downloads the all-MiniLM-L6-v2 model on the first run. ```bash mvn verify -pl extensions/indexes/vector-it -am -Ponnx-model -DskipUnitTests=true ``` -------------------------------- ### Map Images URL to ScaleImageJAI Servlet Source: https://github.com/exist-db/exist/blob/develop/extensions/images/README.md Configure EXIST_HOME/webapp/WEB-INF/controller-config.xml to map the /images URL pattern to the ScaleImageJAI servlet. ```xml ``` -------------------------------- ### Tag Website Release Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Create a signed tag for the website release and push it to the origin. ```bash git tag -s -m "Release tag for eXist 5.3.0 website" eXist-5.3.0 && git push origin eXist-5.3.0 ``` -------------------------------- ### Query Service Endpoints with SQLite Source: https://github.com/exist-db/exist/blob/develop/CLAUDE.md Import a CSV into an in-memory SQLite database and query for specific HTTP methods. Column names with spaces require square brackets. ```bash sqlite3 :memory: -cmd ".mode csv" -cmd ".import .moderne/context/service-endpoints.csv endpoints" "SELECT * FROM endpoints WHERE [HTTP method] = 'POST'" ``` -------------------------------- ### Set Permissions for Service Manifest Source: https://github.com/exist-db/exist/blob/develop/tools/Solaris/README.txt Sets the correct ownership and read permissions for the eXist service manifest file. ```bash # chown root:sys /var/svc/manifest/application/eXist-standalone.smf.xml # chmod 444 /var/svc/manifest/application/eXist-standalone.smf.xml ``` -------------------------------- ### Enable Vector Search with SIMD Acceleration Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md To use vector search with SIMD acceleration, build a custom image or pass specific flags to `JAVA_TOOL_OPTIONS` when running the container. This requires a JDK 16+ base and enables vector modules and native access. ```bash docker run -e JAVA_TOOL_OPTIONS="--add-modules jdk.incubator.vector --enable-native-access=ALL-UNNAMED ..." existdb/existdb:debug ``` -------------------------------- ### Run Single Test Class Source: https://github.com/exist-db/exist/blob/develop/BUILD.md Execute a specific test class within the `exist-core` module using Maven. Replace `fully.qualified.TestClass` with the actual test class name. ```bash mvn -Dtest=fully.qualified.TestClass test --projects exist-core --also-make ``` -------------------------------- ### Set eXist Admin Password Source: https://github.com/exist-db/exist/blob/develop/tools/Solaris/README.txt Connects to the eXist server using the client script to set or change the admin password. Ensure the password matches the one configured in the service script. ```bash $ su root # su - exist $ /opt/eXist-db/bin/client.sh -s exist:/db>passwd admin password: admin re-enter password: admin exist:/db>quit ``` -------------------------------- ### Maven Settings for Release Signing Profiles Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Define Maven profiles in settings.xml to manage GPG, Java KeyStore, and Apple Notarization API credentials for signing release artifacts. Ensure these properties are correctly set for the release process. ```xml existdb-release-signing ABC1234 ${user.home}/.gnupg/pubring.gpg ${user.home}/.gnupg/secring.gpg your-password ${user.home}/your.store your-keystore-password your-alias your-key-password your-apple-developer-email@your-dom.ain your-apple-notarize-api-password existdb-release-signing ``` -------------------------------- ### Run Docker Container Source: https://github.com/exist-db/exist/blob/develop/CLAUDE.md Runs the eXist-db Docker container in detached mode, exposing the default ports. Access the database via http://localhost:8080/exist/. ```bash # Run docker run -d --name existdb -p 8080:8080 -p 8443:8443 existdb/existdb:local # Access at http://localhost:8080/exist/ ``` -------------------------------- ### Maven Settings for Release Credentials Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md Configure your local Maven settings.xml to securely store credentials for Sonatype OSS staging, DockerHub, and GitHub. This is essential for publishing artifacts and releases. ```xml sonatype-nexus-staging YOUR-USERNAME YOUR-PASSWORD docker.io YOUR-USERNAME YOUR-PASSWORD github [Github Personal access tokens] ``` -------------------------------- ### Import eXist Standalone Service Manifest (Solaris 10) Source: https://github.com/exist-db/exist/blob/develop/tools/Solaris/README.txt Imports the eXist standalone service manifest into SMF on Solaris 10. ```bash # svccfg import /var/svc/manifest/application/eXist-standalone.smf.xml ``` -------------------------------- ### Build Single Module (Maven) Source: https://github.com/exist-db/exist/blob/develop/CLAUDE.md Builds a single Maven module (e.g., exist-core) and its dependencies. The -am flag is required for cross-module dependencies. ```bash mvn install -pl exist-core -am -DskipTests -Ddependency-check.skip=true -Ddocker=false ``` -------------------------------- ### Modify build.properties for Snapshot Source: https://github.com/exist-db/exist/blob/develop/exist-versioning-release.md To initiate Semantic Versioning for a development phase, update the `project.version` in the `$EXIST_HOME/build.properties` file to a SNAPSHOT version. This is a required step before committing and pushing changes. ```properties project.version = 3.1.0-SNAPSHOT ``` -------------------------------- ### Set Ownership of eXist Directory Source: https://github.com/exist-db/exist/blob/develop/tools/Solaris/README.txt Ensures the eXist database directory is owned by the 'exist' user and group. ```bash # chown -R exist:exist /opt/eXist-db ``` -------------------------------- ### Compile macOS Universal Binary Source: https://github.com/exist-db/exist/blob/develop/exist-service/bin/README.md Compile a Universal Binary for macOS (x86_64 and arm64) from the native source. Requires a minimum macOS version of 10.13. ```bash wget https://dlcdn.apache.org/commons/daemon/source/commons-daemon-1.5.1-native-src.tar.gz tar zxvf commons-daemon-1.5.1-native-src.tar.gz cd commons-daemon-1.5.1-native-src/unix export CFLAGS="-mmacosx-version-min=10.13 -arch x86_64 -arch arm64" export LDFLAGS="-mmacosx-version-min=10.13 -arch x86_64 -arch arm64" ./configure make ``` -------------------------------- ### Set Permissions for Service Script Source: https://github.com/exist-db/exist/blob/develop/tools/Solaris/README.txt Sets the correct ownership and execute permissions for the eXist service script. ```bash # chown root:bin /lib/svc/method/svc-eXist-standalone # chmod 555 /lib/svc/method/svc-eXist-standalone ``` -------------------------------- ### Run Default JMH Benchmark Source: https://github.com/exist-db/exist/blob/develop/exist-indexes-jmh/README.md Executes the JMH benchmarks using Maven's exec-maven-plugin. The default configuration runs the NgramWhereClauseBenchmark with JMH's GCProfiler enabled. ```bash mvn exec:exec -pl exist-indexes-jmh ``` -------------------------------- ### Pull eXist-DB Docker Image Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Use this command to download the latest eXist-DB Docker image from DockerHub. ```bash docker pull existdb/existdb:latest ``` -------------------------------- ### kwic:get-summary Source: https://github.com/exist-db/exist/blob/develop/exist-core/src/main/resources/org/exist/xquery/lib/kwic.xql.html Generates a summary of a match within a given node and configuration. ```APIDOC ## kwic:get-summary ### Description Prints a summary of the match found in the provided node, using the specified configuration. ### Signature ``` kwic:get-summary($root as node(), $node as element(exist:match), $config as element(config)) as element() ``` ### Parameters * `$root` (node()): The root node context. * `$node` (element(exist:match)): The match element to summarize. * `$config` (element(config)): The configuration element to guide the summary generation. ``` -------------------------------- ### View eXist-DB Container Logs Source: https://github.com/exist-db/exist/blob/develop/exist-docker/src/main/resources-filtered/README.md Accesses the logs of a running eXist-DB Docker container. This command is particularly effective when the image is run with the `-t` flag. ```bash docker logs exist ```